@downcity/plugins 1.0.147 → 1.0.148

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 (94) hide show
  1. package/bin/asr/Plugin.js +8 -8
  2. package/bin/asr/Plugin.js.map +1 -1
  3. package/bin/auth/types/AuthPlugin.js +3 -3
  4. package/bin/auth/types/AuthPlugin.js.map +1 -1
  5. package/bin/chat/PROMPT.direct.d.ts +1 -1
  6. package/bin/chat/PROMPT.direct.d.ts.map +1 -1
  7. package/bin/chat/PROMPT.direct.js +1 -1
  8. package/bin/chat/PROMPT.direct.js.map +1 -1
  9. package/bin/chat/channels/feishu/PROMPT.direct.d.ts +1 -1
  10. package/bin/chat/channels/feishu/PROMPT.direct.d.ts.map +1 -1
  11. package/bin/chat/channels/feishu/PROMPT.direct.js +1 -1
  12. package/bin/chat/channels/feishu/PROMPT.direct.js.map +1 -1
  13. package/bin/chat/channels/qq/PROMPT.direct.d.ts +1 -1
  14. package/bin/chat/channels/qq/PROMPT.direct.d.ts.map +1 -1
  15. package/bin/chat/channels/qq/PROMPT.direct.js +1 -1
  16. package/bin/chat/channels/qq/PROMPT.direct.js.map +1 -1
  17. package/bin/chat/runtime/ChatAuthorizationRuntime.js +5 -5
  18. package/bin/chat/runtime/ChatAuthorizationRuntime.js.map +1 -1
  19. package/bin/chat/runtime/ChatPluginActionRegistry.js +61 -61
  20. package/bin/chat/runtime/ChatPluginActionRegistry.js.map +1 -1
  21. package/bin/contact/Action.js +48 -48
  22. package/bin/contact/Action.js.map +1 -1
  23. package/bin/contact/PROMPT.d.ts +1 -1
  24. package/bin/contact/PROMPT.d.ts.map +1 -1
  25. package/bin/contact/PROMPT.js +1 -1
  26. package/bin/contact/PROMPT.js.map +1 -1
  27. package/bin/image/ImagePlugin.js +21 -21
  28. package/bin/image/ImagePlugin.js.map +1 -1
  29. package/bin/memory/MemoryPlugin.js +50 -50
  30. package/bin/memory/MemoryPlugin.js.map +1 -1
  31. package/bin/skill/PROMPT.d.ts +1 -1
  32. package/bin/skill/PROMPT.d.ts.map +1 -1
  33. package/bin/skill/PROMPT.js +1 -1
  34. package/bin/skill/PROMPT.js.map +1 -1
  35. package/bin/skill/Plugin.js +23 -23
  36. package/bin/skill/Plugin.js.map +1 -1
  37. package/bin/task/Action.js +1 -1
  38. package/bin/task/Action.js.map +1 -1
  39. package/bin/task/PROMPT.d.ts +1 -1
  40. package/bin/task/PROMPT.d.ts.map +1 -1
  41. package/bin/task/PROMPT.js +1 -1
  42. package/bin/task/PROMPT.js.map +1 -1
  43. package/bin/task/runtime/Runner.js +2 -2
  44. package/bin/task/runtime/Runner.js.map +1 -1
  45. package/bin/task/runtime/TaskPluginActionRegistry.js +73 -73
  46. package/bin/task/runtime/TaskPluginActionRegistry.js.map +1 -1
  47. package/bin/task/runtime/TaskRunnerProgress.js +1 -1
  48. package/bin/task/runtime/TaskRunnerProgress.js.map +1 -1
  49. package/bin/task/runtime/TaskRunnerScript.js +3 -3
  50. package/bin/task/runtime/TaskRunnerScript.js.map +1 -1
  51. package/bin/tts/Plugin.js +7 -7
  52. package/bin/tts/Plugin.js.map +1 -1
  53. package/bin/web/PROMPT.d.ts +1 -1
  54. package/bin/web/PROMPT.d.ts.map +1 -1
  55. package/bin/web/PROMPT.js +1 -1
  56. package/bin/web/PROMPT.js.map +1 -1
  57. package/bin/web/Plugin.js +8 -8
  58. package/bin/web/Plugin.js.map +1 -1
  59. package/bin/workboard/Plugin.js +2 -2
  60. package/bin/workboard/Plugin.js.map +1 -1
  61. package/bin/workboard/runtime/Normalizer.js +1 -1
  62. package/bin/workboard/runtime/Normalizer.js.map +1 -1
  63. package/package.json +2 -2
  64. package/src/asr/Plugin.ts +8 -8
  65. package/src/auth/types/AuthPlugin.ts +3 -3
  66. package/src/chat/PROMPT.direct.ts +1 -1
  67. package/src/chat/PROMPT.direct.ts.txt +32 -32
  68. package/src/chat/channels/feishu/PROMPT.direct.ts +1 -1
  69. package/src/chat/channels/feishu/PROMPT.direct.ts.txt +2 -2
  70. package/src/chat/channels/qq/PROMPT.direct.ts +1 -1
  71. package/src/chat/channels/qq/PROMPT.direct.ts.txt +11 -9
  72. package/src/chat/runtime/ChatAuthorizationRuntime.ts +5 -5
  73. package/src/chat/runtime/ChatPluginActionRegistry.ts +61 -61
  74. package/src/contact/Action.ts +48 -48
  75. package/src/contact/PROMPT.ts +1 -1
  76. package/src/contact/PROMPT.ts.txt +22 -22
  77. package/src/image/ImagePlugin.ts +21 -21
  78. package/src/memory/MemoryPlugin.ts +50 -50
  79. package/src/skill/PROMPT.ts +1 -1
  80. package/src/skill/PROMPT.ts.txt +5 -6
  81. package/src/skill/Plugin.ts +23 -23
  82. package/src/task/Action.ts +1 -1
  83. package/src/task/PROMPT.ts +1 -1
  84. package/src/task/PROMPT.ts.txt +159 -159
  85. package/src/task/runtime/Runner.ts +2 -2
  86. package/src/task/runtime/TaskPluginActionRegistry.ts +73 -73
  87. package/src/task/runtime/TaskRunnerProgress.ts +1 -1
  88. package/src/task/runtime/TaskRunnerScript.ts +3 -3
  89. package/src/tts/Plugin.ts +7 -7
  90. package/src/web/PROMPT.ts +1 -1
  91. package/src/web/PROMPT.ts.txt +31 -31
  92. package/src/web/Plugin.ts +8 -8
  93. package/src/workboard/Plugin.ts +2 -2
  94. package/src/workboard/runtime/Normalizer.ts +1 -1
