@downcity/plugins 1.0.147 → 1.0.149

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 +3 -3
  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
@@ -165,7 +165,7 @@ export function createChatAuthorizationResolves(): PluginResolves {
165
165
  export function createChatAuthorizationActions(): PluginActions {
166
166
  return {
167
167
  [CHAT_AUTHORIZATION_ACTIONS.snapshot]: createAction({
168
- description: "读取 chat 授权快照(catalog/config/users/chats)。",
168
+ description: "Read chat authorization snapshot (catalog/config/users/chats).",
169
169
  input_schema: {
170
170
  zod: z.object({}).passthrough(),
171
171
  json_schema: { type: "object", properties: {} },
@@ -181,7 +181,7 @@ export function createChatAuthorizationActions(): PluginActions {
181
181
  },
182
182
  }),
183
183
  [CHAT_AUTHORIZATION_ACTIONS.readConfig]: createAction({
184
- description: "读取当前 chat 授权配置。",
184
+ description: "Read current chat authorization config.",
185
185
  input_schema: {
186
186
  zod: z.object({}).passthrough(),
187
187
  json_schema: { type: "object", properties: {} },
@@ -194,7 +194,7 @@ export function createChatAuthorizationActions(): PluginActions {
194
194
  },
195
195
  }),
196
196
  [CHAT_AUTHORIZATION_ACTIONS.writeConfig]: createAction({
197
- description: "写入 chat 授权配置(整体覆盖)。",
197
+ description: "Write chat authorization config as a full replacement.",
198
198
  input_schema: {
199
199
  zod: z.object({
200
200
  config: z.record(z.string(), z.unknown()).optional(),
@@ -202,7 +202,7 @@ export function createChatAuthorizationActions(): PluginActions {
202
202
  json_schema: {
203
203
  type: "object",
204
204
  properties: {
205
- config: { type: "object", description: "授权配置" },
205
+ config: { type: "object", description: "Authorization config." },
206
206
  },
207
207
  },
208
208
  },
@@ -225,7 +225,7 @@ export function createChatAuthorizationActions(): PluginActions {
225
225
  },
226
226
  }),
227
227
  [CHAT_AUTHORIZATION_ACTIONS.setUserRole]: createAction({
228
- description: "为某个渠道用户设置角色。",
228
+ description: "Set the role for a channel user.",
229
229
  input_schema: {
230
230
  zod: z.object({
231
231
  channel: z.enum(["telegram", "feishu", "qq"]),
@@ -104,15 +104,15 @@ export function createChatPluginActions(params: {
104
104
  }): PluginActions {
105
105
  return {
106
106
  status: createAction({
107
- description: "查看 chat 渠道连接状态。",
107
+ description: "View chat channel connection status.",
108
108
  input_schema: {
109
109
  zod: z.object({}).passthrough(),
110
110
  json_schema: { type: "object", properties: {}, additionalProperties: true },
111
111
  },
112
112
  command: {
113
- description: "查看 chat 渠道连接状态",
113
+ description: "View chat channel connection status.",
114
114
  configure(command: Command) {
115
- command.option("--channel <name>", "指定渠道(telegram|feishu|qq");
115
+ command.option("--channel <name>", "Specify channel (telegram|feishu|qq).");
116
116
  },
117
117
  mapInput: mapChatChannelCommandInput,
118
118
  },
@@ -125,15 +125,15 @@ export function createChatPluginActions(params: {
125
125
  },
126
126
  }),
127
127
  test: createAction({
128
- description: "测试 chat 渠道连通性。",
128
+ description: "Test chat channel connectivity.",
129
129
  input_schema: {
130
130
  zod: z.object({}).passthrough(),
131
131
  json_schema: { type: "object", properties: {}, additionalProperties: true },
132
132
  },
133
133
  command: {
134
- description: "测试 chat 渠道连通性",
134
+ description: "Test chat channel connectivity.",
135
135
  configure(command: Command) {
136
- command.option("--channel <name>", "指定渠道(telegram|feishu|qq");
136
+ command.option("--channel <name>", "Specify channel (telegram|feishu|qq).");
137
137
  },
138
138
  mapInput: mapChatChannelCommandInput,
139
139
  },
@@ -146,15 +146,15 @@ export function createChatPluginActions(params: {
146
146
  },
147
147
  }),
148
148
  reconnect: createAction({
149
- description: "重连 chat 渠道(默认全部)。",
149
+ description: "Reconnect chat channels, all by default.",
150
150
  input_schema: {
151
151
  zod: z.object({}).passthrough(),
152
152
  json_schema: { type: "object", properties: {}, additionalProperties: true },
153
153
  },
154
154
  command: {
155
- description: "重连 chat 渠道(默认全部)",
155
+ description: "Reconnect chat channels, all by default.",
156
156
  configure(command: Command) {
157
- command.option("--channel <name>", "指定渠道(telegram|feishu|qq");
157
+ command.option("--channel <name>", "Specify channel (telegram|feishu|qq).");
158
158
  },
159
159
  mapInput: mapChatChannelCommandInput,
160
160
  },
@@ -167,15 +167,15 @@ export function createChatPluginActions(params: {
167
167
  },
168
168
  }),
169
169
  open: createAction({
170
- description: "打开(启用)指定 chat 渠道。",
170
+ description: "Open and enable the specified chat channel.",
171
171
  input_schema: {
172
172
  zod: z.object({}).passthrough(),
173
173
  json_schema: { type: "object", properties: {}, additionalProperties: true },
174
174
  },
175
175
  command: {
176
- description: "打开 chat 渠道(enabled=true,已配置则尝试启动)",
176
+ description: "Open chat channel (enabled=true, and start it if configured).",
177
177
  configure(command: Command) {
178
- command.option("--channel <name>", "指定渠道(telegram|feishu|qq");
178
+ command.option("--channel <name>", "Specify channel (telegram|feishu|qq).");
179
179
  },
180
180
  mapInput: mapChatChannelCommandInput,
181
181
  },
@@ -188,15 +188,15 @@ export function createChatPluginActions(params: {
188
188
  },
189
189
  }),
190
190
  close: createAction({
191
- description: "关闭(禁用)指定 chat 渠道。",
191
+ description: "Close and disable the specified chat channel.",
192
192
  input_schema: {
193
193
  zod: z.object({}).passthrough(),
194
194
  json_schema: { type: "object", properties: {}, additionalProperties: true },
195
195
  },
196
196
  command: {
197
- description: "关闭 chat 渠道(enabled=false,并停止运行)",
197
+ description: "Close chat channel (enabled=false and stop runtime).",
198
198
  configure(command: Command) {
199
- command.option("--channel <name>", "指定渠道(telegram|feishu|qq");
199
+ command.option("--channel <name>", "Specify channel (telegram|feishu|qq).");
200
200
  },
201
201
  mapInput: mapChatChannelCommandInput,
202
202
  },
@@ -209,15 +209,15 @@ export function createChatPluginActions(params: {
209
209
  },
210
210
  }),
211
211
  configuration: createAction({
212
- description: "查看 chat 渠道配置元信息。",
212
+ description: "View chat channel configuration metadata.",
213
213
  input_schema: {
214
214
  zod: z.object({}).passthrough(),
215
215
  json_schema: { type: "object", properties: {}, additionalProperties: true },
216
216
  },
217
217
  command: {
218
- description: "查看 chat 渠道配置元信息(字段、类型、说明)",
218
+ description: "View chat channel configuration metadata (fields, types, descriptions).",
219
219
  configure(command: Command) {
220
- command.option("--channel <name>", "指定渠道(telegram|feishu|qq");
220
+ command.option("--channel <name>", "Specify channel (telegram|feishu|qq).");
221
221
  },
222
222
  mapInput: mapChatChannelCommandInput,
223
223
  },
@@ -229,21 +229,21 @@ export function createChatPluginActions(params: {
229
229
  },
230
230
  }),
231
231
  configure: createAction({
232
- description: "更新 chat 渠道运行态参数。",
232
+ description: "Update runtime parameters for a chat channel.",
233
233
  input_schema: {
234
234
  zod: z.object({}).passthrough(),
235
235
  json_schema: { type: "object", properties: {}, additionalProperties: true },
236
236
  },
237
237
  command: {
238
- description: "更新 chat 渠道运行态参数(可选立即重载)",
238
+ description: "Update runtime parameters for a chat channel, optionally restarting it immediately.",
239
239
  configure(command: Command) {
240
240
  command
241
- .requiredOption("--channel <name>", "指定渠道(telegram|feishu|qq")
241
+ .requiredOption("--channel <name>", "Specify channel (telegram|feishu|qq).")
242
242
  .requiredOption(
243
243
  "--config-json <json>",
244
- "配置 patch JSON(例如 '{\"channelAccountId\":\"qq-main\",\"enabled\":true}'",
244
+ "Configuration patch JSON, for example '{\"channelAccountId\":\"qq-main\",\"enabled\":true}'.",
245
245
  )
246
- .option("--restart", "配置后立即重载渠道", false);
246
+ .option("--restart", "Restart the channel immediately after configuration.", false);
247
247
  },
248
248
  mapInput: mapChatConfigureCommandInput,
249
249
  },
@@ -256,18 +256,18 @@ export function createChatPluginActions(params: {
256
256
  },
257
257
  }),
258
258
  list: createAction({
259
- description: "列出当前 agent 已记录的 chat 会话。",
259
+ description: "List chat conversations recorded by the current agent.",
260
260
  input_schema: {
261
261
  zod: z.object({}).passthrough(),
262
262
  json_schema: { type: "object", properties: {}, additionalProperties: true },
263
263
  },
264
264
  command: {
265
- description: "列出当前 agent 已记录的 chat 会话(chatTitle/chatKey",
265
+ description: "List chat conversations recorded by the current agent (chatTitle/chatKey).",
266
266
  configure(command: Command) {
267
267
  command
268
- .option("--channel <name>", "渠道过滤(telegram|feishu|qq")
269
- .option("--limit <n>", "返回最近 N 条(默认 50")
270
- .option("--q <text>", "关键词过滤(title/chatId/sessionId/actor");
268
+ .option("--channel <name>", "Filter by channel (telegram|feishu|qq).")
269
+ .option("--limit <n>", "Return the latest N records, default 50.")
270
+ .option("--q <text>", "Keyword filter (title/chatId/sessionId/actor).");
271
271
  },
272
272
  mapInput: mapChatListCommandInput,
273
273
  },
@@ -279,17 +279,17 @@ export function createChatPluginActions(params: {
279
279
  },
280
280
  }),
281
281
  info: createAction({
282
- description: "查看指定 chat 会话的路由/路径/上下文快照。",
282
+ description: "View route, paths, and context snapshot for a specified chat conversation.",
283
283
  input_schema: {
284
284
  zod: z.object({}).passthrough(),
285
285
  json_schema: { type: "object", properties: {}, additionalProperties: true },
286
286
  },
287
287
  command: {
288
- description: "查看指定 chat 会话信息(路由/本地路径/上下文快照)",
288
+ description: "View specified chat conversation info (route/local paths/context snapshot).",
289
289
  configure(command: Command) {
290
290
  command
291
- .option("--chat-key <chatKey>", "目标 chatKey(不传则尝试读取 DC_CTX_CHAT_KEY")
292
- .option("--session-id <sessionId>", "显式指定 sessionId(优先级更高)");
291
+ .option("--chat-key <chatKey>", "Target chatKey; reads DC_CTX_CHAT_KEY if omitted.")
292
+ .option("--session-id <sessionId>", "Explicit sessionId, with higher priority.");
293
293
  },
294
294
  mapInput: mapChatInfoCommandInput,
295
295
  },
@@ -301,23 +301,23 @@ export function createChatPluginActions(params: {
301
301
  },
302
302
  }),
303
303
  send: createAction({
304
- description: "向目标 chatKey 发送消息(支持文本/附件/延迟)。",
304
+ description: "Send a message to the target chatKey, supporting text, attachments, and delay.",
305
305
  input_schema: {
306
306
  zod: z.object({}).passthrough(),
307
307
  json_schema: { type: "object", properties: {}, additionalProperties: true },
308
308
  },
309
309
  command: {
310
- description: "发送消息到目标 chatKey",
310
+ description: "Send a message to the target chatKey.",
311
311
  configure(command: Command) {
312
312
  command
313
- .option("--text <text>", "消息正文")
314
- .option("--stdin", "从标准输入读取消息正文", false)
315
- .option("--text-file <file>", "从文件读取消息正文(相对当前目录)")
316
- .option("--reply", "显式使用 reply_to_message 回复目标消息", false)
317
- .option("--message-id <id>", "显式指定 reply 目标消息 ID")
313
+ .option("--text <text>", "Message body.")
314
+ .option("--stdin", "Read message body from stdin.", false)
315
+ .option("--text-file <file>", "Read message body from a file relative to the current directory.")
316
+ .option("--reply", "Explicitly reply to the target message with reply_to_message.", false)
317
+ .option("--message-id <id>", "Explicit reply target message ID.")
318
318
  .option(
319
319
  "--chat-key <chatKey>",
320
- "目标 chatKey(不传则尝试读取 DC_CTX_CHAT_KEY",
320
+ "Target chatKey; reads DC_CTX_CHAT_KEY if omitted.",
321
321
  );
322
322
  attachCommandHelpText(command, CHAT_SEND_HELP_TEXT);
323
323
  },
@@ -331,21 +331,21 @@ export function createChatPluginActions(params: {
331
331
  },
332
332
  }),
333
333
  react: createAction({
334
- description: "给目标消息贴表情(当前仅 Telegram 支持)。",
334
+ description: "React to a target message, currently supported only by Telegram.",
335
335
  input_schema: {
336
336
  zod: z.object({}).passthrough(),
337
337
  json_schema: { type: "object", properties: {}, additionalProperties: true },
338
338
  },
339
339
  command: {
340
- description: "给目标消息贴表情(当前仅 Telegram 支持)",
340
+ description: "React to a target message, currently supported only by Telegram.",
341
341
  configure(command: Command) {
342
342
  command
343
- .option("--emoji <emoji>", "表情字符(默认 👍)")
344
- .option("--big", "使用大表情效果(Telegram is_big", false)
345
- .option("--message-id <id>", "目标消息 ID(默认尝试从 chat meta 回填)")
343
+ .option("--emoji <emoji>", "Emoji character, default thumbs-up.")
344
+ .option("--big", "Use large reaction effect (Telegram is_big).", false)
345
+ .option("--message-id <id>", "Target message ID; defaults to chat meta when available.")
346
346
  .option(
347
347
  "--chat-key <chatKey>",
348
- "目标 chatKey(不传则尝试读取 DC_CTX_CHAT_KEY",
348
+ "Target chatKey; reads DC_CTX_CHAT_KEY if omitted.",
349
349
  );
350
350
  attachCommandHelpText(command, CHAT_REACT_HELP_TEXT);
351
351
  },
@@ -359,15 +359,15 @@ export function createChatPluginActions(params: {
359
359
  },
360
360
  }),
361
361
  context: createAction({
362
- description: "查看当前会话上下文快照。",
362
+ description: "View current conversation context snapshot.",
363
363
  input_schema: {
364
364
  zod: z.object({}).passthrough(),
365
365
  json_schema: { type: "object", properties: {}, additionalProperties: true },
366
366
  },
367
367
  command: {
368
- description: "查看当前会话上下文快照",
368
+ description: "View current conversation context snapshot.",
369
369
  configure(command: Command) {
370
- command.option("--chat-key <chatKey>", "显式覆盖 chatKey");
370
+ command.option("--chat-key <chatKey>", "Explicitly override chatKey.");
371
371
  },
372
372
  mapInput(input) {
373
373
  const chatKey =
@@ -385,17 +385,17 @@ export function createChatPluginActions(params: {
385
385
  },
386
386
  }),
387
387
  delete: createAction({
388
- description: "彻底删除指定 chat 会话(映射+历史+context)。",
388
+ description: "Permanently delete a specified chat conversation, including mapping, history, and context.",
389
389
  input_schema: {
390
390
  zod: z.object({}).passthrough(),
391
391
  json_schema: { type: "object", properties: {}, additionalProperties: true },
392
392
  },
393
393
  command: {
394
- description: "彻底删除指定 chat 会话(映射+历史+context",
394
+ description: "Permanently delete a specified chat conversation, including mapping, history, and context.",
395
395
  configure(command: Command) {
396
396
  command
397
- .option("--chat-key <chatKey>", "显式指定 chatKey")
398
- .option("--session-id <sessionId>", "显式指定 sessionId");
397
+ .option("--chat-key <chatKey>", "Explicit chatKey.")
398
+ .option("--session-id <sessionId>", "Explicit sessionId.");
399
399
  },
400
400
  mapInput: mapChatDeleteCommandInput,
401
401
  },
@@ -407,24 +407,24 @@ export function createChatPluginActions(params: {
407
407
  },
408
408
  }),
409
409
  history: createAction({
410
- description: "读取 chat 历史消息。",
410
+ description: "Read chat history messages.",
411
411
  input_schema: {
412
412
  zod: z.object({}).passthrough(),
413
413
  json_schema: { type: "object", properties: {}, additionalProperties: true },
414
414
  },
415
415
  command: {
416
- description: "读取 chat 历史消息(默认最近 30 条)",
416
+ description: "Read chat history messages, defaulting to the latest 30.",
417
417
  configure(command: Command) {
418
418
  command
419
- .option("--chat-key <chatKey>", "显式覆盖 chatKey")
420
- .option("--session-id <sessionId>", "显式覆盖 sessionId")
421
- .option("--limit <n>", "返回最近 N 条(默认 30")
419
+ .option("--chat-key <chatKey>", "Explicitly override chatKey.")
420
+ .option("--session-id <sessionId>", "Explicitly override sessionId.")
421
+ .option("--limit <n>", "Return the latest N records, default 30.")
422
422
  .option(
423
423
  "--direction <direction>",
424
- "方向过滤(all|inbound|outbound",
424
+ "Direction filter (all|inbound|outbound).",
425
425
  )
426
- .option("--before-ts <ts>", "仅返回 ts 小于该值的记录(毫秒)")
427
- .option("--after-ts <ts>", "仅返回 ts 大于该值的记录(毫秒)");
426
+ .option("--before-ts <ts>", "Return only records with ts lower than this value, in milliseconds.")
427
+ .option("--after-ts <ts>", "Return only records with ts greater than this value, in milliseconds.");
428
428
  },
429
429
  mapInput: mapChatHistoryCommandInput,
430
430
  },
@@ -97,21 +97,21 @@ export type ContactActionHandlers = {
97
97
  export function createContactActions(handlers: ContactActionHandlers): PluginActions {
98
98
  return {
99
99
  link: createAction({
100
- description: "生成一次性 contact link code,供其他 agent approve",
100
+ description: "Create a one-time contact link code for another agent to approve.",
101
101
  input_schema: {
102
102
  zod: z.object({ ttlSeconds: z.number().optional() }),
103
103
  json_schema: {
104
104
  type: "object",
105
105
  properties: {
106
- ttlSeconds: { type: "number", description: "link 过期秒数,默认 600" },
106
+ ttlSeconds: { type: "number", description: "Link expiration in seconds, defaulting to 600." },
107
107
  },
108
108
  },
109
109
  },
110
- examples: [{ title: "生成默认 link", payload: {} }],
110
+ examples: [{ title: "Create default link", payload: {} }],
111
111
  command: {
112
- description: "生成一次性 contact link code,交给另一个 agent approve",
112
+ description: "Create a one-time contact link code for another agent to approve.",
113
113
  configure(command) {
114
- command.option("--ttl-seconds <seconds>", "link 过期秒数,默认 600", Number);
114
+ command.option("--ttl-seconds <seconds>", "Link expiration in seconds, defaulting to 600.", Number);
115
115
  },
116
116
  mapInput({ opts }) {
117
117
  const payload: JsonObject = {};
@@ -128,7 +128,7 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
128
128
  }),
129
129
  }),
130
130
  approve: createAction({
131
- description: "使用 contact link code 建立点对点联系。",
131
+ description: "Use a contact link code to establish a peer-to-peer contact.",
132
132
  input_schema: {
133
133
  zod: z.object({
134
134
  code: z.string(),
@@ -139,7 +139,7 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
139
139
  required: ["code"],
140
140
  properties: {
141
141
  code: { type: "string", description: "link code" },
142
- name: { type: "string", description: "本地 contact 别名" },
142
+ name: { type: "string", description: "Local contact alias." },
143
143
  },
144
144
  },
145
145
  },
@@ -147,11 +147,11 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
147
147
  { title: "approve link", payload: { code: "abc123", name: "alice" } },
148
148
  ],
149
149
  command: {
150
- description: "使用 contact link code 建立点对点联系",
150
+ description: "Use a contact link code to establish a peer-to-peer contact.",
151
151
  configure(command) {
152
152
  command
153
153
  .argument("<code>")
154
- .option("--name <alias>", "本地 contact 别名");
154
+ .option("--name <alias>", "Local contact alias.");
155
155
  },
156
156
  mapInput({ args, opts }) {
157
157
  const code = String(args[0] || "").trim();
@@ -170,14 +170,14 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
170
170
  }),
171
171
  }),
172
172
  list: createAction({
173
- description: "列出已建立的 contact。",
173
+ description: "List established contacts.",
174
174
  input_schema: {
175
175
  zod: z.object({}).passthrough(),
176
176
  json_schema: { type: "object", properties: {} },
177
177
  },
178
- examples: [{ title: "列出 contact", payload: {} }],
178
+ examples: [{ title: "List contacts", payload: {} }],
179
179
  command: {
180
- description: "列出已建立的 contact",
180
+ description: "List established contacts.",
181
181
  mapInput() {
182
182
  return {};
183
183
  },
@@ -190,7 +190,7 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
190
190
  }),
191
191
  }),
192
192
  check: createAction({
193
- description: "检查 contact endpoint 当前是否在线可用。",
193
+ description: "Check whether a contact or endpoint is currently online and reachable.",
194
194
  input_schema: {
195
195
  zod: z.object({
196
196
  target: z.string().optional(),
@@ -199,21 +199,21 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
199
199
  json_schema: {
200
200
  type: "object",
201
201
  properties: {
202
- target: { type: "string", description: "已保存的 contact " },
203
- endpoint: { type: "string", description: "直接检查的 endpoint" },
202
+ target: { type: "string", description: "Saved contact name." },
203
+ endpoint: { type: "string", description: "Endpoint to check directly." },
204
204
  },
205
205
  },
206
206
  },
207
207
  examples: [
208
- { title: "检查 contact", payload: { target: "alice" } },
209
- { title: "检查 endpoint", payload: { endpoint: "https://example.com" } },
208
+ { title: "Check contact", payload: { target: "alice" } },
209
+ { title: "Check endpoint", payload: { endpoint: "https://example.com" } },
210
210
  ],
211
211
  command: {
212
- description: "检查 contact endpoint 当前是否在线可用",
212
+ description: "Check whether a contact or endpoint is currently online and reachable.",
213
213
  configure(command) {
214
214
  command
215
215
  .argument("[target]")
216
- .option("--to <endpoint>", "直接检查未保存的 endpoint");
216
+ .option("--to <endpoint>", "Directly check an unsaved endpoint.");
217
217
  },
218
218
  mapInput({ args, opts }) {
219
219
  const payload: JsonObject = {};
@@ -232,7 +232,7 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
232
232
  }),
233
233
  }),
234
234
  chat: createAction({
235
- description: "和某个 contact 的长期对话线聊天,或读取对话历史。",
235
+ description: "Chat with a contact in its long-lived conversation thread, or read conversation history.",
236
236
  input_schema: {
237
237
  zod: z.object({
238
238
  to: z.string(),
@@ -242,19 +242,19 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
242
242
  type: "object",
243
243
  required: ["to"],
244
244
  properties: {
245
- to: { type: "string", description: "目标 contact" },
246
- message: { type: "string", description: "要发送的消息" },
245
+ to: { type: "string", description: "Target contact." },
246
+ message: { type: "string", description: "Message to send." },
247
247
  },
248
248
  },
249
249
  },
250
250
  examples: [
251
- { title: "发送消息", payload: { to: "alice", message: "hello" } },
252
- { title: "读取历史", payload: { to: "alice" } },
251
+ { title: "Send message", payload: { to: "alice", message: "hello" } },
252
+ { title: "Read history", payload: { to: "alice" } },
253
253
  ],
254
254
  command: {
255
- description: "和某个 contact 的长期对话线聊天",
255
+ description: "Chat with a contact in its long-lived conversation thread.",
256
256
  configure(command) {
257
- command.requiredOption("--to <contact>", "目标 contact").argument("[message...]");
257
+ command.requiredOption("--to <contact>", "Target contact.").argument("[message...]");
258
258
  },
259
259
  mapInput({ args, opts }) {
260
260
  const payload: JsonObject = {
@@ -274,7 +274,7 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
274
274
  }),
275
275
  }),
276
276
  share: createAction({
277
- description: " contact 分享文本、链接、文件或目录。",
277
+ description: "Share text, links, files, or directories with a contact.",
278
278
  input_schema: {
279
279
  zod: z.object({
280
280
  to: z.string(),
@@ -286,26 +286,26 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
286
286
  type: "object",
287
287
  required: ["to"],
288
288
  properties: {
289
- to: { type: "string", description: "目标 contact" },
290
- text: { type: "string", description: "分享文本" },
291
- links: { type: "array", items: { type: "string" }, description: "分享链接" },
292
- paths: { type: "array", items: { type: "string" }, description: "分享文件/目录路径" },
289
+ to: { type: "string", description: "Target contact." },
290
+ text: { type: "string", description: "Text to share." },
291
+ links: { type: "array", items: { type: "string" }, description: "Links to share." },
292
+ paths: { type: "array", items: { type: "string" }, description: "File or directory paths to share." },
293
293
  },
294
294
  },
295
295
  },
296
296
  examples: [
297
297
  {
298
- title: "分享一段文本",
298
+ title: "Share text",
299
299
  payload: { to: "alice", text: "看看这个" },
300
300
  },
301
301
  ],
302
302
  command: {
303
- description: " contact 分享文本、链接、文件或目录",
303
+ description: "Share text, links, files, or directories with a contact.",
304
304
  configure(command) {
305
305
  command
306
- .requiredOption("--to <contact>", "目标 contact")
307
- .option("--text <text>", "分享文本")
308
- .option("--link <url...>", "分享链接")
306
+ .requiredOption("--to <contact>", "Target contact.")
307
+ .option("--text <text>", "Text to share.")
308
+ .option("--link <url...>", "Links to share.")
309
309
  .argument("[paths...]");
310
310
  },
311
311
  mapInput({ args, opts }) {
@@ -331,14 +331,14 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
331
331
  }),
332
332
  }),
333
333
  inbox: createAction({
334
- description: "查看 contact inbox",
334
+ description: "View the contact inbox.",
335
335
  input_schema: {
336
336
  zod: z.object({}).passthrough(),
337
337
  json_schema: { type: "object", properties: {} },
338
338
  },
339
- examples: [{ title: "查看 inbox", payload: {} }],
339
+ examples: [{ title: "View inbox", payload: {} }],
340
340
  command: {
341
- description: "查看 contact inbox",
341
+ description: "View the contact inbox.",
342
342
  mapInput() {
343
343
  return {};
344
344
  },
@@ -351,20 +351,20 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
351
351
  }),
352
352
  }),
353
353
  receive: createAction({
354
- description: "接收 inbox 中的 share。",
354
+ description: "Receive a share from the inbox.",
355
355
  input_schema: {
356
356
  zod: z.object({ shareId: z.string() }),
357
357
  json_schema: {
358
358
  type: "object",
359
359
  required: ["shareId"],
360
360
  properties: {
361
- shareId: { type: "string", description: "inbox 中的 shareId" },
361
+ shareId: { type: "string", description: "Share ID from the inbox." },
362
362
  },
363
363
  },
364
364
  },
365
- examples: [{ title: "接收 share", payload: { shareId: "share_1" } }],
365
+ examples: [{ title: "Receive share", payload: { shareId: "share_1" } }],
366
366
  command: {
367
- description: "接收 inbox 中的 share",
367
+ description: "Receive a share from the inbox.",
368
368
  configure(command) {
369
369
  command.argument("<shareId>");
370
370
  },
@@ -383,7 +383,7 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
383
383
  }),
384
384
  }),
385
385
  remoteping: createAction({
386
- description: "处理远端 ping 请求(内部 endpoint)。",
386
+ description: "Handle a remote ping request (internal endpoint).",
387
387
  execute: async (params) => ({
388
388
  success: true,
389
389
  data: (await handlers.remotePing(
@@ -393,7 +393,7 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
393
393
  }),
394
394
  }),
395
395
  remoteapprove: createAction({
396
- description: "处理远端 approve 请求(内部 endpoint)。",
396
+ description: "Handle a remote approve request (internal endpoint).",
397
397
  execute: async (params) => ({
398
398
  success: true,
399
399
  data: (await handlers.remoteApprove(
@@ -403,7 +403,7 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
403
403
  }),
404
404
  }),
405
405
  remoteconfirm: createAction({
406
- description: "处理远端 confirm 请求(内部 endpoint)。",
406
+ description: "Handle a remote confirm request (internal endpoint).",
407
407
  execute: async (params) => ({
408
408
  success: true,
409
409
  data: (await handlers.remoteConfirm(
@@ -413,7 +413,7 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
413
413
  }),
414
414
  }),
415
415
  remotechat: createAction({
416
- description: "处理远端 chat 请求(内部 endpoint)。",
416
+ description: "Handle a remote chat request (internal endpoint).",
417
417
  execute: async (params) => {
418
418
  const payload = readContactObject(params.input);
419
419
  const body = readContactObject(payload.body);
@@ -428,7 +428,7 @@ export function createContactActions(handlers: ContactActionHandlers): PluginAct
428
428
  },
429
429
  }),
430
430
  remoteshare: createAction({
431
- description: "处理远端 share 请求(内部 endpoint)。",
431
+ description: "Handle a remote share request (internal endpoint).",
432
432
  execute: async (params) => ({
433
433
  success: true,
434
434
  data: (await handlers.remoteShare(params.context, params.input)) as unknown as JsonValue,