hyacinth-ai 0.9.17 → 0.9.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/agents/delegate-tool.js +12 -5
  2. package/dist/rollback/rollback-tool.js +2 -7
  3. package/dist/tools/archive.d.ts +1 -1
  4. package/dist/tools/archive.js +1 -4
  5. package/dist/tools/ask-user.js +1 -1
  6. package/dist/tools/bash.d.ts +1 -1
  7. package/dist/tools/bash.js +1 -1
  8. package/dist/tools/bundle-tools.js +7 -7
  9. package/dist/tools/channel-info.js +1 -1
  10. package/dist/tools/compression.js +1 -1
  11. package/dist/tools/config.js +4 -4
  12. package/dist/tools/db-query.d.ts +1 -1
  13. package/dist/tools/db-query.js +1 -5
  14. package/dist/tools/diff-files.d.ts +1 -1
  15. package/dist/tools/diff-files.js +1 -3
  16. package/dist/tools/disk-usage.d.ts +1 -1
  17. package/dist/tools/disk-usage.js +1 -1
  18. package/dist/tools/edit.d.ts +1 -1
  19. package/dist/tools/edit.js +1 -4
  20. package/dist/tools/flow.js +5 -5
  21. package/dist/tools/git-tool.d.ts +1 -1
  22. package/dist/tools/git-tool.js +1 -1
  23. package/dist/tools/glob.d.ts +1 -1
  24. package/dist/tools/glob.js +1 -1
  25. package/dist/tools/grep.d.ts +1 -1
  26. package/dist/tools/grep.js +1 -1
  27. package/dist/tools/http-request.d.ts +1 -1
  28. package/dist/tools/http-request.js +1 -3
  29. package/dist/tools/insert.d.ts +1 -1
  30. package/dist/tools/insert.js +1 -3
  31. package/dist/tools/json-edit.d.ts +1 -1
  32. package/dist/tools/json-edit.js +1 -5
  33. package/dist/tools/multi-edit.d.ts +1 -1
  34. package/dist/tools/multi-edit.js +1 -3
  35. package/dist/tools/process-tools.js +3 -6
  36. package/dist/tools/read.d.ts +1 -1
  37. package/dist/tools/read.js +1 -1
  38. package/dist/tools/restart.d.ts +1 -1
  39. package/dist/tools/restart.js +1 -4
  40. package/dist/tools/runtime-control.js +51 -64
  41. package/dist/tools/system-info.js +1 -1
  42. package/dist/tools/write.d.ts +1 -1
  43. package/dist/tools/write.js +1 -1
  44. package/dist/tools/xref/xref-build.js +7 -9
  45. package/dist/tools/xref/xref-graph.js +8 -10
  46. package/dist/tools/xref/xref-query.js +15 -17
  47. package/package.json +1 -1
  48. package//346/250/241/345/235/227/344/276/235/350/265/226/345/210/206/346/236/220.md +706 -0
  49. package/webui-channel-design.md +0 -789