@@ -4,6 +4,6 @@
4
4
  */
5
5
 
6
6
  // Source: src/contact/PROMPT.ts.txt
7
- const TEXT_MODULE_CONTENT = "Contact plugin\n\ncontact plugin 用来管理和其他 agent 的联系方式。一个 contact 代表一个已建立联系的远端 agent,并固定拥有一条长期对话历史。contact 可以是单向的:只要本 agent 能访问对方,就可以 checkchatshare。\n\n可用 action:\n- `link`:生成一次性联系码,交给另一个 agent。\n- `approve`:使用对方给的联系码建立 contact。\n- `list`:查看已保存的 agent 联系方式。\n- `check`:检查对方是否在线可用。\n- `chat`:和某个 agent 对话。\n- `share`:分享文本、链接、文件或目录。\n- `inbox`:查看收到的分享。\n- `receive`:接收某条分享。\n\n边界:\n- chat 用于对话,share 用于资料交接。\n- `link` action 返回中的 notes 会说明联系码适合本机、局域网还是公网 agent 使用;本地 localhost 联系码不能交给 server agent approve。\n- public-looking endpoint 仍可能被防火墙/NAT 阻断;以返回的 notes 为准,不要承诺公网一定可达。\n- Agent runtime 会在可用时写入 `DOWNCITY_PUBLIC_HOST` contact link 使用;这不是要求用户手动配置的 token endpoint。\n- `approve` action 会先建立单向关系,再由对方主动 ping 回本 agentping 成功才升级为 bidirectional。\n- local/private agent 连接 public agent 时通常只能 outbound-only,不要说成双向。\n- contact token link/approve 自动交换;不要要求用户手动配置 token 环境变量。\n- `Contact link not found` 表示请求打到的 agent runtime 没有这条 link 记录,优先检查 endpoint/端口/agent 是否一致;过期会明确返回 `Contact link expired`。\n- receive 只接收内容,不自动执行、不安装 skill、不修改项目业务文件。\n- 不自动 approve receive,除非用户明确要求。\n";
7
+ const TEXT_MODULE_CONTENT = "# Contact Plugin\n\nThe contact plugin manages ways to reach other agents. A contact represents an established remote-agent relationship and owns one long-lived conversation history. A contact may be one-way: as long as this agent can reach the other agent, it can `check`, `chat`, and `share`.\n\nAvailable actions:\n- `link`: create a one-time contact code for another agent.\n- `approve`: use a contact code from another agent to establish a contact.\n- `list`: view saved agent contacts.\n- `check`: check whether the other agent is online and reachable.\n- `chat`: talk with a contact.\n- `share`: share text, links, files, or directories.\n- `inbox`: view received shares.\n- `receive`: receive a share.\n\nBoundaries:\n- Use `chat` for conversation and `share` for handing over materials.\n- The notes returned by the `link` action explain whether a contact code is suitable for local-machine, LAN, or public agents. A localhost contact code must not be given to a server agent for `approve`.\n- A public-looking endpoint may still be blocked by firewall or NAT. Trust the returned notes, and do not promise that public access is guaranteed.\n- The Agent runtime writes `DOWNCITY_PUBLIC_HOST` when available for contact links. This is not a token or endpoint that the user must configure manually.\n- The `approve` action first establishes a one-way relationship. The other agent then pings back to this agent, and only a successful ping upgrades the relationship to bidirectional.\n- When a local/private agent connects to a public agent, the connection is usually outbound-only. Do not describe it as bidirectional.\n- Contact tokens are exchanged automatically by `link` and `approve`. Do not ask the user to manually configure token environment variables.\n- `Contact link not found` means the request reached an agent runtime that does not have this link record. First check whether the endpoint, port, and agent match. Expiration is reported explicitly as `Contact link expired`.\n- `receive` only receives content. It does not execute anything, install skills, or modify project business files automatically.\n- Do not automatically approve or receive unless the user explicitly asks.\n";
8
8
 
