@keyou007/agent-bot 0.1.23 → 0.1.24-alpha.0
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.
- package/CHANGELOG.md +7 -0
- package/README.md +14 -0
- package/README.zh.md +14 -0
- package/dist/cli/controlProtocol.js.map +1 -1
- package/dist/cli/help.js +4 -0
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/taskGroupOptions.js +27 -0
- package/dist/cli/taskGroupOptions.js.map +1 -1
- package/dist/cli.js +21 -1
- package/dist/cli.js.map +1 -1
- package/dist/codex/CodexProcessManager.js +19 -3
- package/dist/codex/CodexProcessManager.js.map +1 -1
- package/dist/codex/CodexRuntime.js +92 -9
- package/dist/codex/CodexRuntime.js.map +1 -1
- package/dist/commands/CommandRouter.js +27 -0
- package/dist/commands/CommandRouter.js.map +1 -1
- package/dist/feishu/FeishuMessageClient.js +4 -1
- package/dist/feishu/FeishuMessageClient.js.map +1 -1
- package/dist/feishu/MergedForwardMessage.js +17 -7
- package/dist/feishu/MergedForwardMessage.js.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/proxy/ConversationExport.js +41 -0
- package/dist/proxy/ConversationExport.js.map +1 -0
- package/dist/proxy/ProxySessionController.js +106 -5
- package/dist/proxy/ProxySessionController.js.map +1 -1
- package/dist/state/StateStore.js +40 -0
- package/dist/state/StateStore.js.map +1 -1
- package/docs/technical-reference.md +4 -0
- package/docs/technical-reference.zh.md +4 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/skills/agent-bot/SKILL.md +9 -0
- package/src/cli/controlProtocol.ts +9 -0
- package/src/cli/help.ts +4 -0
- package/src/cli/taskGroupOptions.ts +33 -3
- package/src/cli.ts +21 -0
- package/src/codex/CodexProcessManager.ts +21 -4
- package/src/codex/CodexRuntime.ts +104 -12
- package/src/commands/CommandRouter.ts +24 -0
- package/src/commands/commandTypes.ts +1 -0
- package/src/feishu/FeishuMessageClient.ts +4 -1
- package/src/feishu/MergedForwardMessage.ts +29 -7
- package/src/index.ts +9 -0
- package/src/proxy/ConversationExport.ts +43 -0
- package/src/proxy/ProxySessionController.ts +152 -6
- package/src/runtime/types.ts +6 -0
- package/src/state/StateStore.ts +38 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@ The project follows [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.24-alpha.0] - 2026-09-17
|
|
10
|
+
|
|
11
|
+
- Load each Codex Agent's `CODEX_HOME/.env` at Worker startup for Provider model discovery and the Codex process, without overriding existing environment or explicit Agent settings or sharing those values with other Agents.
|
|
12
|
+
- Retrieve original quoted and merged-forwarded card content, including available text and images, instead of client-upgrade placeholders.
|
|
13
|
+
- Retry ignored Provider and model changes on a thread forked through the latest completed Turn, verify the result before rebinding, and preserve the previous settings on failure.
|
|
14
|
+
- Add `/clone`, `/clonegroup`, and matching CLI commands to transfer user Prompts and final answers into a fresh task, optionally on another Agent or in a new group, without copying reasoning, tool logs, or image payloads.
|
|
15
|
+
|
|
9
16
|
## [0.1.23] - 2026-09-16
|
|
10
17
|
|
|
11
18
|
- Check stable npm updates once daily between 10:00 and 17:00, notify the owner privately with release notes and a cancellable 60-second countdown, then prepare updates in the background and activate only after tasks and final deliveries finish. Persist per-version reminders and cancellations across restarts, and retain npm-only installation and rollback protections.
|
package/README.md
CHANGED
|
@@ -206,6 +206,8 @@ agentbot task new [task] [title] [--agent <standard-name>] [--dir <path> | --nod
|
|
|
206
206
|
agentbot task newgroup [task] [title] [--agent <standard-name>] [--dir <path> | --nodir]
|
|
207
207
|
agentbot task fork [task]
|
|
208
208
|
agentbot task forkgroup [task] [title]
|
|
209
|
+
agentbot task clone [task] [title] [--agent <standard-name>]
|
|
210
|
+
agentbot task clonegroup [task] [title] [--agent <standard-name>]
|
|
209
211
|
agentbot task queue [task] "<prompt>"
|
|
210
212
|
agentbot task model [task] [model]
|
|
211
213
|
agentbot task goal [task] [action-or-objective]
|
|
@@ -223,6 +225,10 @@ Inside an Agent started by Agent Bot, `[task]` defaults to the current task; use
|
|
|
223
225
|
|
|
224
226
|
`task newgroup` creates a Feishu group and a new task. By default, it inherits the source task's Agent and execution settings. `--agent <standard-name>` selects another configured Agent; the source project shape is still inherited, while Provider, model, reasoning effort, and permission mode use the target Agent's saved defaults. `--dir` overrides the project directory and supports `~`; `--nodir` forces a Projectless App Server task. Project and Projectless group names can be customized separately through `feishu.groupNameFormat`. `task forkgroup` forks from the source task's latest available completed turn without interrupting an active turn. Both commands require the Server to be running, invite the authorizing user saved in the Profile, leave the source conversation on its current task, and support `--json`.
|
|
225
227
|
|
|
228
|
+
`task clone` and `task clonegroup` (also available as `/clone` and `/clonegroup`, abbreviated `/cg`) transfer lightweight dialogue, even between different Agents. They export user Prompts and final answers in order through the latest completed Turn to a local text file, then automatically ask a fresh Agent to read it, acknowledge, and wait for the next request. No LLM summary, reasoning, tool calls/results, image payloads, or native session files are copied. Large files can be read in sections. App Server history uses summary pagination; ACP sources export only dialogue already saved by Agent Bot.
|
|
229
|
+
|
|
230
|
+
The target uses the conversation's default Agent unless `--agent` is supplied, even when that differs from the source Agent. Provider, model, and reasoning use the target Agent's saved defaults; permissions and project directory come from the source, with a fresh workspace for Projectless App Server tasks. `clone` switches the conversation only after task creation and import start succeed; `clonegroup` creates a new private group without switching the source conversation. Neither interrupts active source work or includes its unfinished Turn. In a topic without completed task history, the mapped source Turn is the cutoff. Both CLI commands support `--json`; group creation requires the Profile's authorized user. Files remain under `context-transfers` beside the configured SQLite file (normally `~/.agent-bot/data/context-transfers`); retain them while cloned tasks need them. This transfers text context, not executable session state or local file changes.
|
|
231
|
+
|
|
226
232
|
## Feishu Commands
|
|
227
233
|
|
|
228
234
|
Send a message beginning with `/` to run a command. Use `/help` in Feishu for the latest command list.
|
|
@@ -237,6 +243,7 @@ Send a message beginning with `/` to run a command. Use `/help` in Feishu for th
|
|
|
237
243
|
| `/dismiss` | Archive the current task and dissolve the group after confirmation |
|
|
238
244
|
| `/switch [task]` | Switch tasks or return to the previous task |
|
|
239
245
|
| `/fork [task]` | Branch a task |
|
|
246
|
+
| `/clone [title] [--agent <name>]` | Transfer dialogue into a fresh task |
|
|
240
247
|
| `/turn [Turn ID or index]` | Browse turn history or view one turn's runtime details |
|
|
241
248
|
| `/status [task]` | View task status, Turn count, and disk usage |
|
|
242
249
|
| `/title <title>` | Rename the current task |
|
|
@@ -251,6 +258,7 @@ Send a message beginning with `/` to run a command. Use `/help` in Feishu for th
|
|
|
251
258
|
| `/agent [name]` | Choose the Agent for new tasks |
|
|
252
259
|
| `/newgroup [title] [--dir <path> \| --nodir]` | Start a task in a new private group |
|
|
253
260
|
| `/forkgroup [title]` | Branch a task into a new private group |
|
|
261
|
+
| `/clonegroup [title] [--agent <name>]` | Transfer dialogue into a new private group |
|
|
254
262
|
| `/restart [--force]` | Restart safely, or interrupt with `--force` |
|
|
255
263
|
| `/release` | Release Agent Bot's App Server tasks for Desktop |
|
|
256
264
|
| `/mute [on\|off]` | Require @ mentions in the current group |
|
|
@@ -326,14 +334,20 @@ Provider changes require an idle task. Wait for an active turn to finish, or sto
|
|
|
326
334
|
|
|
327
335
|
`feishu.groupNameFormat` defines separate name templates for new Project and Projectless groups, with variables for the operating system, Agent, project, task name, and date. See the [technical reference](docs/technical-reference.md#configuration-model) for the complete format.
|
|
328
336
|
|
|
337
|
+
If Codex ignores the requested Provider or model when resuming an existing task, Agent Bot retries on a new Codex thread forked through the latest completed Turn. The local task, title, and directory remain unchanged; later failed or interrupted Turns remain only in the original thread. The replacement is adopted only after the settings are verified.
|
|
338
|
+
|
|
329
339
|
Agent processes inherit ordinary parent-process variables and their explicit `agents.<name>.env` settings. Before starting an Agent, Agent Bot removes inherited `FEISHU_*` credentials and internal `AGENT_BOT_*` state, then provides only namespaced, non-secret Profile and Lark identity context. `FEISHU_APP_SECRET` is never forwarded to an Agent process.
|
|
330
340
|
|
|
341
|
+
At startup, Agent Bot also reads each Codex Agent's `CODEX_HOME/.env` (default: `~/.codex/.env`) for Provider model discovery and the Codex process. You do not need to duplicate those keys in Agent Bot's `.env`. Existing environment values and explicit Agent settings take precedence. Safely restart Agent Bot after editing the file.
|
|
342
|
+
|
|
331
343
|
By default, `feishu.respondToOwnerOnly: true` accepts only messages and card actions from the bot owner identified by `feishu.userOpenId`; other users are ignored before any processing reaction is added. Set it to `false` to allow collaborators. When enabled without an owner Open ID, all Feishu user input is ignored until the owner is configured.
|
|
332
344
|
|
|
333
345
|
Agent Bot responds to ordinary owner messages in groups containing the bot. Set `feishu.respondToAllGroupMessages` to `false` to additionally require the owner to @ the bot in groups; private chats are unchanged. Initialization requests the manually published all-group-message permission only when this option is enabled. After changing it from `false` to `true`, rerun `agentbot init` and complete the final permission step.
|
|
334
346
|
|
|
335
347
|
Thinking cards use the grouped layout by default: auxiliary Commentary and user steering remain visible, while each execution group shows only its latest native reasoning and expands to reveal complete tool commands and results. Common PowerShell, zsh, bash, and sh launcher prefixes are omitted from the displayed commands. A failed tool remains marked inside its own tool panel but does not turn the complete execution group red or give the group a failure icon. Execution groups start collapsed and keep stable component identities so a group manually opened in Feishu stays open across card updates. When Codex compacts its context, the card shows the live compaction state as a progress activity, including elapsed time, before/after context token counts, executed Turn count, and rollout disk usage when available. On long turns, pagination measures the fully rendered card content instead of using fixed message or tool counts. Set `feishu.thinkingCardLayout` to `timeline` to temporarily restore the original layout.
|
|
336
348
|
|
|
349
|
+
Quoted cards and cards inside merged forwards include their available original text and images in the Agent's context.
|
|
350
|
+
|
|
337
351
|
File-change summaries display paths as plain text, preserving Windows separators and literal underscores (including `\__init__.py`) instead of interpreting them as Markdown formatting.
|
|
338
352
|
|
|
339
353
|
## Troubleshooting
|
package/README.zh.md
CHANGED
|
@@ -206,6 +206,8 @@ agentbot task new [任务] [标题] [--agent <标准名>] [--dir <路径> | --no
|
|
|
206
206
|
agentbot task newgroup [任务] [标题] [--agent <标准名>] [--dir <路径> | --nodir]
|
|
207
207
|
agentbot task fork [任务]
|
|
208
208
|
agentbot task forkgroup [任务] [标题]
|
|
209
|
+
agentbot task clone [任务] [标题] [--agent <标准名>]
|
|
210
|
+
agentbot task clonegroup [任务] [标题] [--agent <标准名>]
|
|
209
211
|
agentbot task queue [任务] "<prompt>"
|
|
210
212
|
agentbot task model [任务] [模型]
|
|
211
213
|
agentbot task goal [任务] [操作或目标]
|
|
@@ -223,6 +225,10 @@ agentbot task dismiss [任务] --yes
|
|
|
223
225
|
|
|
224
226
|
`task newgroup` 会创建飞书群和新任务。默认继承源任务的 Agent 和运行设置;`--agent <标准名>` 可选择另一个已配置的 Agent,此时仍继承源任务的项目形态,但 Provider、模型、思考强度和权限模式使用目标 Agent 已保存的默认值。`--dir` 可覆盖项目目录并支持 `~`,`--nodir` 会强制创建 Projectless App Server 任务。Project 与 Projectless 群名可在 `feishu.groupNameFormat` 中分别自定义。`task forkgroup` 从源任务最新可用的已完成 turn 创建分支,不会中断正在执行的 turn。两个命令都要求 Server 正在运行,邀请 Profile 中保存的授权用户,不会切换源会话的当前任务,并支持 `--json`。
|
|
225
227
|
|
|
228
|
+
`task clone` 和 `task clonegroup`(飞书命令为 `/clone` 和 `/clonegroup`,后者可缩写为 `/cg`)支持跨 Agent 的轻量上下文迁移:按时间顺序将截至最近已完成 Turn 的用户 Prompt 和最终回答导出为本地文本文件,再自动让新 Agent 阅读、简短确认并等待后续指令。不调用模型生成摘要,不复制思考过程、工具调用及输出、图片数据或原生会话文件;大文本文件可分段读取。App Server 通过摘要分页读取历史,ACP 来源只导出 Agent Bot 已保存的对话。
|
|
229
|
+
|
|
230
|
+
目标 Agent 默认取当前会话设置的默认 Agent,不一定与源任务相同;可用 `--agent` 显式指定。Provider、模型和思考强度使用目标 Agent 已保存的默认值,权限和项目目录继承源任务;Projectless App Server 任务会使用新的工作目录。`clone` 在新任务创建并启动上下文读取后切换当前任务,`clonegroup` 新建私有群且不切换源会话。两者都不中断源任务,也不导出未完成轮次;话题尚无已完成任务历史时,以对应的原始 Turn 为截止点。CLI 均支持 `--json`,建群需要 Profile 中的授权用户。文件保存在配置的 SQLite 旁的 `context-transfers` 目录,通常为 `~/.agent-bot/data/context-transfers`;克隆任务仍需使用时请保留文件。这是文本上下文迁移,不是原生会话状态或工作文件的复制。
|
|
231
|
+
|
|
226
232
|
## 飞书命令
|
|
227
233
|
|
|
228
234
|
发送 `/` 开头的消息即可执行命令。使用飞书中的 `/help` 查看最新命令列表。
|
|
@@ -237,6 +243,7 @@ agentbot task dismiss [任务] --yes
|
|
|
237
243
|
| `/dismiss` | 确认后归档当前任务并解散群聊 |
|
|
238
244
|
| `/switch [任务]` | 切换任务,或返回上一个任务 |
|
|
239
245
|
| `/fork [任务]` | 创建任务分支 |
|
|
246
|
+
| `/clone [标题] [--agent <名称>]` | 将对话上下文迁移到新任务 |
|
|
240
247
|
| `/turn [Turn ID 或序号]` | 浏览历史轮次或查看指定轮次的运行信息 |
|
|
241
248
|
| `/status [任务]` | 查看任务状态、轮次和磁盘占用 |
|
|
242
249
|
| `/title <标题>` | 修改当前任务标题 |
|
|
@@ -251,6 +258,7 @@ agentbot task dismiss [任务] --yes
|
|
|
251
258
|
| `/agent [名称]` | 选择新任务使用的 Agent |
|
|
252
259
|
| `/newgroup [标题] [--dir <路径> \| --nodir]` | 在新私有群中开始任务 |
|
|
253
260
|
| `/forkgroup [标题]` | 将任务分支到新私有群 |
|
|
261
|
+
| `/clonegroup [标题] [--agent <名称>]` | 将对话上下文迁移到新私有群 |
|
|
254
262
|
| `/restart [--force]` | 安全重启;`--force` 会中断任务 |
|
|
255
263
|
| `/release` | 释放 Agent Bot 占用的 App Server 任务 |
|
|
256
264
|
| `/mute [on\|off]` | 设置当前群仅响应 @ 消息 |
|
|
@@ -318,14 +326,20 @@ Provider、模型、思考强度和权限设置会作用于当前任务,同时
|
|
|
318
326
|
|
|
319
327
|
`feishu.groupNameFormat` 可分别设置 Project 与 Projectless 新群的名称模板,支持系统、Agent、项目、任务名和日期变量。完整格式说明见[技术参考](docs/technical-reference.zh.md#配置模型)。
|
|
320
328
|
|
|
329
|
+
如果 Codex 在恢复已有任务时忽略指定的 Provider 或模型,Agent Bot 会从最新已完成轮次创建新的 Codex 分支重试。本地任务、标题和目录保持不变,之后失败或中断的轮次仅保留在原线程中。新线程的设置通过校验后才会被采用。
|
|
330
|
+
|
|
321
331
|
Agent 进程会继承普通父进程变量及其显式配置的 `agents.<name>.env`。启动 Agent 前,Agent Bot 会移除继承的 `FEISHU_*` 凭据和内部 `AGENT_BOT_*` 状态,再仅提供带命名空间的非敏感 Profile 与 Lark 身份上下文;`FEISHU_APP_SECRET` 永远不会传入 Agent 进程。
|
|
322
332
|
|
|
333
|
+
Agent Bot 启动时还会读取每个 Codex Agent 的 `CODEX_HOME/.env`(默认 `~/.codex/.env`),供 Provider 模型发现和 Codex 进程使用,无需把这些密钥重复写入 Agent Bot 的 `.env`。已有环境变量和 Agent 显式配置优先。修改该文件后需安全重启 Agent Bot。
|
|
334
|
+
|
|
323
335
|
默认配置 `feishu.respondToOwnerOnly: true` 只接受 `feishu.userOpenId` 所标识的机器人拥有者发送的消息和卡片操作;其他用户会在添加处理 reaction 之前被忽略。设为 `false` 可允许其他协作者使用。开启后若未配置拥有者 Open ID,Agent Bot 会忽略所有飞书用户输入,直到完成拥有者配置。
|
|
324
336
|
|
|
325
337
|
Agent Bot 会响应机器人所在群内拥有者发送的普通消息。将 `feishu.respondToAllGroupMessages` 设为 `false` 后,还会要求拥有者在群消息中 @ 当前机器人;私聊不受这一项影响。只有开启该配置时,初始化才会申请需要手动发布的“接收所有群消息”权限。从 `false` 改为 `true` 后,需要重新运行 `agentbot init` 并完成最后的权限步骤。
|
|
326
338
|
|
|
327
339
|
思考卡片默认使用分组布局:辅助 Commentary 和用户追加消息保持直接显示,每个执行组只显示最新一段原生思考,点击后可展开完整的工具命令和结果。显示命令时会省略常见的 PowerShell、zsh、bash 和 sh 启动包装前缀。失败工具仍会在自己的工具面板中标记,但不会让整个执行组显示失败图标或红色边框。执行组默认折叠,并使用稳定的组件标识,使用户在飞书中手动打开的面板在卡片更新后继续保持展开。Codex 压缩上下文时,卡片内部会把实时压缩状态显示为一条进度活动;协议提供数据时,还会显示耗时、压缩前后的上下文 token 数、已执行轮次和 rollout 磁盘占用。长任务会根据完整渲染后的卡片内容大小翻页,不再使用固定的消息数或工具数。将 `feishu.thinkingCardLayout` 设为 `timeline` 可临时恢复原版布局。
|
|
328
340
|
|
|
341
|
+
引用卡片或合并转发中的卡片时,Agent 会收到可读取的原始文字和图片。
|
|
342
|
+
|
|
329
343
|
文件变更摘要中的路径保持普通文本样式,完整保留 Windows 路径分隔符和下划线(包括 `\__init__.py`),不会将其解析为 Markdown 格式。
|
|
330
344
|
|
|
331
345
|
## 常见问题
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controlProtocol.js","sourceRoot":"","sources":["../../src/cli/controlProtocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"controlProtocol.js","sourceRoot":"","sources":["../../src/cli/controlProtocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAyL7B,MAAM,UAAU,eAAe,CAAC,UAAkB;IAChD,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC9C,MAAM,GAAG,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC/F,OAAO,OAAO,CAAC,QAAQ,KAAK,OAAO;QACjC,CAAC,CAAC,0BAA0B,GAAG,EAAE;QACjC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,CAAC;AACtE,CAAC"}
|
package/dist/cli/help.js
CHANGED
|
@@ -29,6 +29,8 @@ export function renderCliHelp(version, language = cliLanguage) {
|
|
|
29
29
|
task newgroup [任务] [标题] 创建新群;支持 --agent、--dir、--nodir
|
|
30
30
|
task fork [任务] 从任务最近完成的 Turn 创建分支
|
|
31
31
|
task forkgroup [任务] [标题] 从任务 Fork 新群
|
|
32
|
+
task clone [任务] [标题] 用对话文件创建新任务;支持 --agent
|
|
33
|
+
task clonegroup [任务] [标题] 用对话文件创建新群;支持 --agent
|
|
32
34
|
task switch [任务] [目标任务] 切换会话任务;--previous 切回上一任务
|
|
33
35
|
task queue [任务] <提示词> 将提示词排队;nosteer 是别名
|
|
34
36
|
task agent [任务] [名称] 查看或设置该会话的新任务默认 Agent
|
|
@@ -121,6 +123,8 @@ Task commands:
|
|
|
121
123
|
task newgroup [task] [title] Create a group; supports --agent, --dir, --nodir
|
|
122
124
|
task fork [task] Fork the task's latest completed Turn
|
|
123
125
|
task forkgroup [task] [title] Fork a task into a new group
|
|
126
|
+
task clone [task] [title] Create a task from a conversation file; supports --agent
|
|
127
|
+
task clonegroup [task] [title] Create a group from a conversation file; supports --agent
|
|
124
128
|
task switch [task] [target] Switch the conversation task; --previous selects the prior task
|
|
125
129
|
task queue [task] <prompt> Queue a Prompt; nosteer is an alias
|
|
126
130
|
task agent [task] [name] Show or set the conversation's default Agent for new tasks
|
package/dist/cli/help.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoB,MAAM,WAAW,CAAC;AAE1D,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,QAAQ,GAAgB,WAAW;IAChF,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACtB,OAAO,aAAa,OAAO
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoB,MAAM,WAAW,CAAC;AAE1D,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,QAAQ,GAAgB,WAAW;IAChF,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACtB,OAAO,aAAa,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4F9B,CAAC;IACA,CAAC;IAED,OAAO,aAAa,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4F5B,CAAC;AACF,CAAC"}
|
|
@@ -81,6 +81,33 @@ export function parseTaskForkGroupOptions(input, language = cliLanguage) {
|
|
|
81
81
|
json,
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
+
export function parseTaskCloneOptions(input, action, language = cliLanguage) {
|
|
85
|
+
const positionals = [];
|
|
86
|
+
let agentName;
|
|
87
|
+
let json = false;
|
|
88
|
+
for (let index = 0; index < input.length; index += 1) {
|
|
89
|
+
const argument = input[index];
|
|
90
|
+
if (argument === "--json") {
|
|
91
|
+
json = true;
|
|
92
|
+
}
|
|
93
|
+
else if (argument === "--agent") {
|
|
94
|
+
if (agentName !== undefined)
|
|
95
|
+
throw optionError(action, "--agent", language);
|
|
96
|
+
const name = input[++index];
|
|
97
|
+
if (!name?.trim() || name.startsWith("--"))
|
|
98
|
+
throw new Error(cliText(`task ${action} requires an Agent name after --agent.`, `task ${action} 需要在 --agent 后指定 Agent 名称。`, language));
|
|
99
|
+
agentName = name.trim();
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
if (argument.startsWith("--"))
|
|
103
|
+
throw unsupportedOption(action, argument, language);
|
|
104
|
+
positionals.push(argument);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
const [reference, ...title] = positionals;
|
|
108
|
+
requireTaskReference(action, reference, language);
|
|
109
|
+
return { reference, title: title.join(" ").trim() || undefined, agentName, json };
|
|
110
|
+
}
|
|
84
111
|
function requireTaskReference(action, reference, language) {
|
|
85
112
|
if (reference && !reference.startsWith("--"))
|
|
86
113
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskGroupOptions.js","sourceRoot":"","sources":["../../src/cli/taskGroupOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAoB,MAAM,WAAW,CAAC;AAmBnE,MAAM,UAAU,wBAAwB,CACtC,KAAe,EACf,QAAQ,GAAgB,WAAW;IAEnC,OAAO,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,KAAe,EACf,MAAM,GAAuB,KAAK,EAClC,QAAQ,GAAgB,WAAW;IAEnC,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,IAAI,GAAuB,CAAC;IAC5B,IAAI,SAA6B,CAAC;IAClC,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACrD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAE,CAAC;QAC/B,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC1B,IAAI,GAAG,IAAI,CAAC;YACZ,SAAS;QACX,CAAC;QACD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,IAAI,WAAW;gBAAE,MAAM,WAAW,CAAC,MAAM,EAAE,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SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AACpF,CAAC;AAED,SAAS,oBAAoB,CAC3B,MAAiE,EACjE,SAA6B,EAC7B,QAAqB;IAErB,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO;IACrD,MAAM,IAAI,KAAK,CAAC,OAAO,CACrB,QAAQ,MAAM,4CAA4C,EAC1D,QAAQ,MAAM,iBAAiB,EAC/B,QAAQ,CACT,CAAC,CAAC;AACL,CAAC;AAED,SAAS,WAAW,CAClB,MAAmD,EACnD,MAAuC,EACvC,QAAqB;IAErB,OAAO,IAAI,KAAK,CAAC,OAAO,CACtB,QAAQ,MAAM,YAAY,MAAM,aAAa,EAC7C,QAAQ,MAAM,WAAW,MAAM,GAAG,EAClC,QAAQ,CACT,CAAC,CAAC;AACL,CAAC;AAED,SAAS,yBAAyB,CAAC,MAA0B,EAAE,QAAqB;IAClF,OAAO,IAAI,KAAK,CAAC,OAAO,CACtB,QAAQ,MAAM,oCAAoC,EAClD,QAAQ,MAAM,4BAA4B,EAC1C,QAAQ,CACT,CAAC,CAAC;AACL,CAAC;AAED,SAAS,iBAAiB,CACxB,MAAiE,EACjE,MAAc,EACd,QAAqB;IAErB,OAAO,IAAI,KAAK,CAAC,OAAO,CACtB,QAAQ,MAAM,6BAA6B,MAAM,GAAG,EACpD,QAAQ,MAAM,UAAU,MAAM,GAAG,EACjC,QAAQ,CACT,CAAC,CAAC;AACL,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -28,7 +28,7 @@ import { currentAppServerThreadIds, formatTaskList, taskStateLabel, } from "./cl
|
|
|
28
28
|
import { resolveCurrentTaskFromEnvironment, resolveRestartNotificationTask, resolveTask, resolveTaskCommandTarget, } from "./cli/taskTarget.js";
|
|
29
29
|
import { isThreadContextKey } from "./feishu/contextKey.js";
|
|
30
30
|
import { refreshedSystemEnvironment } from "./supervision/systemEnvironment.js";
|
|
31
|
-
import { parseTaskForkGroupOptions, parseTaskNewOptions, parseTaskNewGroupOptions, } from "./cli/taskGroupOptions.js";
|
|
31
|
+
import { parseTaskCloneOptions, parseTaskForkGroupOptions, parseTaskNewOptions, parseTaskNewGroupOptions, } from "./cli/taskGroupOptions.js";
|
|
32
32
|
import { StateStore } from "./state/StateStore.js";
|
|
33
33
|
import { nodeDiagnosticReportArguments, prepareCrashReportDirectory, resolveSupervisorDiagnosticsPaths, } from "./supervision/SupervisorDiagnostics.js";
|
|
34
34
|
import { agentBotHome, defaultSqlitePath } from "./config/paths.js";
|
|
@@ -1193,6 +1193,26 @@ async function taskCommand(input) {
|
|
|
1193
1193
|
await serverCommand(["restart", "--task", target.session.localSessionId, ...translated]);
|
|
1194
1194
|
return;
|
|
1195
1195
|
}
|
|
1196
|
+
if (action === "clone" || action === "clonegroup") {
|
|
1197
|
+
const target = resolveTaskCommandTarget(allSessions, rest, action);
|
|
1198
|
+
const options = parseTaskCloneOptions([target.session.localSessionId, ...target.args], action);
|
|
1199
|
+
if (action === "clonegroup")
|
|
1200
|
+
requireCliGroupUser(config.feishu.userOpenId);
|
|
1201
|
+
const response = await sendControlRequest(controlEndpoint(config.storage.sqlitePath), {
|
|
1202
|
+
action: action === "clonegroup" ? "task_clone_group" : "task_clone",
|
|
1203
|
+
localSessionId: target.session.localSessionId,
|
|
1204
|
+
...(options.title ? { title: options.title } : {}),
|
|
1205
|
+
...(options.agentName ? { agentName: options.agentName } : {}),
|
|
1206
|
+
}, 120_000);
|
|
1207
|
+
if (!response.ok)
|
|
1208
|
+
throw new Error(response.message ?? cliText("Failed to clone the task.", "克隆任务失败。"));
|
|
1209
|
+
const result = response.data;
|
|
1210
|
+
if (options.json)
|
|
1211
|
+
printJson(result);
|
|
1212
|
+
else
|
|
1213
|
+
process.stdout.write(cliText(`Cloned task: ${result.task.title ?? result.task.localSessionId}\nAgent: ${result.task.agentName}\nContext: ${result.contextFile} (${result.turnCount} turns)\n${result.group ? `Group: ${result.group.name}\n` : ""}`, `克隆任务:${result.task.title ?? result.task.localSessionId}\nAgent:${result.task.agentName}\n上下文:${result.contextFile}(${result.turnCount} 轮)\n${result.group ? `群:${result.group.name}\n` : ""}`));
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1196
1216
|
if (action === "newgroup") {
|
|
1197
1217
|
const target = resolveTaskCommandTarget(allSessions, rest, action);
|
|
1198
1218
|
const options = parseTaskNewGroupOptions([target.session.localSessionId, ...target.args]);
|