@@ -156,25 +156,32 @@ export async function createSubAgentLoop(agentDef, task, parentContext) {
156
156
  */
157
157
  export class DelegateToAgentTool {
158
158
  name = 'delegate_to_agent';
159
- description = 'Delegate a task to a specialized sub-agent. The sub-agent will execute the task independently and return results.';
159
+ description = '将任务委派给子 Agent 执行。子 Agent 是拥有独立上下文、工具集和 Provider 的隔离工作单元,执行完毕后返回结构化结果。' +
160
+ '三种协作模式:' +
161
+ '"delegate"(委托):将单个任务交给一个子 Agent 独立完成;' +
162
+ '"adversarial"(对抗审查):两个子 Agent 从不同角度独立审查同一任务,综合双方意见;' +
163
+ '"parallel"(并行分工):同时启动多个子 Agent 并行执行,汇总结果。' +
164
+ '编排场景:当你有一个复杂计划时,自己负责规划和决策,将其中可并行的子任务分别委派给多个子 Agent 同步执行——spawn_sub_agent 可克隆多份实例,配合不同的 instance_id 并发调度,大幅缩短总耗时。' +
165
+ '会话复用:子 Agent 会话在 TTL 窗口内持久化(默认 10 分钟),相同 instance_id 再次委派时自动恢复完整对话记忆,无需重新交代背景。' +
166
+ '使用 list_sub_agents 查看可用 Agent 及其实例 ID,create_sub_agent 创建新 Agent,spawn_sub_agent 克隆以支持并行,destroy_sub_agent 清理不再需要的实例。';
160
167
  inputSchema = {
161
168
  type: 'object',
162
169
  properties: {
163
170
  agent_name: {
164
171
  type: 'string',
165
- description: 'Name of the sub-agent to delegate to (e.g., "code-reviewer"). If multiple instances exist, the first available one is selected. Use instance_id for precise targeting.',
172
+ description: '要委派的子 Agent 名称(如 "code-reviewer")。同一名称下有多个实例时选中第一个。用 instance_id 精确指定。',
166
173
  },
167
174
  instance_id: {
168
175
  type: 'string',
169
- description: 'Optional instance ID of a specific sub-agent instance (for targeting a clone/spawned copy). Takes priority over agent_name.',
176
+ description: '可选,指定子 Agent 实例的唯一 ID(用于定位克隆体)。优先级高于 agent_name',
170
177
  },
171
178
  task: {
172
179
  type: 'string',
173
- description: 'Clear description of the task to delegate to the sub-agent',
180
+ description: '委派给子 Agent 的任务描述,清晰说明要做什么和期望的输出。',
174
181
  },
175
182
  context: {
176
183
  type: 'string',
177
- description: 'Optional additional context to provide to the sub-agent (e.g., relevant code snippets, file paths)',
184
+ description: '可选的附加上下文(如相关代码片段、文件路径、背景信息)。',
178
185
  },
179
186
  },
180
187
  required: ['task'],
@@ -11,9 +11,7 @@ const logger = createLogger('rollback-tool');
11
11
  export function createRollbackStatusTool(turnStore, getCurrentTurn) {
12
12
  return {
13
13
  name: 'rollback_status',
14
- description: 'View the list of turns available for rollback. Each turn shows its ID, timestamp, ' +
15
- 'number of changed files, and executed commands. Use this before calling rollback to ' +
16
- 'decide how many turns to roll back.',
14
+ description: '查看可回滚的回合列表。每个回合显示 ID、时间戳、变更文件数和执行的命令。在调用 rollback 之前先用此工具确认回退到哪个回合。',
17
15
  inputSchema: {
18
16
  type: 'object',
19
17
  properties: {},
@@ -65,10 +63,7 @@ export function createRollbackStatusTool(turnStore, getCurrentTurn) {
65
63
  export function createRollbackTool(turnStore, gitManager, getCurrentTurn) {
66
64
  return {
67
65
  name: 'rollback',
68
- description: 'Roll back file changes made in the last N turns. ' +
69
- 'Uses git to restore files to their state before the target turn. ' +
70
- 'Only file changes are reverted; configuration changes may need manual review. ' +
71
- 'Use rollback_status first to see available turns.',
66
+ description: '回滚最近 N 个回合的文件变更。通过 Git 将文件恢复到目标回合之前的状态。仅回滚文件变更——配置变更需手动检查。先用 rollback_status 查看可用回合列表。',
72
67
  inputSchema: {
73
68
  type: 'object',
74
69
  properties: {
@@ -7,7 +7,7 @@ import type { Tool } from './interface.js';
7
7
  */
8
8
  export declare class ArchiveTool implements Tool {
9
9
  readonly name = "archive";
10
- readonly description: string;
10
+ readonly description = "\u538B\u7F29\u6216\u89E3\u538B\u6587\u4EF6\uFF08\u652F\u6301 zip\u3001tar.gz\u3001tar.bz2\uFF09\u3002action=\"extract\" \u89E3\u538B\u5230\u76EE\u6807\u76EE\u5F55\u3002action=\"compress\" \u5C06\u6E90\u6587\u4EF6/\u76EE\u5F55\u6253\u5305\u4E3A\u538B\u7F29\u6587\u4EF6\u3002\u4F7F\u7528\u7CFB\u7EDF\u5DE5\u5177\uFF08tar / zip\uFF09\u786E\u4FDD\u53EF\u9760\u6027\u3002";
11
11
  readonly inputSchema: Record<string, unknown>;
12
12
  execute(args: Record<string, unknown>): Promise<string>;
13
13
  private extract;
@@ -9,10 +9,7 @@ import path from 'node:path';
9
9
  */
10
10
  export class ArchiveTool {
11
11
  name = 'archive';
12
- description = 'Compress or extract archives (zip, tar.gz, tar.bz2). ' +
13
- 'Action "extract" unpacks to a target directory. ' +
14
- 'Action "compress" creates an archive from a source directory or file list. ' +
15
- 'Uses system tools (tar, zip) for reliable operation.';
12
+ description = '压缩或解压文件(支持 ziptar.gztar.bz2)。action="extract" 解压到目标目录。action="compress" 将源文件/目录打包为压缩文件。使用系统工具(tar / zip)确保可靠性。';
16
13
  inputSchema = {
17
14
  type: 'object',
18
15
  properties: {
@@ -9,7 +9,7 @@ export function setAskUserHandler(handler) {
9
9
  export function createAskUserTool() {
10
10
  return {
11
11
  name: 'ask_user',
12
- description: 'Pause execution to ask the user structured questions. Shows an interactive form with multiple questions, multi-select options, and custom text input. Use this when you need to clarify requirements, gather preferences, or confirm choices before proceeding.',
12
+ description: '暂停执行,向用户展示交互式问题表单。支持多问题、多选选项和自定义文本输入。适用于需要澄清需求、收集偏好或确认选项后再继续的场景。',
13
13
  inputSchema: {
14
14
  type: 'object',
15
15
  properties: {
@@ -26,7 +26,7 @@ export interface SandboxConfig {
26
26
  */
27
27
  export declare class BashTool implements Tool {
28
28
  readonly name = "bash";
29
- readonly description = "Execute a shell command and return stdout/stderr. On Windows, commands natively run in PowerShell \u2014 do NOT prefix with \"powershell -Command\". On Linux/macOS, commands run in /bin/sh. Set async=true for background execution.";
29
+ readonly description = "\u6267\u884C Shell \u547D\u4EE4\u5E76\u8FD4\u56DE stdout/stderr\u3002Windows \u4E0B\u539F\u751F\u8FD0\u884C\u5728 PowerShell \u2014\u2014 \u4E0D\u8981\u52A0 \"powershell -Command\" \u524D\u7F00\u3002Linux/macOS \u4E0B\u8FD0\u884C\u5728 /bin/sh\u3002async=true \u65F6\u4EE5\u540E\u53F0\u8FDB\u7A0B\u65B9\u5F0F\u6267\u884C\uFF0C\u8FD4\u56DE\u8FDB\u7A0B\u53E5\u67C4\uFF0C\u53EF\u901A\u8FC7 process_list / process_output / process_kill \u7BA1\u7406\u3002";
30
30
  readonly inputSchema: Record<string, unknown>;
31
31
  readonly executionMode = "asyncable";
32
32
  private cwd;
@@ -107,7 +107,7 @@ function spawnWindows(command, cwd, env, opts) {
107
107
  */
108
108
  export class BashTool {
109
109
  name = 'bash';
110
- description = 'Execute a shell command and return stdout/stderr. On Windows, commands natively run in PowerShell do NOT prefix with "powershell -Command". On Linux/macOS, commands run in /bin/sh. Set async=true for background execution.';
110
+ description = '执行 Shell 命令并返回 stdout/stderrWindows 下原生运行在 PowerShell —— 不要加 "powershell -Command" 前缀。Linux/macOS 下运行在 /bin/shasync=true 时以后台进程方式执行,返回进程句柄,可通过 process_list / process_output / process_kill 管理。';
111
111
  inputSchema = {
112
112
  type: 'object',
113
113
  properties: {
@@ -7,7 +7,7 @@ export function registerBundleTools(toolRegistry, bundleRegistry) {
7
7
  const tools = [
8
8
  {
9
9
  name: 'list_bundles',
10
- description: 'List all available tool bundles with their tools and activation status.',
10
+ description: '列出所有可用工具包,包含包内工具和激活状态。',
11
11
  inputSchema: { type: 'object', properties: {} },
12
12
  async execute() {
13
13
  try {
@@ -27,7 +27,7 @@ export function registerBundleTools(toolRegistry, bundleRegistry) {
27
27
  },
28
28
  {
29
29
  name: 'activate_bundle',
30
- description: 'Activate one or more tool bundles (comma-separated names). Use deactivate_bundle to return to full mode.',
30
+ description: '激活一个或多个工具包(逗号分隔名称)。使用 deactivate_bundle 回到全量工具模式。',
31
31
  inputSchema: {
32
32
  type: 'object',
33
33
  properties: {
@@ -54,7 +54,7 @@ export function registerBundleTools(toolRegistry, bundleRegistry) {
54
54
  },
55
55
  {
56
56
  name: 'deactivate_bundle',
57
- description: 'Deactivate all bundles and return to full tool mode.',
57
+ description: '取消所有工具包限制,回到全量工具模式——所有已注册工具均对 LLM 可见。',
58
58
  inputSchema: { type: 'object', properties: {} },
59
59
  async execute() {
60
60
  try {
@@ -68,7 +68,7 @@ export function registerBundleTools(toolRegistry, bundleRegistry) {
68
68
  },
69
69
  {
70
70
  name: 'create_bundle',
71
- description: 'Create a new tool bundle.',
71
+ description: '创建自定义工具包。name=包名,description=描述,tools=初始工具列表(可选)。',
72
72
  inputSchema: {
73
73
  type: 'object',
74
74
  properties: {
@@ -93,7 +93,7 @@ export function registerBundleTools(toolRegistry, bundleRegistry) {
93
93
  },
94
94
  {
95
95
  name: 'add_to_bundle',
96
- description: 'Add tools to an existing bundle.',
96
+ description: '将工具追加到已有工具包。',
97
97
  inputSchema: {
98
98
  type: 'object',
99
99
  properties: {
@@ -117,7 +117,7 @@ export function registerBundleTools(toolRegistry, bundleRegistry) {
117
117
  },
118
118
  {
119
119
  name: 'remove_from_bundle',
120
- description: 'Remove tools from a bundle.',
120
+ description: '从工具包中移除指定工具。',
121
121
  inputSchema: {
122
122
  type: 'object',
123
123
  properties: {
@@ -143,7 +143,7 @@ export function registerBundleTools(toolRegistry, bundleRegistry) {
143
143
  },
144
144
  {
145
145
  name: 'delete_bundle',
146
- description: 'Delete a tool bundle (builtin and common cannot be deleted).',
146
+ description: '删除工具包(内置包和 common 包不可删除)。',
147
147
  inputSchema: {
148
148
  type: 'object',
149
149
  properties: { bundle: { type: 'string', description: '要删除的工具包名称' } },
@@ -25,7 +25,7 @@ function formatChannelsInfo(channels) {
25
25
  export function createChannelInfoTool() {
26
26
  return {
27
27
  name: 'channel_info',
28
- description: 'Query current channel configuration: which channels are connected, connection mode, DM/group policies, whether @mention is required.',
28
+ description: '查询当前外部渠道配置:已连接的渠道列表、连接模式、私聊/群聊策略、是否需要 @提及。',
29
29
  inputSchema: {
30
30
  type: 'object',
31
31
  properties: {},
@@ -1,7 +1,7 @@
1
1
  export function createTriggerCompressionTool(agentLoop) {
2
2
  return {
3
3
  name: 'trigger_compression',
4
- description: 'Manually trigger context compression to free token space. Useful when the conversation is getting long and the context bar shows high usage, or before starting a complex new task that needs fresh context.',
4
+ description: '手动触发上下文压缩以释放 Token 空间。适用于对话过长、上下文使用率较高时,或在开始需要大量上下文的新任务之前主动清理。',
5
5
  inputSchema: {
6
6
  type: 'object',
7
7
  properties: {},
@@ -115,7 +115,7 @@ function buildSchemaEntries(defaults, current, prefix = '') {
115
115
  export function createGetConfigTool(configCenter) {
116
116
  return {
117
117
  name: 'get_config',
118
- description: 'Read current Agent configuration. Provide an optional dot-path to read a single value, or omit to get the full config.',
118
+ description: '读取当前 Agent 配置。传入 dot-path 读取单个配置项(如 "provider.active"),不传则返回完整配置。',
119
119
  inputSchema: {
120
120
  type: 'object',
121
121
  properties: {
@@ -152,7 +152,7 @@ export function createGetConfigTool(configCenter) {
152
152
  export function createUpdateConfigTool(configCenter) {
153
153
  return {
154
154
  name: 'update_config',
155
- description: 'Update Agent configuration. Accepts key-value pairs. Keys can use dot-path notation (e.g. "session.maxTurns": 60) or be nested objects. Changes are persisted immediately.',
155
+ description: '更新 Agent 配置。支持 dot-path 键名(如 "session.maxTurns": 60)或嵌套对象。修改立即持久化。',
156
156
  inputSchema: {
157
157
  type: 'object',
158
158
  properties: {
@@ -204,7 +204,7 @@ export function createUpdateConfigTool(configCenter) {
204
204
  export function createConfigSchemaTool(configCenter) {
205
205
  return {
206
206
  name: 'config_schema',
207
- description: 'Return the full configuration schema including path, type, description, default values, and current values for every config key.',
207
+ description: '返回完整配置 schema,包含每个配置项的路径、类型、描述、默认值和当前值。',
208
208
  inputSchema: { type: 'object', properties: {} },
209
209
  async execute(_args) {
210
210
  try {
@@ -226,7 +226,7 @@ export function createConfigSchemaTool(configCenter) {
226
226
  export function createResetConfigTool(configCenter) {
227
227
  return {
228
228
  name: 'reset_config',
229
- description: 'Reset runtime configuration overrides back to default values. Provide a dot-path to reset a single key, or omit to reset everything.',
229
+ description: '将运行时配置恢复为默认值。传 dot-path 重置单项,不传则重置全部。',
230
230
  inputSchema: {
231
231
  type: 'object',
232
232
  properties: {
@@ -5,7 +5,7 @@ import type { Tool } from './interface.js';
5
5
  */
6
6
  export declare class DbQueryTool implements Tool {
7
7
  readonly name = "db_query";
8
- readonly description: string;
8
+ readonly description = "\u5BF9 SQLite \u6570\u636E\u5E93\u6267\u884C\u53C2\u6570\u5316 SQL \u67E5\u8BE2\u3002SELECT \u8FD4\u56DE\u683C\u5F0F\u5316\u8868\u683C\uFF08JSON \u5BF9\u8C61\u6570\u7EC4\uFF09\u3002INSERT/UPDATE/DELETE \u8FD4\u56DE\u5F71\u54CD\u884C\u6570\u3002\u53C2\u6570\u901A\u8FC7 JSON \u6570\u7EC4\u5B89\u5168\u4F20\u5165\uFF0C\u675C\u7EDD\u6CE8\u5165\u98CE\u9669\u3002\u652F\u6301\u53EA\u8BFB\u548C\u8BFB\u5199\u6A21\u5F0F\u3002";
9
9
  readonly inputSchema: Record<string, unknown>;
10
10
  execute(args: Record<string, unknown>): Promise<string>;
11
11
  }
@@ -6,11 +6,7 @@ import path from 'node:path';
6
6
  */
7
7
  export class DbQueryTool {
8
8
  name = 'db_query';
9
- description = 'Execute a parameterized SQL query against a SQLite database. ' +
10
- 'For SELECT, returns results as a formatted table (JSON array of objects). ' +
11
- 'For INSERT/UPDATE/DELETE, returns the number of affected rows. ' +
12
- 'Parameters are passed as a JSON array for safe, injection-free queries. ' +
13
- 'Supports read-only and read-write modes.';
9
+ description = ' SQLite 数据库执行参数化 SQL 查询。SELECT 返回格式化表格(JSON 对象数组)。INSERT/UPDATE/DELETE 返回影响行数。参数通过 JSON 数组安全传入,杜绝注入风险。支持只读和读写模式。';
14
10
  inputSchema = {
15
11
  type: 'object',
16
12
  properties: {
@@ -10,7 +10,7 @@ import type { Tool } from './interface.js';
10
10
  */
11
11
  export declare class DiffFilesTool implements Tool {
12
12
  readonly name = "diff_files";
13
- readonly description: string;
13
+ readonly description = "\u9010\u884C\u6BD4\u8F83\u4E24\u4E2A\u6587\u4EF6\uFF0C\u8FD4\u56DE unified diff \u683C\u5F0F\u7684\u5DEE\u5F02\u3002+ \u8868\u793A\u65B0\u589E\u884C\uFF0C- \u8868\u793A\u5220\u9664\u884C\u3002\u652F\u6301\u7EDD\u5BF9\u8DEF\u5F84\u548C\u76F8\u5BF9\u8DEF\u5F84\u3002";
14
14
  readonly inputSchema: Record<string, unknown>;
15
15
  execute(args: Record<string, unknown>): Promise<string>;
16
16
  }
@@ -12,9 +12,7 @@ import { diffLines } from 'diff';
12
12
  */
13
13
  export class DiffFilesTool {
14
14
  name = 'diff_files';
15
- description = 'Compare two files line by line and return the diff with line numbers. ' +
16
- 'Returns unified diff format: lines prefixed with + (added), - (removed), or space (unchanged). ' +
17
- 'Supports both absolute and relative paths.';
15
+ description = '逐行比较两个文件,返回 unified diff 格式的差异。+ 表示新增行,- 表示删除行。支持绝对路径和相对路径。';
18
16
  inputSchema = {
19
17
  type: 'object',
20
18
  properties: {
@@ -14,7 +14,7 @@ import type { Tool } from './interface.js';
14
14
  */
15
15
  export declare class DiskUsageTool implements Tool {
16
16
  readonly name = "disk_usage";
17
- readonly description = "Analyze disk space and directory sizes. Mode \"free\" shows drive/volume free space. Mode \"dirs\" ranks subdirectories by total size. Mode \"files\" ranks individual files. Mode \"all\" shows both.";
17
+ readonly description = "\u5206\u6790\u78C1\u76D8\u7A7A\u95F4\u548C\u76EE\u5F55\u5927\u5C0F\u3002mode=\"free\" \u67E5\u770B\u78C1\u76D8\u5269\u4F59\u7A7A\u95F4\u3002mode=\"dirs\" \u6309\u5927\u5C0F\u6392\u5E8F\u5B50\u76EE\u5F55\u3002mode=\"files\" \u6309\u5927\u5C0F\u6392\u5E8F\u6587\u4EF6\u3002mode=\"all\" \u540C\u65F6\u663E\u793A\u76EE\u5F55\u548C\u6587\u4EF6\u3002\u652F\u6301 depth \u53C2\u6570\u63A7\u5236\u9012\u5F52\u6DF1\u5EA6\u3002";
18
18
  readonly inputSchema: Record<string, unknown>;
19
19
  private cwd;
20
20
  constructor(cwd?: string);
@@ -17,7 +17,7 @@ import path from 'node:path';
17
17
  */
18
18
  export class DiskUsageTool {
19
19
  name = 'disk_usage';
20
- description = 'Analyze disk space and directory sizes. Mode "free" shows drive/volume free space. Mode "dirs" ranks subdirectories by total size. Mode "files" ranks individual files. Mode "all" shows both.';
20
+ description = '分析磁盘空间和目录大小。mode="free" 查看磁盘剩余空间。mode="dirs" 按大小排序子目录。mode="files" 按大小排序文件。mode="all" 同时显示目录和文件。支持 depth 参数控制递归深度。';
21
21
  inputSchema = {
22
22
  type: 'object',
23
23
  properties: {
@@ -16,7 +16,7 @@ import type { Tool } from './interface.js';
16
16
  */
17
17
  export declare class EditTool implements Tool {
18
18
  readonly name = "edit";
19
- readonly description: string;
19
+ readonly description = "\u7CBE\u786E\u66FF\u6362\u6587\u4EF6\u4E2D\u7684\u5B57\u7B26\u4E32\uFF0C\u6216\u6309\u884C\u53F7\u66FF\u6362\u3002\u5B57\u7B26\u4E32\u6A21\u5F0F\uFF1Aold_string \u5FC5\u987B\u552F\u4E00\u5339\u914D\uFF08\u9664\u975E replace_all=true\uFF09\u3002\u884C\u53F7\u6A21\u5F0F\uFF1Aline_start \u6307\u5B9A\u8D77\u59CB\u884C\uFF081-based\uFF09\uFF0Cline_count \u6307\u5B9A\u884C\u6570\u3002\u4E24\u79CD\u6A21\u5F0F\u4E92\u65A5\u3002";
20
20
  readonly companionDescription = "\u5F97\u6539\u4E00\u4E0B\u4E86\u3002";
21
21
  readonly inputSchema: Record<string, unknown>;
22
22
  execute(args: Record<string, unknown>): Promise<string>;
@@ -21,10 +21,7 @@ import { autoReferenceCheck } from './symbol-references.js';
21
21
  */
22
22
  export class EditTool {
23
23
  name = 'edit';
24
- description = 'Performs exact string replacements in a file (' +
25
- 'old_string must uniquely match unless replace_all=true), ' +
26
- 'or replaces lines by line number using line_start/line_count. ' +
27
- 'line_start and old_string are mutually exclusive.';
24
+ description = '精确替换文件中的字符串,或按行号替换。字符串模式:old_string 必须唯一匹配(除非 replace_all=true)。行号模式:line_start 指定起始行(1-based),line_count 指定行数。两种模式互斥。';
28
25
  companionDescription = '得改一下了。';
29
26
  inputSchema = {
30
27
  type: 'object',
@@ -31,11 +31,11 @@ export function isFlowTool(name) {
31
31
  export function createFlowStartTool(registry) {
32
32
  return {
33
33
  name: 'flow_start',
34
- description: 'Activate a guided workflow mode. Available modes:\n' +
34
+ description: '激活一个引导式工作流模式。可用模式:\n' +
35
35
  Object.entries(MODE_DESCRIPTIONS)
36
36
  .map(([k, v]) => ` - "${k}": ${v}`)
37
37
  .join('\n') +
38
- '\n\nAfter activation, use flow_add to define items and flow_complete to advance.',
38
+ '\n\n激活后,使用 flow_add 添加步骤,flow_complete 推进流程。',
39
39
  inputSchema: {
40
40
  type: 'object',
41
41
  properties: {
@@ -46,7 +46,7 @@ export function createFlowStartTool(registry) {
46
46
  },
47
47
  task: {
48
48
  type: 'string',
49
- description: 'A concise description of the overall task (for todo mode).',
49
+ description: '整体任务的简要描述(用于 todo 模式)。',
50
50
  },
51
51
  },
52
52
  required: ['mode'],
@@ -81,7 +81,7 @@ export function createFlowStartTool(registry) {
81
81
  export function createFlowAddTool(registry) {
82
82
  return {
83
83
  name: 'flow_add',
84
- description: 'Add steps to the current active flow. In todo mode, each step is an execution state. Submit ALL steps at once — do not add them one by one. Steps will be executed in order.',
84
+ description: '向当前活跃 Flow 添加执行步骤。在 todo 模式下,每个步骤是一个执行状态。请一次性提交所有步骤——不要逐个添加。步骤按顺序执行。',
85
85
  inputSchema: {
86
86
  type: 'object',
87
87
  properties: {
@@ -137,7 +137,7 @@ export function createFlowAddTool(registry) {
137
137
  export function createFlowCompleteTool(registry) {
138
138
  return {
139
139
  name: 'flow_complete',
140
- description: 'Complete the current flow step or phase and advance. In definition phase (todo planning), this finishes defining and starts execution. In execution phase, this advances to the next step. On the final step, the flow ends.',
140
+ description: '完成当前 Flow 步骤或阶段并推进。在规划阶段(todo planning),完成步骤定义并进入执行。在执行阶段,推进到下一步。最后一步完成后,Flow 终止。',
141
141
  inputSchema: {
142
142
  type: 'object',
143
143
  properties: {},
@@ -14,7 +14,7 @@ import { GitManager } from '../evolution/git-manager.js';
14
14
  */
15
15
  export declare class GitTool implements Tool {
16
16
  readonly name = "git";
17
- readonly description = "Git version control. Actions: commit (stage all changes and commit with message), revert (stash current changes, revert a commit by hash), branch (create and switch to a new branch), diff (show unstaged changes, use stat=true for summary).";
17
+ readonly description = "Git \u7248\u672C\u63A7\u5236\u3002\u652F\u6301\u56DB\u79CD\u64CD\u4F5C\uFF1Acommit\uFF08\u6682\u5B58\u6240\u6709\u53D8\u66F4\u5E76\u63D0\u4EA4\uFF0C\u9700 message \u53C2\u6570\uFF09\u3001revert\uFF08stash \u5F53\u524D\u53D8\u66F4\u540E\u56DE\u9000\u6307\u5B9A commit\uFF0C\u9700 commit \u53C2\u6570\uFF09\u3001branch\uFF08\u521B\u5EFA\u5E76\u5207\u6362\u5230\u65B0\u5206\u652F\uFF0C\u9700 name \u53C2\u6570\uFF09\u3001diff\uFF08\u67E5\u770B\u672A\u6682\u5B58\u7684\u53D8\u66F4\uFF0Cstat=true \u67E5\u770B\u6458\u8981\uFF09\u3002\u4E0D\u5728 Git \u4ED3\u5E93\u4E2D\u65F6\u8FD4\u56DE\u53CB\u597D\u63D0\u793A\u3002";
18
18
  readonly inputSchema: Record<string, unknown>;
19
19
  private gitManager;
20
20
  private sessionId?;
@@ -12,7 +12,7 @@
12
12
  */
13
13
  export class GitTool {
14
14
  name = 'git';
15
- description = 'Git version control. Actions: commit (stage all changes and commit with message), revert (stash current changes, revert a commit by hash), branch (create and switch to a new branch), diff (show unstaged changes, use stat=true for summary).';
15
+ description = 'Git 版本控制。支持四种操作:commit(暂存所有变更并提交,需 message 参数)、revertstash 当前变更后回退指定 commit,需 commit 参数)、branch(创建并切换到新分支,需 name 参数)、diff(查看未暂存的变更,stat=true 查看摘要)。不在 Git 仓库中时返回友好提示。';
16
16
  inputSchema = {
17
17
  type: 'object',
18
18
  properties: {
@@ -10,7 +10,7 @@ import type { Tool } from './interface.js';
10
10
  */
11
11
  export declare class GlobTool implements Tool {
12
12
  readonly name = "glob";
13
- readonly description = "Find files matching a glob pattern. Returns paths sorted by modification time.";
13
+ readonly description = "\u6309 glob \u6A21\u5F0F\u5339\u914D\u6587\u4EF6\u3002\u8FD4\u56DE\u6309\u4FEE\u6539\u65F6\u95F4\u6392\u5E8F\u7684\u6587\u4EF6\u8DEF\u5F84\u5217\u8868\u3002path \u53C2\u6570\u5FC5\u586B\u2014\u2014\u59CB\u7EC8\u4F20\u5165\u9879\u76EE\u6839\u76EE\u5F55\u3002";
14
14
  readonly inputSchema: Record<string, unknown>;
15
15
  execute(args: Record<string, unknown>): Promise<string>;
16
16
  /**
@@ -11,7 +11,7 @@ import path from 'node:path';
11
11
  */
12
12
  export class GlobTool {
13
13
  name = 'glob';
14
- description = 'Find files matching a glob pattern. Returns paths sorted by modification time.';
14
+ description = ' glob 模式匹配文件。返回按修改时间排序的文件路径列表。path 参数必填——始终传入项目根目录。';
15
15
  inputSchema = {
16
16
  type: 'object',
17
17
  properties: {
@@ -2,7 +2,7 @@ import type { Tool } from './interface.js';
2
2
  export type GrepOutputMode = 'content' | 'files_with_matches' | 'count';
3
3
  export declare class GrepTool implements Tool {
4
4
  readonly name = "grep";
5
- readonly description = "Search file contents with regex patterns (ripgrep). Supports file type filtering, context lines, and multiline mode.";
5
+ readonly description = "\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u641C\u7D22\u6587\u4EF6\u5185\u5BB9\uFF08ripgrep\uFF09\u3002\u652F\u6301\u6587\u4EF6\u7C7B\u578B\u8FC7\u6EE4\uFF08glob\uFF09\u3001\u4E0A\u4E0B\u6587\u884C\uFF08-A/-B/-C\uFF09\u3001\u591A\u884C\u6A21\u5F0F\uFF08multiline\uFF09\u3002path \u53C2\u6570\u5FC5\u586B\u2014\u2014\u59CB\u7EC8\u4F20\u5165\u9879\u76EE\u6839\u76EE\u5F55\u3002output_mode \u53EF\u9009 content\uFF08\u5339\u914D\u884C\uFF09/ files_with_matches\uFF08\u6587\u4EF6\u8DEF\u5F84\uFF09/ count\uFF08\u8BA1\u6570\uFF09\u3002";
6
6
  readonly inputSchema: Record<string, unknown>;
7
7
  execute(args: Record<string, unknown>): Promise<string>;
8
8
  private searchInFile;
@@ -4,7 +4,7 @@ const MAX_FILE_SIZE = 1024 * 1024;
4
4
  const DEFAULT_HEAD_LIMIT = 2000; // ToolResultBuffer handles context protection
5
5
  export class GrepTool {
6
6
  name = 'grep';
7
- description = 'Search file contents with regex patterns (ripgrep). Supports file type filtering, context lines, and multiline mode.';
7
+ description = '用正则表达式搜索文件内容(ripgrep)。支持文件类型过滤(glob)、上下文行(-A/-B/-C)、多行模式(multiline)。path 参数必填——始终传入项目根目录。output_mode 可选 content(匹配行)/ files_with_matches(文件路径)/ count(计数)。';
8
8
  inputSchema = {
9
9
  type: 'object',
10
10
  properties: {
@@ -5,7 +5,7 @@ import type { Tool } from './interface.js';
5
5
  */
6
6
  export declare class HttpRequestTool implements Tool {
7
7
  readonly name = "http_request";
8
- readonly description: string;
8
+ readonly description = "\u53D1\u8D77 HTTP \u8BF7\u6C42\u3002\u652F\u6301 GET / POST / PUT / DELETE / PATCH / HEAD / OPTIONS\uFF0C\u81EA\u5B9A\u4E49 headers\u3001body\u3001\u8D85\u65F6\u548C cookies\u3002\u9ED8\u8BA4 User-Agent \u6A21\u62DF\u6D4F\u89C8\u5668\u3002\u9002\u7528\u4E8E\u8F7B\u91CF\u7F51\u9875\u6293\u53D6\u3001API \u8C03\u8BD5\u548C\u6570\u636E\u83B7\u53D6\u3002\u8FD4\u56DE\u72B6\u6001\u7801\u3001\u54CD\u5E94\u5934\u548C\u54CD\u5E94\u4F53\uFF08\u8D85\u8FC7 50KB \u81EA\u52A8\u622A\u65AD\uFF09\u3002json=true \u65F6\u81EA\u52A8\u8BBE\u7F6E Content-Type \u4E3A application/json\u3002";
9
9
  readonly inputSchema: Record<string, unknown>;
10
10
  private static readonly DEFAULT_UA;
11
11
  private static readonly MAX_RESPONSE_BYTES;
@@ -4,9 +4,7 @@
4
4
  */
5
5
  export class HttpRequestTool {
6
6
  name = 'http_request';
7
- description = 'Make HTTP requests. Supports GET, POST, PUT, DELETE with custom headers, body, timeout, and cookies. ' +
8
- 'Default User-Agent mimics a browser. Use for light web scraping, API debugging, and data fetching. ' +
9
- 'Returns status code, headers, and response body (truncated at 50KB).';
7
+ description = '发起 HTTP 请求。支持 GET / POST / PUT / DELETE / PATCH / HEAD / OPTIONS,自定义 headers、body、超时和 cookies。默认 User-Agent 模拟浏览器。适用于轻量网页抓取、API 调试和数据获取。返回状态码、响应头和响应体(超过 50KB 自动截断)。json=true 时自动设置 Content-Type 为 application/json。';
10
8
  inputSchema = {
11
9
  type: 'object',
12
10
  properties: {
@@ -6,7 +6,7 @@ import type { Tool } from './interface.js';
6
6
  */
7
7
  export declare class InsertTool implements Tool {
8
8
  readonly name = "insert";
9
- readonly description: string;
9
+ readonly description = "\u5728\u6587\u4EF6\u7684\u6307\u5B9A\u884C\u53F7\u4F4D\u7F6E\u63D2\u5165\u5185\u5BB9\u3002line_number=1 \u63D2\u5165\u5230\u6587\u4EF6\u5F00\u5934\u3002line_number=0 \u6216 \"end\" \u8FFD\u52A0\u5230\u6587\u4EF6\u672B\u5C3E\uFF08\u65E0\u9700\u5148\u8BFB\u53D6\u6587\u4EF6\uFF09\u3002\u884C\u4E2D\u63D2\u5165\u65F6\u5148\u7528 grep \u5B9A\u4F4D\u76EE\u6807\u884C\u53F7\u3002";
10
10
  readonly inputSchema: Record<string, unknown>;
11
11
  execute(args: Record<string, unknown>): Promise<string>;
12
12
  }
@@ -6,9 +6,7 @@ import { promises as fs } from 'node:fs';
6
6
  */
7
7
  export class InsertTool {
8
8
  name = 'insert';
9
- description = 'Insert content into a file at a specific line number. ' +
10
- 'line_number=1 inserts at the beginning. line_number=0 or "end" appends to the end (no need to read the file first). ' +
11
- 'Use grep to find the target line number for mid-file insertion.';
9
+ description = '在文件的指定行号位置插入内容。line_number=1 插入到文件开头。line_number=0 "end" 追加到文件末尾(无需先读取文件)。行中插入时先用 grep 定位目标行号。';
12
10
  inputSchema = {
13
11
  type: 'object',
14
12
  properties: {
@@ -8,7 +8,7 @@ import type { Tool } from './interface.js';
8
8
  */
9
9
  export declare class JsonEditTool implements Tool {
10
10
  readonly name = "json_edit";
11
- readonly description: string;
11
+ readonly description = "\u8BFB\u53D6\u6216\u4FEE\u6539 JSON / YAML / TOML \u6587\u4EF6\u4E2D\u6307\u5B9A\u8DEF\u5F84\u7684\u952E\u503C\u3002\u8DEF\u5F84\u4F7F\u7528\u70B9\u53F7\u5206\u9694\uFF08\u5982 \"compilerOptions.target\"\uFF09\u3002\u53EA\u4F20\u8DEF\u5F84\u4E0D\u4F20 value=\u8BFB\u53D6\u5F53\u524D\u503C\uFF1B\u4F20 value=\u5199\u5165\u5E76\u4FDD\u6301\u539F\u683C\u5F0F\u3002\u652F\u6301\u5D4C\u5957\u5BF9\u8C61\u3001\u6570\u7EC4\u5143\u7D20\u548C\u6DF1\u5C42\u8DEF\u5F84\u3002";
12
12
  readonly inputSchema: Record<string, unknown>;
13
13
  execute(args: Record<string, unknown>): Promise<string>;
14
14
  }
@@ -9,11 +9,7 @@ import path from 'node:path';
9
9
  */
10
10
  export class JsonEditTool {
11
11
  name = 'json_edit';
12
- description = 'Read or modify a key in a JSON, YAML, or TOML file by path. ' +
13
- 'Path uses dot notation (e.g. "compilerOptions.target"). ' +
14
- 'Without a value, reads the current value at the path. ' +
15
- 'With a value, sets the key and writes the file back preserving formatting. ' +
16
- 'Supports nested objects, array elements, and deep paths.';
12
+ description = '读取或修改 JSON / YAML / TOML 文件中指定路径的键值。路径使用点号分隔(如 "compilerOptions.target")。只传路径不传 value=读取当前值;传 value=写入并保持原格式。支持嵌套对象、数组元素和深层路径。';
17
13
  inputSchema = {
18
14
  type: 'object',
19
15
  properties: {
@@ -1,7 +1,7 @@
1
1
  import type { Tool } from './interface.js';
2
2
  export declare class MultiEditTool implements Tool {
3
3
  readonly name = "multi_edit";
4
- readonly description: string;
4
+ readonly description = "\u8DE8\u591A\u4E2A\u6587\u4EF6\u6267\u884C\u641C\u7D22\u66FF\u6362\uFF0C\u901A\u8FC7 glob \u6A21\u5F0F\u5339\u914D\u76EE\u6807\u6587\u4EF6\u3002\u652F\u6301 dry_run \u9884\u89C8\u6A21\u5F0F\uFF08\u4EC5\u663E\u793A\u53D8\u66F4\u5185\u5BB9\u4E0D\u5199\u5165\uFF09\u3002\u9ED8\u8BA4\u6700\u591A\u5339\u914D 10 \u4E2A\u6587\u4EF6\u3002replace_all=true \u65F6\u5141\u8BB8\u5355\u6587\u4EF6\u5185\u591A\u6B21\u66FF\u6362\u3002";
5
5
  readonly inputSchema: Record<string, unknown>;
6
6
  execute(args: Record<string, unknown>): Promise<string>;
7
7
  private countOccurrences;
@@ -4,9 +4,7 @@ import { getLastReadTime, recordFileWrite } from './file-tracker.js';
4
4
  import { runDiagnostics } from './diagnostics.js';
5
5
  export class MultiEditTool {
6
6
  name = 'multi_edit';
7
- description = 'Performs search-and-replace across multiple files matching a glob pattern. ' +
8
- 'Supports dry_run preview mode. Default maximum 10 files. ' +
9
- 'Use replace_all=true to allow multiple replacements per file.';
7
+ description = '跨多个文件执行搜索替换,通过 glob 模式匹配目标文件。支持 dry_run 预览模式(仅显示变更内容不写入)。默认最多匹配 10 个文件。replace_all=true 时允许单文件内多次替换。';
10
8
  inputSchema = {
11
9
  type: 'object',
12
10
  properties: {
@@ -2,8 +2,7 @@
2
2
  export function createProcessListTool(registry) {
3
3
  return {
4
4
  name: 'process_list',
5
- description: 'List all background processes started with bash(async:true). ' +
6
- 'Returns handle, command, PID, status (running/stopped/crashed), start time, and output buffer size for each.',
5
+ description: '列出所有通过 bash(async:true) 启动的后台进程。返回每个进程的句柄、命令、PID、状态(运行中/已停止/崩溃)、启动时间和输出缓冲区大小。',
7
6
  inputSchema: {
8
7
  type: 'object',
9
8
  properties: {},
@@ -31,8 +30,7 @@ export function createProcessListTool(registry) {
31
30
  export function createProcessKillTool(registry) {
32
31
  return {
33
32
  name: 'process_kill',
34
- description: 'Stop a background process by its handle (e.g. "bg_001"). ' +
35
- 'Kills the process tree. Use process_list to see available handles.',
33
+ description: '终止指定句柄的后台进程(如 "bg_001")。杀死整个进程树。先用 process_list 查看可用句柄。',
36
34
  inputSchema: {
37
35
  type: 'object',
38
36
  properties: {
@@ -58,8 +56,7 @@ export function createProcessKillTool(registry) {
58
56
  export function createProcessOutputTool(registry) {
59
57
  return {
60
58
  name: 'process_output',
61
- description: 'Read the captured stdout/stderr output of a background process. ' +
62
- 'Returns up to 1000 lines of buffered output. Use process_list to see available handles.',
59
+ description: '读取后台进程已捕获的 stdout/stderr 输出。最多返回缓冲区中 1000 行。先用 process_list 查看可用句柄。',
63
60
  inputSchema: {
64
61
  type: 'object',
65
62
  properties: {
@@ -6,7 +6,7 @@ export interface ImageHandler {
6
6
  }
7
7
  export declare class ReadTool implements Tool {
8
8
  readonly name = "read";
9
- readonly description = "Read a file from disk. Supports offset/limit for chunked reading. Images return dimensions, PDFs return page count. Max 2000 lines per read \u2014 use offset+limit for large files.";
9
+ readonly description = "\u8BFB\u53D6\u78C1\u76D8\u4E0A\u7684\u6587\u4EF6\u3002\u652F\u6301 offset/limit \u5206\u5757\u8BFB\u53D6\u3002\u56FE\u7247\u6587\u4EF6\u8FD4\u56DE\u5C3A\u5BF8\u4FE1\u606F\uFF0CPDF \u8FD4\u56DE\u9875\u6570\u3002\u6BCF\u6B21\u6700\u591A\u8BFB\u53D6 2000 \u884C\uFF0C\u5927\u6587\u4EF6\u8BF7\u7528 offset+limit \u5206\u6BB5\u8BFB\u53D6\u3002";
10
10
  readonly companionDescription = "\u9700\u8981\u770B\u70B9\u522B\u7684\u4E1C\u897F\u4E86\u3002";
11
11
  readonly inputSchema: Record<string, unknown>;
12
12
  private imageHandler;
@@ -206,7 +206,7 @@ async function readPdf(filePath, stat) {
206
206
  // ── ReadTool ────────────────────────────────────────────────────
207
207
  export class ReadTool {
208
208
  name = 'read';
209
- description = 'Read a file from disk. Supports offset/limit for chunked reading. Images return dimensions, PDFs return page count. Max 2000 lines per read — use offset+limit for large files.';
209
+ description = '读取磁盘上的文件。支持 offset/limit 分块读取。图片文件返回尺寸信息,PDF 返回页数。每次最多读取 2000 行,大文件请用 offset+limit 分段读取。';
210
210
  companionDescription = '需要看点别的东西了。';
211
211
  inputSchema = {
212
212
  type: 'object',
@@ -2,7 +2,7 @@ import type { Tool } from './interface.js';
2
2
  export declare class RestartTool implements Tool {
3
3
  private cwd;
4
4
  readonly name = "restart";
5
- readonly description: string;
5
+ readonly description = "\u91CD\u542F Agent \u8FDB\u7A0B\u3002\u5F53\u524D\u4F1A\u8BDD\u81EA\u52A8\u6301\u4E45\u5316\uFF0C\u91CD\u542F\u540E\u81EA\u52A8\u6062\u590D\u3002\u914D\u7F6E\u5DF2\u4FDD\u5B58\uFF0C\u5B50\u8FDB\u7A0B\u4F18\u96C5\u5173\u95ED\u3002\u53EF\u9009\u53C2\u6570 message\uFF1A\u5982\u679C\u63D0\u4F9B\uFF0C\u91CD\u542F\u540E\u81EA\u52A8\u53D1\u9001\u6B64\u6D88\u606F\u7EE7\u7EED\u5DE5\u4F5C\uFF1B\u4E0D\u63D0\u4F9B\u5219\u7B49\u5F85\u7528\u6237\u8F93\u5165\u3002";
6
6
  readonly inputSchema: Record<string, unknown>;
7
7
  constructor(cwd: string);
8
8
  execute(args: Record<string, unknown>): Promise<string>;