9
9
  export default TEXT_MODULE_CONTENT;
@@ -1,25 +1,25 @@
1
- Contact plugin
1
+ # Contact Plugin
2
2
 
3
- contact plugin 用来管理和其他 agent 的联系方式。一个 contact 代表一个已建立联系的远端 agent,并固定拥有一条长期对话历史。contact 可以是单向的:只要本 agent 能访问对方,就可以 checkchatshare
3
+ The contact plugin manages ways to reach other agents. A contact represents an established remote-agent relationship and owns one long-lived conversation history. A contact may be one-way: as long as this agent can reach the other agent, it can `check`, `chat`, and `share`.
4
4
 
5
- 可用 action:
6
- - `link`:生成一次性联系码,交给另一个 agent
7
- - `approve`:使用对方给的联系码建立 contact
8
- - `list`:查看已保存的 agent 联系方式。
9
- - `check`:检查对方是否在线可用。
10
- - `chat`:和某个 agent 对话。
11
- - `share`:分享文本、链接、文件或目录。
12
- - `inbox`:查看收到的分享。
13
- - `receive`:接收某条分享。
5
+ Available actions:
6
+ - `link`: create a one-time contact code for another agent.
7
+ - `approve`: use a contact code from another agent to establish a contact.
8
+ - `list`: view saved agent contacts.
9
+ - `check`: check whether the other agent is online and reachable.
10
+ - `chat`: talk with a contact.
11
+ - `share`: share text, links, files, or directories.
12
+ - `inbox`: view received shares.
13
+ - `receive`: receive a share.
14
14
 
15
- 边界:
16
- - chat 用于对话,share 用于资料交接。
17
- - `link` action 返回中的 notes 会说明联系码适合本机、局域网还是公网 agent 使用;本地 localhost 联系码不能交给 server agent approve
18
- - public-looking endpoint 仍可能被防火墙/NAT 阻断;以返回的 notes 为准,不要承诺公网一定可达。
19
- - Agent runtime 会在可用时写入 `DOWNCITY_PUBLIC_HOST` contact link 使用;这不是要求用户手动配置的 token endpoint
20
- - `approve` action 会先建立单向关系,再由对方主动 ping 回本 agentping 成功才升级为 bidirectional
21
- - local/private agent 连接 public agent 时通常只能 outbound-only,不要说成双向。
22
- - contact token link/approve 自动交换;不要要求用户手动配置 token 环境变量。
23
- - `Contact link not found` 表示请求打到的 agent runtime 没有这条 link 记录,优先检查 endpoint/端口/agent 是否一致;过期会明确返回 `Contact link expired`。
24
- - receive 只接收内容,不自动执行、不安装 skill、不修改项目业务文件。
25
- - 不自动 approve receive,除非用户明确要求。
15
+ Boundaries:
16
+ - Use `chat` for conversation and `share` for handing over materials.
17
+ - The notes returned by the `link` action explain whether a contact code is suitable for local-machine, LAN, or public agents. A localhost contact code must not be given to a server agent for `approve`.
18
+ - A public-looking endpoint may still be blocked by firewall or NAT. Trust the returned notes, and do not promise that public access is guaranteed.
19
+ - The Agent runtime writes `DOWNCITY_PUBLIC_HOST` when available for contact links. This is not a token or endpoint that the user must configure manually.
20
+ - The `approve` action first establishes a one-way relationship. The other agent then pings back to this agent, and only a successful ping upgrades the relationship to bidirectional.
21
+ - When a local/private agent connects to a public agent, the connection is usually outbound-only. Do not describe it as bidirectional.
22
+ - Contact tokens are exchanged automatically by `link` and `approve`. Do not ask the user to manually configure token environment variables.
23
+ - `Contact link not found` means the request reached an agent runtime that does not have this link record. First check whether the endpoint, port, and agent match. Expiration is reported explicitly as `Contact link expired`.
24
+ - `receive` only receives content. It does not execute anything, install skills, or modify project business files automatically.
25
+ - Do not automatically approve or receive unless the user explicitly asks.
@@ -535,31 +535,31 @@ export class ImagePlugin extends BasePlugin {
535
535
  "",
536
536
  "## Actions",
537
537
  "",
538
- "- `models`:列出当前可用的图片模型,返回 `{ models }`。",
539
- " 当你不知道应该使用哪个模型,且插件没有默认图片模型时先调用,并让用户或当前任务上下文明确模型 ID",
540
- "- `image_create`:在用户明确确认后创建一个异步图片任务,返回 `{ job_id, status }`。",
541
- " - 纯文本生成:填 `prompt`(字符串)。",
542
- " - 编辑 / 参考图:填 `content`,格式:",
543
- " `[{ type: \"text\", text }, { type: \"image\", url }]`。可以多段文本和多张图任意顺序混排。",
544
- " - 同时给了 `content` `prompt` 时,`content` 生效,`prompt` 被忽略。",
545
- " - `url` 支持三种写法:在线 URL、绝对本地路径、相对 Agent 项目根目录的相对路径。",
546
- " 不要传 base64 / data URL,也不要再用旧的 `messages` 字段。",
547
- " - `model` 可选;未传时使用插件配置的默认图片模型。可选参数:`aspect_ratio`(如 `16:9`)、`size`(如 `1024x1024`)、`quality`、`seed`。",
548
- "- `image_result`:用 `job_id` 读取任务状态。",
549
- " - 默认读取一次。`queued` / `running` 时保存好 `job_id`,下一轮再查,不要在同一轮里反复轮询。",
550
- " - 想直接等到出图,可以传 `until_done: true`,可选 `max_wait_ms`(默认 60000,最长 600000)与 `poll_interval_ms`(默认 1500)。超时仍未完成会返回最后一次的中间状态。",
551
- " - `succeeded`:返回的图片 file part 会自动落盘并附加到下一条 assistant 消息,无需自己再拼图。",
552
- " - 回复用户时,可以在消息中使用 Markdown 图片语法 `![](url)` 渲染图片。",
553
- " - `failed`:把 `error` 信息如实回报给用户,不要编造图片结果。",
538
+ "- `models`: list currently available image models and return `{ models }`.",
539
+ " Call this first when you do not know which model to use and the plugin has no default image model. Let the user or current task context specify the model ID.",
540
+ "- `image_create`: create an async image job after explicit user confirmation, returning `{ job_id, status }`.",
541
+ " - Text-only generation: pass `prompt` as a string.",
542
+ " - Edits or reference images: pass `content` in this shape:",
543
+ " `[{ type: \"text\", text }, { type: \"image\", url }]`. Multiple text parts and images may appear in any order.",
544
+ " - If both `content` and `prompt` are provided, `content` takes effect and `prompt` is ignored.",
545
+ " - `url` supports three forms: online URL, absolute local path, or a relative path from the Agent project root.",
546
+ " Do not pass base64/data URLs, and do not use the legacy `messages` field.",
547
+ " - `model` is optional. If omitted, the plugin-configured default image model is used. Optional parameters include `aspect_ratio` such as `16:9`, `size` such as `1024x1024`, `quality`, and `seed`.",
548
+ "- `image_result`: read job status by `job_id`.",
549
+ " - By default, read once. If the status is `queued` or `running`, save the `job_id` and check again in a later turn; do not repeatedly poll in the same turn.",
550
+ " - To wait for the image directly, pass `until_done: true` with optional `max_wait_ms` (default 60000, max 600000) and `poll_interval_ms` (default 1500). If the wait times out, the latest intermediate status is returned.",
551
+ " - `succeeded`: returned image file parts are automatically written to disk and attached to the next assistant message. You do not need to assemble the image manually.",
552
+ " - When replying to the user, you can render images with Markdown image syntax: `![](url)`.",
553
+ " - `failed`: report the `error` truthfully to the user. Do not invent image results.",
554
554
  "",
555
555
  "## Flow",
556
556
  "",
557
- "1. 如果插件没有默认图片模型,先确认模型 ID;需要选模型时调用 `models`。",
558
- "2. 向用户说明将消耗图片生成额度,并等待用户明确确认。",
559
- "3. 用户确认后调用 `image_create` 拿到 `job_id`。",
560
- "4. `image_result` 查询;短任务可加 `until_done: true` 一次拿结果,长任务保存 `job_id` 下一轮再查。",
557
+ "1. If the plugin has no default image model, confirm the model ID first; call `models` when model selection is needed.",
558
+ "2. Explain to the user that image generation will consume image quota, and wait for explicit confirmation.",
559
+ "3. After the user confirms, call `image_create` to get a `job_id`.",
560
+ "4. Query with `image_result`; short jobs may use `until_done: true` to get the result in one call, while long jobs should save the `job_id` and check again in a later turn.",
561
561
  "",
562
- "如有疑问可用 `plugin_read { plugin: \"image\", action: \"...\" }` 查看每个 action 完整的输入 schema 与示例。",
562
+ "When unsure, use `plugin_read { plugin: \"image\", action: \"...\" }` to inspect each action's complete input schema and examples.",
563
563
  ].join("\n");
564
564
  }
565
565
 
@@ -127,14 +127,14 @@ export class MemoryPlugin extends BasePlugin {
127
127
  */
128
128
  readonly actions: PluginActions = {
129
129
  status: createAction({
130
- description: "查看 memory wiki 状态(wiki/source/working)。",
130
+ description: "View memory wiki status (wiki/source/working).",
131
131
  input_schema: {
132
132
  zod: z.object({}).passthrough(),
133
133
  json_schema: { type: "object", properties: {} },
134
134
  },
135
- examples: [{ title: "查看状态", payload: {} }],
135
+ examples: [{ title: "View status", payload: {} }],
136
136
  command: {
137
- description: "查看 memory wiki 状态(wiki/source/working",
137
+ description: "View memory wiki status (wiki/source/working).",
138
138
  mapInput() {
139
139
  return {};
140
140
  },
@@ -145,7 +145,7 @@ export class MemoryPlugin extends BasePlugin {
145
145
  },
146
146
  }),
147
147
  search: createAction({
148
- description: "检索 memory wiki,可选择是否扩展到 source 层。",
148
+ description: "Search memory wiki, optionally extending into the source layer.",
149
149
  input_schema: {
150
150
  zod: z.object({
151
151
  query: z.string(),
@@ -157,24 +157,24 @@ export class MemoryPlugin extends BasePlugin {
157
157
  type: "object",
158
158
  required: ["query"],
159
159
  properties: {
160
- query: { type: "string", description: "检索关键词" },
161
- maxResults: { type: "number", description: "返回条数上限" },
162
- minScore: { type: "number", description: "最小相关分数" },
163
- includeSources: { type: "boolean", description: "是否包含 source " },
160
+ query: { type: "string", description: "Search query." },
161
+ maxResults: { type: "number", description: "Maximum number of results." },
162
+ minScore: { type: "number", description: "Minimum relevance score." },
163
+ includeSources: { type: "boolean", description: "Whether to include the source layer." },
164
164
  },
165
165
  },
166
166
  },
167
167
  examples: [
168
- { title: "搜索记忆", payload: { query: "用户偏好" } },
168
+ { title: "Search memory", payload: { query: "user preferences" } },
169
169
  ],
170
170
  command: {
171
- description: "检索 memory wiki",
171
+ description: "Search memory wiki.",
172
172
  configure(command: Command) {
173
173
  command
174
174
  .argument("<query>")
175
- .option("--max-results <number>", "返回条数上限", parsePositiveInteger)
176
- .option("--min-score <number>", "最小相关分数", parseNumber)
177
- .option("--include-sources", "同时检索原始 source ");
175
+ .option("--max-results <number>", "Maximum number of results.", parsePositiveInteger)
176
+ .option("--min-score <number>", "Minimum relevance score.", parseNumber)
177
+ .option("--include-sources", "Also search the raw source layer.");
178
178
  },
179
179
  mapInput({ args, opts }) {
180
180
  const payload: JsonObject = {
@@ -204,7 +204,7 @@ export class MemoryPlugin extends BasePlugin {
204
204
  },
205
205
  }),
206
206
  read: createAction({
207
- description: "读取 memory wiki/source 文件片段。",
207
+ description: "Read a memory wiki/source file excerpt.",
208
208
  input_schema: {
209
209
  zod: z.object({
210
210
  path: z.string(),
@@ -215,22 +215,22 @@ export class MemoryPlugin extends BasePlugin {
215
215
  type: "object",
216
216
  required: ["path"],
217
217
  properties: {
218
- path: { type: "string", description: "记忆文件路径(相对项目根目录)" },
219
- from: { type: "number", description: "起始行(1-based" },
220
- lines: { type: "number", description: "读取行数" },
218
+ path: { type: "string", description: "Memory file path relative to the project root." },
219
+ from: { type: "number", description: "Starting line, 1-based." },
220
+ lines: { type: "number", description: "Number of lines to read." },
221
221
  },
222
222
  },
223
223
  },
224
224
  examples: [
225
- { title: "读取整页", payload: { path: ".downcity/memory/wiki/index.md" } },
225
+ { title: "Read full page", payload: { path: ".downcity/memory/wiki/index.md" } },
226
226
  ],
227
227
  command: {
228
- description: "读取 memory wiki/source 文件片段",
228
+ description: "Read a memory wiki/source file excerpt.",
229
229
  configure(command: Command) {
230
230
  command
231
- .argument("<memoryPath>", "记忆文件路径(相对项目根目录)")
232
- .option("--from <number>", "起始行(1-based", parsePositiveInteger)
233
- .option("--lines <number>", "读取行数", parsePositiveInteger);
231
+ .argument("<memoryPath>", "Memory file path relative to the project root.")
232
+ .option("--from <number>", "Starting line, 1-based.", parsePositiveInteger)
233
+ .option("--lines <number>", "Number of lines to read.", parsePositiveInteger);
234
234
  },
235
235
  mapInput({ args, opts }) {
236
236
  const payload: JsonObject = {
@@ -255,7 +255,7 @@ export class MemoryPlugin extends BasePlugin {
255
255
  },
256
256
  }),
257
257
  remember: createAction({
258
- description: "把事实/偏好/决策记入 memory wiki",
258
+ description: "Record facts, preferences, or decisions into memory wiki.",
259
259
  input_schema: {
260
260
  zod: z.object({
261
261
  content: z.string(),
@@ -267,24 +267,24 @@ export class MemoryPlugin extends BasePlugin {
267
267
  type: "object",
268
268
  required: ["content"],
269
269
  properties: {
270
- content: { type: "string", description: "需要记住的内容" },
271
- topic: { type: "string", description: "记忆主题" },
272
- path: { type: "string", description: "目标 wiki page 路径" },
273
- source: { type: "string", description: "来源说明" },
270
+ content: { type: "string", description: "Content to remember." },
271
+ topic: { type: "string", description: "Memory topic." },
272
+ path: { type: "string", description: "Target wiki page path." },
273
+ source: { type: "string", description: "Source note." },
274
274
  },
275
275
  },
276
276
  },
277
277
  examples: [
278
- { title: "记住偏好", payload: { content: "用户偏好简短回答", topic: "user-prefs" } },
278
+ { title: "Remember preference", payload: { content: "User prefers concise answers", topic: "user-prefs" } },
279
279
  ],
280
280
  command: {
281
- description: "把事实/偏好/决策记入 memory wiki",
281
+ description: "Record facts, preferences, or decisions into memory wiki.",
282
282
  configure(command: Command) {
283
283
  command
284
- .requiredOption("--content <text>", "需要记住的内容")
285
- .option("--topic <topic>", "记忆主题")
286
- .option("--wiki-path <path>", "目标 wiki page 路径")
287
- .option("--source <source>", "来源说明");
284
+ .requiredOption("--content <text>", "Content to remember.")
285
+ .option("--topic <topic>", "Memory topic.")
286
+ .option("--wiki-path <path>", "Target wiki page path.")
287
+ .option("--source <source>", "Source note.");
288
288
  },
289
289
  mapInput({ opts }) {
290
290
  const payload: JsonObject = {
@@ -313,7 +313,7 @@ export class MemoryPlugin extends BasePlugin {
313
313
  },
314
314
  }),
315
315
  digest: createAction({
316
- description: " session 提炼进 memory wiki",
316
+ description: "Digest a session into memory wiki.",
317
317
  input_schema: {
318
318
  zod: z.object({
319
319
  sessionId: z.string(),
@@ -323,20 +323,20 @@ export class MemoryPlugin extends BasePlugin {
323
323
  type: "object",
324
324
  required: ["sessionId"],
325
325
  properties: {
326
- sessionId: { type: "string", description: "会话 ID" },
327
- maxMessages: { type: "number", description: "提取消息窗口" },
326
+ sessionId: { type: "string", description: "Session ID." },
327
+ maxMessages: { type: "number", description: "Message extraction window." },
328
328
  },
329
329
  },
330
330
  },
331
331
  examples: [
332
- { title: "提炼会话", payload: { sessionId: "sess-1" } },
332
+ { title: "Digest session", payload: { sessionId: "sess-1" } },
333
333
  ],
334
334
  command: {
335
- description: " session 提炼进 memory wiki",
335
+ description: "Digest a session into memory wiki.",
336
336
  configure(command: Command) {
337
337
  command
338
- .requiredOption("--session-id <sessionId>", "会话 ID")
339
- .option("--max-messages <number>", "提取消息窗口", parsePositiveInteger);
338
+ .requiredOption("--session-id <sessionId>", "Session ID.")
339
+ .option("--max-messages <number>", "Message extraction window.", parsePositiveInteger);
340
340
  },
341
341
  mapInput({ opts }) {
342
342
  const payload: JsonObject = {
@@ -357,7 +357,7 @@ export class MemoryPlugin extends BasePlugin {
357
357
  },
358
358
  }),
359
359
  revise: createAction({
360
- description: "基于新证据修订 memory wiki page",
360
+ description: "Revise a memory wiki page based on new evidence.",
361
361
  input_schema: {
362
362
  zod: z.object({
363
363
  path: z.string(),
@@ -368,25 +368,25 @@ export class MemoryPlugin extends BasePlugin {
368
368
  type: "object",
369
369
  required: ["path", "instruction"],
370
370
  properties: {
371
- path: { type: "string", description: "目标 wiki page 路径" },
372
- instruction: { type: "string", description: "修订指令" },
373
- evidence: { type: "string", description: "新证据" },
371
+ path: { type: "string", description: "Target wiki page path." },
372
+ instruction: { type: "string", description: "Revision instruction." },
373
+ evidence: { type: "string", description: "New evidence." },
374
374
  },
375
375
  },
376
376
  },
377
377
  examples: [
378
378
  {
379
- title: "修订条目",
380
- payload: { path: "wiki/preferences.md", instruction: "替换最新偏好" },
379
+ title: "Revise entry",
380
+ payload: { path: "wiki/preferences.md", instruction: "Replace with latest preference." },
381
381
  },
382
382
  ],
383
383
  command: {
384
- description: "基于新证据修订 memory wiki page",
384
+ description: "Revise a memory wiki page based on new evidence.",
385
385
  configure(command: Command) {
386
386
  command
387
- .argument("<memoryPath>", "目标 wiki page 路径")
388
- .requiredOption("--instruction <text>", "修订指令")
389
- .option("--evidence <text>", "新证据");
387
+ .argument("<memoryPath>", "Target wiki page path.")
388
+ .requiredOption("--instruction <text>", "Revision instruction.")
389
+ .option("--evidence <text>", "New evidence.");
390
390
  },
391
391
  mapInput({ args, opts }) {
392
392
  const payload: JsonObject = {
@@ -4,6 +4,6 @@
4
4
  */
5
5
 
6
6
  // Source: src/skill/PROMPT.ts.txt
7
- const TEXT_MODULE_CONTENT = "# Skill Plugin\n\nskill 是你拥有的技能。用户的提出的需求和任务,你都需要先考虑利用相关的skill来高质量的完成。\n\n\n## 使用\n\n使用技能时需要首先通过 `skill` plugin `lookup` action 载入对应的技能内容。\n\n如果当前工具集中存在 `plugin_call`,使用:\n\n```ts\nplugin_call({\n plugin: \"skill\",\n action: \"lookup\",\n payload: {\n name: \"<skill-name>\",\n },\n});\n```\n\n可用 action 包括 `list`、`find`、`install`、`lookup`。\n";
7
+ const TEXT_MODULE_CONTENT = "# Skill Plugin\n\nSkills are capabilities available to you. For every user request or task, first consider whether a relevant skill can help you complete it with higher quality.\n\n## Usage\n\nBefore using a skill, load its content through the `skill` plugin's `lookup` action.\n\nIf `plugin_call` is available, use:\n\n```ts\nplugin_call({\n plugin: \"skill\",\n action: \"lookup\",\n payload: {\n name: \"<skill-name>\",\n },\n});\n```\n\nAvailable actions include `list`, `find`, `install`, and `lookup`.\n";
8
8
 
9
9
  export default TEXT_MODULE_CONTENT;
@@ -1,13 +1,12 @@
1
1
  # Skill Plugin
2
2
 
3
- skill 是你拥有的技能。用户的提出的需求和任务,你都需要先考虑利用相关的skill来高质量的完成。
3
+ Skills are capabilities available to you. For every user request or task, first consider whether a relevant skill can help you complete it with higher quality.
4
4
 
5
+ ## Usage
5
6
 
6
- ## 使用
7
+ Before using a skill, load its content through the `skill` plugin's `lookup` action.
7
8
 
8
- 使用技能时需要首先通过 `skill` plugin `lookup` action 载入对应的技能内容。
9
-
10
- 如果当前工具集中存在 `plugin_call`,使用:
9
+ If `plugin_call` is available, use:
11
10
 
12
11
  ```ts
13
12
  plugin_call({
@@ -19,4 +18,4 @@ plugin_call({
19
18
  });
20
19
  ```
21
20
 
22
- 可用 action 包括 `list`、`find`、`install`、`lookup`。
21
+ Available actions include `list`, `find`, `install`, and `lookup`.
@@ -108,7 +108,7 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
108
108
  },
109
109
  actions: {
110
110
  [SKILL_PLUGIN_ACTIONS.find]: createAction({
111
- description: "查找 `list` 中不存在的未学会 skills(缺失时再 install)",
111
+ description: "Find unlearned skills that are not in `list`; install only if missing.",
112
112
  input_schema: {
113
113
  zod: z.object({
114
114
  query: z.string(),
@@ -117,18 +117,18 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
117
117
  type: "object",
118
118
  required: ["query"],
119
119
  properties: {
120
- query: { type: "string", description: "Skill 查询词" },
120
+ query: { type: "string", description: "Skill search query." },
121
121
  },
122
122
  },
123
123
  },
124
124
  examples: [
125
125
  {
126
- title: "查找 skill",
126
+ title: "Find skill",
127
127
  payload: { query: "web-search" },
128
128
  },
129
129
  ],
130
130
  command: {
131
- description: "查找 `list` 中不存在的未学会 skills(缺失时再 install)",
131
+ description: "Find unlearned skills that are not in `list`; install only if missing.",
132
132
  configure(command) {
133
133
  command.argument("<query>");
134
134
  },
@@ -151,7 +151,7 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
151
151
  success: true,
152
152
  data: {
153
153
  query: payload.query,
154
- message: "该技能已在 list 中,无需 install。使用前请先执行 lookup",
154
+ message: "This skill is already in list; installation is not needed. Run lookup before using it.",
155
155
  workflow: ["list", "lookup"],
156
156
  nextAction: "lookup",
157
157
  learnedSkill: exactLearned,
@@ -171,7 +171,7 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
171
171
  success: true,
172
172
  data: {
173
173
  query: payload.query,
174
- message: "已执行缺失技能检索;若目标不在 list 中,可 install 后再 lookup",
174
+ message: "Missing-skill search completed. If the target is not in list, install it and then run lookup.",
175
175
  workflow: ["find", "install", "lookup"],
176
176
  nextAction: "install",
177
177
  learnedSkill: null,
@@ -181,7 +181,7 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
181
181
  },
182
182
  }),
183
183
  [SKILL_PLUGIN_ACTIONS.install]: createAction({
184
- description: "安装 `list` 中不存在的 skill(完成后请先 lookup)",
184
+ description: "Install a skill that is not in `list`; run lookup after installation.",
185
185
  input_schema: {
186
186
  zod: z.object({
187
187
  spec: z.string(),
@@ -193,21 +193,21 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
193
193
  type: "object",
194
194
  required: ["spec"],
195
195
  properties: {
196
- spec: { type: "string", description: "Skill 安装 spec" },
197
- global: { type: "boolean", description: "是否全局安装" },
198
- yes: { type: "boolean", description: "跳过确认" },
199
- agent: { type: "string", description: "指定 agent" },
196
+ spec: { type: "string", description: "Skill installation spec." },
197
+ global: { type: "boolean", description: "Whether to install globally." },
198
+ yes: { type: "boolean", description: "Skip confirmation." },
199
+ agent: { type: "string", description: "Target agent." },
200
200
  },
201
201
  },
202
202
  },
203
203
  examples: [
204
204
  {
205
- title: "安装 skill",
205
+ title: "Install skill",
206
206
  payload: { spec: "web-search", global: true, yes: true },
207
207
  },
208
208
  ],
209
209
  command: {
210
- description: "安装 `list` 中不存在的 skill(完成后请先 lookup)",
210
+ description: "Install a skill that is not in `list`; run lookup after installation.",
211
211
  configure(command) {
212
212
  command
213
213
  .argument("<spec>")
@@ -242,7 +242,7 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
242
242
  data: {
243
243
  spec: payload.spec,
244
244
  skipped: true,
245
- message: "技能已在 list 中,无需 install。使用前请先执行 lookup",
245
+ message: "The skill is already in list; installation is not needed. Run lookup before using it.",
246
246
  workflow: ["list", "lookup"],
247
247
  nextAction: "lookup",
248
248
  queryFromSpec,
@@ -268,7 +268,7 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
268
268
  success: true,
269
269
  data: {
270
270
  spec: payload.spec,
271
- message: "技能学习完成。使用技能前请先执行 lookup 读取该技能的 SKILL.md 内容。",
271
+ message: "Skill learning completed. Before using the skill, run lookup to read its SKILL.md content.",
272
272
  workflow: ["find", "install", "lookup"],
273
273
  nextAction: "lookup",
274
274
  skipped: false,
@@ -280,7 +280,7 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
280
280
  },
281
281
  }),
282
282
  [SKILL_PLUGIN_ACTIONS.list]: createAction({
283
- description: "列出当前已学会(本地可发现)的 skills",
283
+ description: "List currently learned skills discoverable locally.",
284
284
  input_schema: {
285
285
  zod: z.object({}).passthrough(),
286
286
  json_schema: {
@@ -290,12 +290,12 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
290
290
  },
291
291
  examples: [
292
292
  {
293
- title: "列出 skills",
293
+ title: "List skills",
294
294
  payload: {},
295
295
  },
296
296
  ],
297
297
  command: {
298
- description: "列出当前已学会(本地可发现)的 skills",
298
+ description: "List currently learned skills discoverable locally.",
299
299
  mapInput() {
300
300
  return {};
301
301
  },
@@ -311,7 +311,7 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
311
311
  },
312
312
  }),
313
313
  [SKILL_PLUGIN_ACTIONS.lookup]: createAction({
314
- description: "读取已学会 skill 内容(SKILL.md",
314
+ description: "Read learned skill content (SKILL.md).",
315
315
  input_schema: {
316
316
  zod: z.object({
317
317
  name: z.string(),
@@ -320,18 +320,18 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
320
320
  type: "object",
321
321
  required: ["name"],
322
322
  properties: {
323
- name: { type: "string", description: "Skill 名称" },
323
+ name: { type: "string", description: "Skill name." },
324
324
  },
325
325
  },
326
326
  },
327
327
  examples: [
328
328
  {
329
- title: "读取 skill",
329
+ title: "Read skill",
330
330
  payload: { name: "web-search" },
331
331
  },
332
332
  ],
333
333
  command: {
334
- description: "读取已学会 skill 内容(SKILL.md",
334
+ description: "Read learned skill content (SKILL.md).",
335
335
  configure(command) {
336
336
  command.argument("<name>");
337
337
  },
@@ -384,7 +384,7 @@ function createSkillPluginDefinition(options: SkillPluginOptions): Plugin {
384
384
  data: {
385
385
  success: true,
386
386
  ...(result.skill ? { skill: result.skill } : {}),
387
- message: "技能内容已准备,下一步将以 `<skill>...</skill>` user message 注入。",
387
+ message: "Skill content is ready. Next it will be injected as a `<skill>...</skill>` user message.",
388
388
  __ship: {
389
389
  injectUserMessages: [
390
390
  {
@@ -396,7 +396,7 @@ export async function runTaskDefinition(params: {
396
396
  success: true,
397
397
  accepted: true,
398
398
  // 关键点(中文):这里直接返回给 agent 作为 tool result,提醒它这是异步任务,无需等待完成即可继续后续流程。
399
- message: "任务已经开始执行,完成后 task 会自动发送给用户。请直接继续后续流程,无需等待 task 完成。",
399
+ message: "The task has started. When it finishes, the task runtime will send the result to the user automatically. Continue the current flow without waiting for the task to complete.",
400
400
  executionId,
401
401
  title,
402
402
  };