@keyou007/agent-bot 0.1.12 → 0.1.13-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 +9 -0
- package/README.md +23 -10
- package/README.zh.md +23 -10
- package/config.example.yaml +0 -24
- package/dist/cli/AgentPrerequisites.js +262 -0
- package/dist/cli/AgentPrerequisites.js.map +1 -0
- package/dist/cli/DefaultAgentSelection.js +47 -0
- package/dist/cli/DefaultAgentSelection.js.map +1 -0
- package/dist/cli/Initializer.js +165 -2
- package/dist/cli/Initializer.js.map +1 -1
- package/dist/cli/help.js +4 -4
- package/dist/cli.js +194 -4
- package/dist/cli.js.map +1 -1
- package/dist/codex/AppServerConnection.js +3 -3
- package/dist/codex/AppServerConnection.js.map +1 -1
- package/dist/codex/CodexProcessManager.js +4 -4
- package/dist/codex/CodexProcessManager.js.map +1 -1
- package/dist/codex/CodexRuntime.js +28 -16
- package/dist/codex/CodexRuntime.js.map +1 -1
- package/dist/config/loadConfig.js +0 -24
- package/dist/config/loadConfig.js.map +1 -1
- package/dist/console/ConsoleConnector.js +2 -2
- package/dist/console/ConsoleConnector.js.map +1 -1
- package/dist/feishu/CardRenderer.js +8 -8
- package/dist/feishu/CardRenderer.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/ProxySessionController.js +51 -51
- package/dist/proxy/ProxySessionController.js.map +1 -1
- package/dist/runtime/AcpRuntimeAdapter.js +3 -2
- package/dist/runtime/AcpRuntimeAdapter.js.map +1 -1
- package/docs/technical-reference.md +32 -17
- package/docs/technical-reference.zh.md +32 -17
- package/npm-shrinkwrap.json +2 -2
- package/package.json +7 -3
- package/skills/agent-bot/SKILL.md +12 -6
- package/src/cli/AgentPrerequisites.ts +377 -0
- package/src/cli/DefaultAgentSelection.ts +56 -0
- package/src/cli/Initializer.ts +204 -3
- package/src/cli/help.ts +4 -4
- package/src/cli.ts +293 -5
- package/src/codex/AppServerConnection.ts +3 -3
- package/src/codex/CodexProcessManager.ts +4 -4
- package/src/codex/CodexRuntime.ts +38 -18
- package/src/config/loadConfig.ts +0 -24
- package/src/console/ConsoleConnector.ts +2 -2
- package/src/feishu/CardRenderer.ts +8 -8
- package/src/index.ts +1 -1
- package/src/proxy/ProxySessionController.ts +52 -52
- package/src/runtime/AcpRuntimeAdapter.ts +3 -1
|
@@ -71,8 +71,9 @@ export class AcpRuntimeAdapter {
|
|
|
71
71
|
}
|
|
72
72
|
async startTurn(sessionId, prompt) {
|
|
73
73
|
const { text, localImagePaths } = normalizeRuntimePrompt(prompt);
|
|
74
|
-
if (localImagePaths.length > 0)
|
|
75
|
-
throw new Error("当前 ACP Agent
|
|
74
|
+
if (localImagePaths.length > 0) {
|
|
75
|
+
throw new Error("当前 ACP Agent 不支持图片输入,请切换到支持图片输入的 App Server Agent 后重试。");
|
|
76
|
+
}
|
|
76
77
|
const session = this.requireSession(sessionId);
|
|
77
78
|
const turnId = createId("turn");
|
|
78
79
|
session.activeTurnId = turnId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcpRuntimeAdapter.js","sourceRoot":"","sources":["../../src/runtime/AcpRuntimeAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAoB1C,MAAM,OAAO,iBAAiB;IAWC,GAAG;IAVvB,IAAI,GAAG,KAAc,CAAC;IACd,QAAQ,GAAG,IAAI,GAAG,EAA0B,CAAC;IAC7C,WAAW,GAAG,IAAI,GAAG,EAAyB,CAAC;IAC/C,cAAc,GAAG,IAAI,GAAG,EAAkC,CAAC;IAC3D,SAAS,GAAG,IAAI,GAAG,EAAiC,CAAC;IACrD,SAAS,GAAG,IAAI,GAAG,EAGjC,CAAC;IAEJ,YAA6B,GAAsB;mBAAtB,GAAG;IAAsB,CAAC;IAEvD,UAAU,CAAC,cAAsB;QAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC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M,EAAE,MAAM,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,sBAAsB,CAAC,MAAqB;IACnD,OAAO,OAAO,MAAM,KAAK,QAAQ;QAC/B,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE,EAAE;QACvC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,eAAe,IAAI,EAAE,EAAE,CAAC;AAC3E,CAAC"}
|
|
@@ -9,7 +9,7 @@ This document covers deployment, configuration, runtime behavior, persistence, a
|
|
|
9
9
|
Agent Bot is a Node.js 22+ ESM TypeScript application built around these components:
|
|
10
10
|
|
|
11
11
|
- The supervisor owns the long-running service and restarts the worker.
|
|
12
|
-
- The worker starts the configured
|
|
12
|
+
- The worker starts the configured Agent runtimes, Feishu transport, Console transport, local control server, and SQLite store.
|
|
13
13
|
- Feishu events and Console input are normalized into the same task controller.
|
|
14
14
|
- Presentation components maintain one progress card per turn and send the final Markdown response separately.
|
|
15
15
|
- App Server agents use the App Server protocol over stdio; other configured agents use ACP.
|
|
@@ -22,7 +22,7 @@ Relevant source areas:
|
|
|
22
22
|
| `src/cli/` | Initialization, app registration, app auditing, and service/task commands |
|
|
23
23
|
| `src/feishu/` | Feishu WebSocket events, API calls, cards, images, and context keys |
|
|
24
24
|
| `src/runtime/` | Shared runtime abstraction |
|
|
25
|
-
| `src/codex/` |
|
|
25
|
+
| `src/codex/` | App Server protocol integration for Codex, TraeX, and compatible Agents |
|
|
26
26
|
| `src/acp/` | ACP process and JSON-RPC integration |
|
|
27
27
|
| `src/proxy/` | Tasks, turns, steering, queues, forks, and command execution |
|
|
28
28
|
| `src/presentation/` | Turn-state reduction and outbound routing |
|
|
@@ -58,8 +58,16 @@ Relative `storage.sqlitePath` and `logging.path` values resolve against the dire
|
|
|
58
58
|
|
|
59
59
|
## Initialization
|
|
60
60
|
|
|
61
|
+
Early in initialization, `agentbot init` checks the supported Codex and TraeX CLIs in parallel and reports each installed version. Codex is compared with the latest stable `@openai/codex` package, while TraeX is compared with its Alpha channel. Missing or outdated Agents are gathered into one numbered list containing their exact install or upgrade commands. An interactive user can enter comma- or space-separated action numbers, `all`, or an empty answer to skip maintenance. Selected commands run sequentially with inherited stdio; skipped and failed actions are recorded and initialization continues. In a non-interactive terminal, commands are printed for manual use. With `--json`, progress and prompts use stderr and the final `agents` array records detection and assistance results. Codex upgrades first use `codex update` and fall back to the current npm package command when an older updater fails.
|
|
62
|
+
|
|
63
|
+
After version and maintenance checks, an interactive `init` requires a default-Agent selection by number or standard name. Configured custom Agents remain selectable without a version check; Codex or TraeX is omitted while its CLI is missing. When the current default remains selectable, an empty answer confirms it. The selected standard name is written to `defaults.agent` through the same comment-preserving atomic YAML update used for configuration upgrades. A non-interactive invocation retains an existing valid configured default because it cannot prompt, and fails when no valid default exists. The JSON result reports this as `defaultAgent.name` and `defaultAgent.status` (`selected` or `existing`).
|
|
64
|
+
|
|
61
65
|
`agentbot init` copies the packaged `config.example.yaml` and `.env.example` when their target files do not exist, creates the data and log directories, and restricts `.env` permissions where the platform supports POSIX modes.
|
|
62
66
|
|
|
67
|
+
When `config.yaml` already exists, `init` treats the packaged `config.example.yaml` as the configuration upgrade template. It parses both files as YAML and recursively adds missing mapping entries while preserving existing scalar values, sequences, comments, and custom entries. An existing `agents` mapping is treated as user-owned: template Agents that the user omitted are not re-added, while missing fields are filled for same-named Agents. A missing `defaults.agent` is not inferred because doing so could silently change the selected Agent. Invalid YAML is reported without replacing the existing file. Changed configuration is written through an atomic replacement, and a second run is idempotent. Use `--reset` when a complete replacement from the current template is intended.
|
|
68
|
+
|
|
69
|
+
When `.env` already exists, `init` appends active assignments missing from the packaged `.env.example`. Existing values, comments, ordering, and line endings are preserved, and commented optional examples are not enabled. The update uses the same atomic replacement behavior and is idempotent.
|
|
70
|
+
|
|
63
71
|
Credential behavior:
|
|
64
72
|
|
|
65
73
|
- Environment values take precedence over values in `~/.agent-bot/.env`.
|
|
@@ -142,6 +150,13 @@ agents:
|
|
|
142
150
|
args: ["app-server", "--enable", "goals", "--listen", "stdio://"]
|
|
143
151
|
env: {}
|
|
144
152
|
|
|
153
|
+
traex:
|
|
154
|
+
kind: "app-server"
|
|
155
|
+
title: "TraeX"
|
|
156
|
+
command: "traex"
|
|
157
|
+
args: ["app-server", "--listen", "stdio://"]
|
|
158
|
+
env: {}
|
|
159
|
+
|
|
145
160
|
defaults:
|
|
146
161
|
agent: "codex"
|
|
147
162
|
cwd: "."
|
|
@@ -187,7 +202,7 @@ The message route determines the current task:
|
|
|
187
202
|
|
|
188
203
|
Commands, card callbacks, progress cards, and final responses stay on the originating route.
|
|
189
204
|
|
|
190
|
-
Starting a Feishu thread from a mapped user message, progress card, or final response forks from the associated completed
|
|
205
|
+
Starting a Feishu thread from a mapped user message, progress card, or final response forks from the associated completed App Server turn. If no reliable completed source turn exists, the operation fails instead of selecting an arbitrary point.
|
|
191
206
|
|
|
192
207
|
`/forkgroup` has thread-aware source selection. An unbound thread, or a bound thread task with no completed turn of its own, forks directly from the thread's original anchor turn without creating an intermediate thread task. Once the thread task has completed a turn, `/forkgroup` uses its latest locally persisted completed turn. A newer active turn does not block the command and is excluded from the fork point.
|
|
193
208
|
|
|
@@ -198,7 +213,7 @@ The new group's welcome message reports the persisted fork settings: Provider, m
|
|
|
198
213
|
## Turn And Message Behavior
|
|
199
214
|
|
|
200
215
|
- Plain text creates a task when the route has no current task.
|
|
201
|
-
- Text received during an active
|
|
216
|
+
- Text received during an active App Server turn is sent through steering.
|
|
202
217
|
- A steering race at turn completion becomes the next queued request.
|
|
203
218
|
- `/nosteer` always creates a persistent FIFO queue item.
|
|
204
219
|
- Queue card actions can cancel individual pending items.
|
|
@@ -209,23 +224,23 @@ Each turn owns one progress card. Normal updates are throttled to one every two
|
|
|
209
224
|
|
|
210
225
|
After the durable message-deduplication claim, Agent Bot awaits the `OnIt` reaction before chat persistence, image downloads, queue waits, command execution, or runtime calls. It replaces that reaction with `DONE`, `ERROR`, or `CrossMark` when the turn succeeds, fails, or is canceled. Reaction failures are logged but do not block task execution.
|
|
211
226
|
|
|
212
|
-
Incoming rich-text images are downloaded into the inbound image cache and passed to
|
|
227
|
+
Incoming rich-text images are downloaded into the inbound image cache and passed to the App Server as `localImage` inputs. An image-only message uses the default Prompt `请查看这张图片`. An ACP runtime that cannot accept image input returns an explicit error.
|
|
213
228
|
|
|
214
|
-
## Tasks, Projects, And External
|
|
229
|
+
## Tasks, Projects, And External App Server Work
|
|
215
230
|
|
|
216
|
-
`/sessions` reads
|
|
231
|
+
`/sessions` reads tasks through `thread/list` from every configured App Server Agent. For Codex, this includes tasks created by Codex Desktop, CLI, Agent Bot, or another App Server client under the same `CODEX_HOME`; other Agents expose their own task stores through the same protocol.
|
|
217
232
|
|
|
218
233
|
Each task entry exposes `NewGroup` and `ForkGroup` callbacks. The callback payload keeps the selected task ID and source context, while the Lark operator `open_id` is used to invite the user to the new group. `NewGroup` resolves the selected task's project and execution settings; `ForkGroup` resolves its latest available completed turn.
|
|
219
234
|
|
|
220
235
|
The CLI exposes the same task-targeted operations through `agentbot task newgroup <task> [title] [--agent <name>] [--dir <cwd> | --nodir]` and `agentbot task forkgroup <task> [title]`. Both commands require a running Server and send the stable local task ID over the Profile's local control endpoint. Since a CLI process has no Lark operator, the Server invites `feishu.userOpenId`, which initialization stores as `FEISHU_USER_OPEN_ID`. New-group creation inherits the selected task's Agent and execution settings by default. `--agent <standard-name>` selects another configured runtime while retaining the source project shape; execution settings are omitted so that runtime applies its own defaults. ForkGroup uses the source task's latest available completed turn and leaves an active source turn running. Both control responses include the new chat, group context, source task, and created task; `--json` prints that structure without localization.
|
|
221
236
|
|
|
222
|
-
##
|
|
237
|
+
## App Server Provider Settings
|
|
223
238
|
|
|
224
|
-
Provider is a task-level setting stored as `model_provider` alongside model, reasoning effort, and permission mode. Agent Bot passes `modelProvider` through `thread/start`, `thread/resume`, and `thread/fork` whenever a task explicitly inherits or selects one. For a brand-new task with no inherited Provider, Agent Bot omits `modelProvider`; the
|
|
239
|
+
Provider is a task-level setting stored as `model_provider` alongside model, reasoning effort, and permission mode. Agent Bot passes `modelProvider` through `thread/start`, `thread/resume`, and `thread/fork` whenever a task explicitly inherits or selects one. For a brand-new task with no inherited Provider, Agent Bot omits `modelProvider`; the selected App Server Agent uses its own effective default and returns the selected Provider in its thread response for persistence.
|
|
225
240
|
|
|
226
241
|
`/provider`, `/model`, `/thinking`, and `/permissions` open one Card 2.0 execution-settings surface with the matching tab active. All four commands reject arguments; tab navigation and setting changes use card callbacks only. Provider choices come from App Server `config/read`. A Provider change resumes the thread with the selected Provider and the current compatible model, reasoning effort, and permission mode. Model, reasoning, and permission choices update their focused setting immediately, refresh the same card in place, and apply from the next request.
|
|
227
242
|
|
|
228
|
-
Agent Bot keeps a local routing key for Feishu cards and delivery state, but presents the
|
|
243
|
+
Agent Bot keeps a local routing key for Feishu cards and delivery state, but presents the owning App Server's task ID to users. It does not resume, steer, stop, or fork externally running Agent work without an explicit user action.
|
|
229
244
|
|
|
230
245
|
Project behavior:
|
|
231
246
|
|
|
@@ -242,13 +257,13 @@ Forks use the latest available completed turn and do not interrupt an active sou
|
|
|
242
257
|
SQLite stores:
|
|
243
258
|
|
|
244
259
|
- Current and previous tasks for each route
|
|
245
|
-
- Local and
|
|
260
|
+
- Local and App Server task/thread identifiers
|
|
246
261
|
- Model, reasoning effort, and permission mode
|
|
247
262
|
- Queued Prompts
|
|
248
263
|
- Progress snapshots and message bindings
|
|
249
264
|
- Final-message delivery records
|
|
250
265
|
|
|
251
|
-
On startup, Agent Bot reconciles persisted active work with
|
|
266
|
+
On startup, Agent Bot reconciles persisted active work with its owning App Server through `thread/read`. It also reconciles when turn identifiers change, terminal notifications arrive, or control requests fail.
|
|
252
267
|
|
|
253
268
|
The final-delivery ledger prevents duplicate successful replies. App Server requests use finite timeouts so a stalled request cannot permanently occupy a message route. Session lifecycle requests allow 60 seconds because compatible third-party Agents may need more than 30 seconds for `thread/start`; control requests remain shorter.
|
|
254
269
|
|
|
@@ -283,7 +298,7 @@ The local control server implements task mutations, task-targeted NewGroup and F
|
|
|
283
298
|
|
|
284
299
|
## Permission Modes
|
|
285
300
|
|
|
286
|
-
- `auto`:
|
|
301
|
+
- `auto`: the App Server Agent runs with `approvalPolicy=never` and `danger-full-access`.
|
|
287
302
|
- `confirm`: approval requests are presented through card actions for one-time approval, session approval, denial, or task cancellation.
|
|
288
303
|
|
|
289
304
|
Model, reasoning effort, permission mode, and project shape are inherited where applicable when creating or forking tasks.
|
|
@@ -312,18 +327,18 @@ Package lifecycle:
|
|
|
312
327
|
- `prepack` builds a clean `dist/` and validates the tarball manifest.
|
|
313
328
|
- `npm run package:smoke` packs the project, installs the tarball into a temporary directory, runs the CLI, and performs Console-only initialization.
|
|
314
329
|
|
|
315
|
-
Prepare the next
|
|
330
|
+
Prepare the next Alpha release from a clean worktree:
|
|
316
331
|
|
|
317
332
|
```powershell
|
|
318
333
|
npm run release
|
|
319
334
|
git add package.json npm-shrinkwrap.json CHANGELOG.md
|
|
320
|
-
git commit -m "release: v0.1.
|
|
335
|
+
git commit -m "release: v0.1.13-alpha.0"
|
|
321
336
|
git push origin master
|
|
322
337
|
```
|
|
323
338
|
|
|
324
|
-
`npm run release`
|
|
339
|
+
`npm run release` now defaults to the Alpha channel. A stable `0.1.12` becomes `0.1.13-alpha.0`; a current `0.1.13-alpha.0` becomes `0.1.13-alpha.1`. `npm run release:alpha` is the explicit equivalent. Use `npm run release:stable` to promote the current Alpha to its stable core version, or to increment the patch when the current version is already stable. `patch`, `minor`, `major`, and exact stable or `-alpha.N` versions remain available through `npm run release -- <version>`. Every release moves the current `Unreleased` entries into a dated version section. The command refuses to modify a dirty worktree or publish an empty changelog.
|
|
325
340
|
|
|
326
|
-
No local publish command is required after the push. When CI succeeds for a first-party push to `master`, `publish.yml` checks the package version against npm. An existing version is skipped successfully. An unpublished stable version requires a matching `CHANGELOG.md` section, then runs verification and the package smoke test before publishing.
|
|
341
|
+
No local publish command is required after the push. When CI succeeds for a first-party push to `master`, `publish.yml` checks the package version against npm. An existing version is skipped successfully. An unpublished stable or Alpha version requires a matching `CHANGELOG.md` section, then runs verification and the package smoke test before publishing. Alpha versions use npm's `alpha` dist-tag and create a GitHub prerelease; stable versions use `latest` and create a regular GitHub Release.
|
|
327
342
|
|
|
328
343
|
The workflow can also be retried manually from **GitHub Actions → Publish to npm → Run workflow** on `master`. Pull requests, forked repositories, failed CI runs, and pushes to other branches cannot enter the publish job.
|
|
329
344
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
Agent Bot 是基于 Node.js 22+、ESM 和 TypeScript 的应用,主要组件如下:
|
|
10
10
|
|
|
11
11
|
- Supervisor 负责常驻服务和 worker 自动重启
|
|
12
|
-
- Worker
|
|
12
|
+
- Worker 启动配置的 Agent Runtime、飞书传输、Console 传输、本地控制服务和 SQLite
|
|
13
13
|
- 飞书事件和 Console 输入统一进入任务控制器
|
|
14
14
|
- 展示层为每个 turn 维护一张进度卡,并单独发送 Markdown 最终回答
|
|
15
15
|
- App Server Agent 通过 stdio 连接 App Server,其他 Agent 使用 ACP
|
|
@@ -22,7 +22,7 @@ Agent Bot 是基于 Node.js 22+、ESM 和 TypeScript 的应用,主要组件如
|
|
|
22
22
|
| `src/cli/` | 初始化、应用创建、配置审计及服务/任务命令 |
|
|
23
23
|
| `src/feishu/` | 飞书长连接事件、API、卡片、图片和上下文键 |
|
|
24
24
|
| `src/runtime/` | 通用 Runtime 抽象 |
|
|
25
|
-
| `src/codex/` | Codex App Server 协议集成
|
|
25
|
+
| `src/codex/` | Codex、TraeX 及兼容 Agent 的 App Server 协议集成 |
|
|
26
26
|
| `src/acp/` | ACP 进程与 JSON-RPC 集成 |
|
|
27
27
|
| `src/proxy/` | 任务、turn、steering、队列、分支和命令执行 |
|
|
28
28
|
| `src/presentation/` | Turn 状态归并和出站路由 |
|
|
@@ -58,8 +58,16 @@ CLI 通过 Node.js 国际化能力读取系统 Locale。以 `zh` 开头的 Local
|
|
|
58
58
|
|
|
59
59
|
## 初始化
|
|
60
60
|
|
|
61
|
+
初始化开始阶段,`agentbot init` 会并行检查目前支持的 Codex 和 TraeX CLI,并显示各自已安装的版本。Codex 与最新稳定版 `@openai/codex` 比较,TraeX 与 Alpha 通道比较。未安装或版本较旧的 Agent 会汇总到一个编号列表,并显示准确的安装或升级命令。交互式用户可以输入用逗号或空格分隔的操作编号、输入 `all`,或直接回车跳过维护;所选命令按顺序执行并继承终端输入输出,跳过或失败的操作都会记录结果,初始化继续。非交互式终端只显示供手动执行的命令。使用 `--json` 时,进度与询问写入 stderr,最终 `agents` 数组记录检测和辅助执行结果。Codex 升级会先执行 `codex update`,旧版 updater 失败时回退到当前 npm 包安装命令。
|
|
62
|
+
|
|
63
|
+
版本与维护检查完成后,交互式 `init` 会要求用户输入编号或标准名选择默认 Agent。自定义 Agent 无需版本检测即可选择;Codex 或 TraeX CLI 仍缺失时,对应 Agent 不会进入候选列表。当前默认 Agent 仍可选择时,直接回车即可确认。所选标准名通过保留注释的 YAML 原子更新写入 `defaults.agent`。非交互式调用无法询问,因此保留已有且仍在配置中的默认 Agent;没有有效默认值时会失败并提示改用交互式终端。JSON 结果通过 `defaultAgent.name` 和 `defaultAgent.status`(`selected` 或 `existing`)报告选择状态。
|
|
64
|
+
|
|
61
65
|
目标文件不存在时,`agentbot init` 会复制随包提供的 `config.example.yaml` 和 `.env.example`,创建数据和日志目录,并在平台支持时把 `.env` 权限限制为 POSIX `0600`。
|
|
62
66
|
|
|
67
|
+
`config.yaml` 已存在时,`init` 会把当前版本随包提供的 `config.example.yaml` 作为配置升级模板。它会解析两个 YAML 文件并递归补齐缺失的映射项,同时保留已有标量值、序列、注释和自定义配置。已有的 `agents` 映射视为用户配置:不会重新加入用户已删除的模板 Agent,但会为同名 Agent 补齐缺失字段。缺失的 `defaults.agent` 不会被推断,避免静默改变当前默认 Agent。YAML 无效时会直接报错,不会覆盖原文件;发生变更时通过原子替换写入,再次执行保持幂等。需要完全使用当前模板重新生成配置时,请使用 `--reset`。
|
|
68
|
+
|
|
69
|
+
`.env` 已存在时,`init` 会追加随包 `.env.example` 中存在、但当前文件缺少的有效赋值。已有值、注释、顺序和换行风格保持不变,注释状态的可选变量不会被自动启用。更新同样通过原子替换写入,并保持幂等。
|
|
70
|
+
|
|
63
71
|
凭据处理规则:
|
|
64
72
|
|
|
65
73
|
- 进程环境变量优先于 `~/.agent-bot/.env`
|
|
@@ -142,6 +150,13 @@ agents:
|
|
|
142
150
|
args: ["app-server", "--enable", "goals", "--listen", "stdio://"]
|
|
143
151
|
env: {}
|
|
144
152
|
|
|
153
|
+
traex:
|
|
154
|
+
kind: "app-server"
|
|
155
|
+
title: "TraeX"
|
|
156
|
+
command: "traex"
|
|
157
|
+
args: ["app-server", "--listen", "stdio://"]
|
|
158
|
+
env: {}
|
|
159
|
+
|
|
145
160
|
defaults:
|
|
146
161
|
agent: "codex"
|
|
147
162
|
cwd: "."
|
|
@@ -187,7 +202,7 @@ AGENT_BOT=1
|
|
|
187
202
|
|
|
188
203
|
命令、卡片回调、进度卡和最终回答都保留在来源路由。
|
|
189
204
|
|
|
190
|
-
从已映射的用户消息、进度卡或最终回答创建飞书话题时,会从其关联的已完成
|
|
205
|
+
从已映射的用户消息、进度卡或最终回答创建飞书话题时,会从其关联的已完成 App Server turn 创建分支。无法可靠确定已完成来源 turn 时会直接失败,不会选择任意分支点。
|
|
191
206
|
|
|
192
207
|
`/forkgroup` 会根据话题状态选择来源。话题尚未绑定任务,或者已绑定任务但尚未完成过自己的 turn 时,直接从话题原始锚点 turn fork,不创建中间话题任务。话题任务完成过 turn 后,使用本地持久化的最近完成 turn;更晚的执行中 turn 不会阻塞命令,也不会成为 fork 点。
|
|
193
208
|
|
|
@@ -198,7 +213,7 @@ Agent Bot 会在每个 `thread/fork` 请求中默认发送实验性的 `excludeT
|
|
|
198
213
|
## Turn 与消息行为
|
|
199
214
|
|
|
200
215
|
- 路由没有当前任务时,普通文本会自动创建任务
|
|
201
|
-
-
|
|
216
|
+
- App Server turn 活跃时收到的文字通过 steering 追加
|
|
202
217
|
- Steering 与 turn 完成发生竞态时,文字变为下一条排队请求
|
|
203
218
|
- `/nosteer` 始终创建持久化 FIFO 队列项
|
|
204
219
|
- 队列卡操作可以取消单个待执行项
|
|
@@ -209,23 +224,23 @@ Agent Bot 会在每个 `thread/fork` 请求中默认发送实验性的 `excludeT
|
|
|
209
224
|
|
|
210
225
|
完成持久化消息去重占位后,Agent Bot 会等待 `OnIt` 表情添加成功,再进行聊天信息持久化、图片下载、队列等待、命令执行或 Runtime 调用。Turn 成功、失败或取消时分别替换为 `DONE`、`ERROR` 或 `CrossMark`。表情操作失败会记录日志,但不会阻塞任务。
|
|
211
226
|
|
|
212
|
-
富文本图片会下载到输入图片缓存,并以 `localImage` 传给
|
|
227
|
+
富文本图片会下载到输入图片缓存,并以 `localImage` 传给 App Server。纯图片消息使用默认 Prompt `请查看这张图片`。ACP Runtime 不支持图片输入时会明确报错。
|
|
213
228
|
|
|
214
|
-
## 任务、项目与外部
|
|
229
|
+
## 任务、项目与外部 App Server 工作
|
|
215
230
|
|
|
216
|
-
`/sessions` 通过 `thread/list`
|
|
231
|
+
`/sessions` 通过 `thread/list` 读取每个已配置 App Server Agent 的任务。对于 Codex,可发现同一 `CODEX_HOME` 下由 Codex Desktop、CLI、Agent Bot 或其他 App Server 客户端创建的任务;其他 Agent 通过同一协议暴露各自的任务存储。
|
|
217
232
|
|
|
218
233
|
每个任务条目都提供 `NewGroup` 和 `ForkGroup` 回调。回调数据保留所选任务 ID 与来源上下文,并使用飞书操作者的 `open_id` 邀请用户进入新群。`NewGroup` 解析所选任务的项目和执行设置;`ForkGroup` 解析该任务最新可用的已完成 turn。
|
|
219
234
|
|
|
220
235
|
CLI 通过 `agentbot task newgroup <任务> [标题] [--agent <标准名>] [--dir <目录> | --nodir]` 和 `agentbot task forkgroup <任务> [标题]` 提供相同的指定任务操作。两个命令都要求 Server 正在运行,并通过当前 Profile 的本地控制端点发送稳定的本地任务 ID。CLI 进程没有飞书操作者,因此 Server 会邀请 `feishu.userOpenId`,该值由初始化保存为 `FEISHU_USER_OPEN_ID`。NewGroup 默认继承指定任务的 Agent 和执行设置;`--agent <标准名>` 可选择另一个已配置的 Runtime,同时继续继承来源项目形态,并省略执行设置以采用目标 Runtime 自己的默认值。ForkGroup 使用来源任务最新可用的已完成 turn,并让来源任务的活动 turn 继续执行。两类控制响应都包含新群、群上下文、来源任务和新任务;`--json` 会输出不做本地化的结构化结果。
|
|
221
236
|
|
|
222
|
-
##
|
|
237
|
+
## App Server Provider 设置
|
|
223
238
|
|
|
224
|
-
Provider 是任务级设置,以 `model_provider` 与模型、思考强度和权限模式一起持久化。任务明确继承或选择 Provider 时,Agent Bot 通过 `thread/start`、`thread/resume` 和 `thread/fork` 传递 `modelProvider`。全新任务没有可继承 Provider 时,Agent Bot
|
|
239
|
+
Provider 是任务级设置,以 `model_provider` 与模型、思考强度和权限模式一起持久化。任务明确继承或选择 Provider 时,Agent Bot 通过 `thread/start`、`thread/resume` 和 `thread/fork` 传递 `modelProvider`。全新任务没有可继承 Provider 时,Agent Bot 省略该参数,由所选 App Server Agent 使用自身生效的默认值,再从 thread 响应中读取实际 Provider 并保存。
|
|
225
240
|
|
|
226
241
|
`/provider`、`/model`、`/thinking` 和 `/permissions` 打开同一张 Card 2.0 运行设置卡片,并激活对应的 tab。四个命令都拒绝参数,tab 切换和设置修改只通过卡片回调完成。Provider 选项来自 App Server 的 `config/read`;切换 Provider 时使用当前兼容的模型、思考强度和权限模式恢复 thread。模型、思考强度和权限选择会立即更新对应设置、就地刷新同一张卡片,并从下一次请求生效。
|
|
227
242
|
|
|
228
|
-
Agent Bot
|
|
243
|
+
Agent Bot 内部保留本地路由键以关联飞书卡片和投递状态,但对用户展示所属 App Server 的任务 ID。没有明确用户操作时,不会续写、steer、停止或分支其他客户端正在运行的 Agent 工作。
|
|
229
244
|
|
|
230
245
|
项目规则:
|
|
231
246
|
|
|
@@ -242,13 +257,13 @@ Agent Bot 内部保留本地路由键以关联飞书卡片和投递状态,但
|
|
|
242
257
|
SQLite 保存:
|
|
243
258
|
|
|
244
259
|
- 每条路由的当前任务和上一个任务
|
|
245
|
-
- 本地任务标识与
|
|
260
|
+
- 本地任务标识与 App Server task/thread 标识
|
|
246
261
|
- 模型、思考强度和权限模式
|
|
247
262
|
- 排队 Prompt
|
|
248
263
|
- 进度快照和消息绑定
|
|
249
264
|
- 最终消息投递记录
|
|
250
265
|
|
|
251
|
-
启动时,Agent Bot 通过 `thread/read`
|
|
266
|
+
启动时,Agent Bot 通过 `thread/read` 将持久化的活动工作与其所属 App Server 状态校准。Turn 标识变化、收到终态通知或控制请求失败时也会重新校准。
|
|
252
267
|
|
|
253
268
|
最终消息投递账本用于避免重复发送成功回答。App Server 请求使用有限超时,避免阻塞的请求永久占用消息路由。会话生命周期请求允许 60 秒,因为兼容的第三方 Agent 完成 `thread/start` 可能需要超过 30 秒;控制请求仍使用更短的超时。
|
|
254
269
|
|
|
@@ -283,7 +298,7 @@ Supervisor、Worker、替换 Supervisor 和 Console Worker 默认启用 Node fat
|
|
|
283
298
|
|
|
284
299
|
## 权限模式
|
|
285
300
|
|
|
286
|
-
- `auto`:
|
|
301
|
+
- `auto`:App Server Agent 使用 `approvalPolicy=never` 和 `danger-full-access`
|
|
287
302
|
- `confirm`:通过卡片提供单次允许、会话允许、拒绝和取消任务操作
|
|
288
303
|
|
|
289
304
|
创建或分支任务时,会按适用场景继承模型、思考强度、权限模式和项目形态。
|
|
@@ -312,18 +327,18 @@ CLI 随包发布 `npm-shrinkwrap.json`,以固定传递运行依赖;直接运
|
|
|
312
327
|
- `prepack` 清理并构建 `dist/`,然后检查 tarball 清单
|
|
313
328
|
- `npm run package:smoke` 打包项目、在临时目录安装 tarball、运行 CLI,并执行仅 Console 的初始化
|
|
314
329
|
|
|
315
|
-
在干净工作树中准备下一个
|
|
330
|
+
在干净工作树中准备下一个 Alpha 版本:
|
|
316
331
|
|
|
317
332
|
```powershell
|
|
318
333
|
npm run release
|
|
319
334
|
git add package.json npm-shrinkwrap.json CHANGELOG.md
|
|
320
|
-
git commit -m "release: v0.1.
|
|
335
|
+
git commit -m "release: v0.1.13-alpha.0"
|
|
321
336
|
git push origin master
|
|
322
337
|
```
|
|
323
338
|
|
|
324
|
-
`npm run release`
|
|
339
|
+
`npm run release` 现在默认使用 Alpha 通道:稳定版 `0.1.12` 会变为 `0.1.13-alpha.0`,当前版本 `0.1.13-alpha.0` 会变为 `0.1.13-alpha.1`。`npm run release:alpha` 是对应的显式命令。`npm run release:stable` 会把当前 Alpha 提升为相同核心版本的稳定版;当前已经是稳定版时则递增 patch。仍可通过 `npm run release -- <version>` 使用 `patch`、`minor`、`major`,或指定完整的稳定版及 `-alpha.N` 版本。每次发布都会把当前 `Unreleased` 条目归档到带日期的版本小节。工作树不干净或 `Unreleased` 没有内容时,命令会拒绝修改文件。
|
|
325
340
|
|
|
326
|
-
推送完成后无需再执行本地发布命令。本仓库自身对 `master` 的 push 通过 CI 后,`publish.yml` 会查询 npm
|
|
341
|
+
推送完成后无需再执行本地发布命令。本仓库自身对 `master` 的 push 通过 CI 后,`publish.yml` 会查询 npm 中的包版本:版本已存在时正常跳过;发现尚未发布的稳定版或 Alpha 版时,要求 `CHANGELOG.md` 存在匹配小节,并在发布前再次执行完整验证和包安装 smoke test。Alpha 版发布到 npm 的 `alpha` dist-tag,并创建 GitHub prerelease;稳定版发布到 `latest`,并创建普通 GitHub Release。
|
|
327
342
|
|
|
328
343
|
需要补跑时,可以在 **GitHub Actions → Publish to npm → Run workflow** 中选择 `master` 手动执行。Pull Request、外部 fork、CI 失败以及其他分支的 push 都不能进入发布 job。
|
|
329
344
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keyou007/agent-bot",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13-alpha.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@keyou007/agent-bot",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.13-alpha.0",
|
|
10
10
|
"license": "GPL-3.0-only",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@agentclientprotocol/sdk": "1.2.1",
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keyou007/agent-bot",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13-alpha.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Use Codex, TraeX, and compatible coding agents from Lark/Feishu.",
|
|
6
6
|
"license": "GPL-3.0-only",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
"keywords": [
|
|
16
16
|
"agent",
|
|
17
17
|
"codex",
|
|
18
|
+
"traex",
|
|
19
|
+
"app-server",
|
|
18
20
|
"acp",
|
|
19
21
|
"feishu",
|
|
20
22
|
"lark",
|
|
@@ -57,7 +59,9 @@
|
|
|
57
59
|
"prepublishOnly": "npm run verify",
|
|
58
60
|
"package:check": "npm run prepack",
|
|
59
61
|
"package:smoke": "node scripts/smoke-package.mjs",
|
|
60
|
-
"release": "node scripts/prepare-release.mjs"
|
|
62
|
+
"release": "node scripts/prepare-release.mjs",
|
|
63
|
+
"release:alpha": "node scripts/prepare-release.mjs alpha",
|
|
64
|
+
"release:stable": "node scripts/prepare-release.mjs stable"
|
|
61
65
|
},
|
|
62
66
|
"dependencies": {
|
|
63
67
|
"@agentclientprotocol/sdk": "1.2.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-bot
|
|
3
|
-
description: Initialize Agent Bot, detect and work safely inside its runtime, and manage the local service and its
|
|
3
|
+
description: Initialize Agent Bot, detect and work safely inside its runtime, and manage the local service and its App Server or ACP sessions through the agentbot CLI. Use when an agent needs to adapt its behavior while running under Agent Bot, or when a user asks to initialize, inspect, start, safely restart, immediately restart, or stop Agent Bot; open its console UI; list, inspect, stop, rename, or send a prompt to tasks; create or fork Lark groups from tasks; check a scheduled restart; or troubleshoot the bot without manually killing worker processes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Agent Bot
|
|
@@ -9,7 +9,7 @@ Use the `agentbot` command as the supported control surface for Agent Bot. The l
|
|
|
9
9
|
|
|
10
10
|
## Detect the Agent Bot runtime
|
|
11
11
|
|
|
12
|
-
Agent Bot injects `AGENT_BOT=1` into every
|
|
12
|
+
Agent Bot injects `AGENT_BOT=1` into every configured Agent process it starts. Test for the exact value `1`:
|
|
13
13
|
|
|
14
14
|
```powershell
|
|
15
15
|
if ($env:AGENT_BOT -eq "1") { "running in Agent Bot" }
|
|
@@ -46,8 +46,14 @@ Run initialization once after installing or linking the CLI:
|
|
|
46
46
|
agentbot init
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
Initialization detects the supported Codex and TraeX CLIs and reports each installed version. Missing or outdated Agents are presented in one numbered maintenance list with their exact commands. In an interactive terminal, the user may enter comma-separated action numbers, `all`, or press Enter to skip maintenance. A failed maintenance command or the absence of an interactive terminal does not block the remaining initialization. Do not select maintenance actions on the user's behalf without permission. Agent Bot uses the latest stable Codex release and the TraeX Alpha channel for these checks.
|
|
50
|
+
|
|
51
|
+
After the maintenance choice, interactive initialization requires the user to select the default Agent by number or standard name. It lists configured custom Agents and installed supported Agents, omits Codex or TraeX when that CLI is still missing, and writes the selected standard name to `defaults.agent` in `config.yaml`. If the current default remains available, an empty answer explicitly confirms it. Always relay the choices and let the user decide. A non-interactive invocation keeps an already configured default; it fails with an instruction to rerun interactively when no valid default exists. With `--json`, read the result from `defaultAgent.name` and `defaultAgent.status`.
|
|
52
|
+
|
|
49
53
|
Initialization creates the Agent Bot home, `config.yaml`, `.env`, `data/`, and `logs/` from the bundled examples. If Feishu credentials are absent, it starts Feishu one-click app registration, prints a QR code followed by its authorization URL, waits for the user to approve the request, and stores the returned app ID and secret in `.env`. It then audits the app's currently published tenant permissions, event subscriptions, and callbacks. Core and optional missing items produce separate configuration challenges. Core configuration is polled until ready, except that the manually configured all-group-message permission may be explicitly skipped with `Y`. For optional configuration, the CLI prints the QR code followed by the authorization URL and immediately waits up to five minutes for activation. The only terminal choice is also `Y`, which skips optional authorization and continues initialization.
|
|
50
54
|
|
|
55
|
+
Rerun `agentbot init` after upgrading Agent Bot. It non-destructively upgrades an existing `config.yaml` by adding settings missing from the current bundled template while preserving user values, comments, custom Agents, and intentionally omitted template Agents. It also appends active variables missing from the bundled `.env.example` without changing existing values, comments, line endings, or enabling commented optional variables. It repeats the Agent version checks and Feishu configuration audit. Invalid YAML is left untouched and reported as an error. Use `init --reset` only for an explicitly requested full Profile reset.
|
|
56
|
+
|
|
51
57
|
Core messaging configuration includes `im:message.group_msg`, not merely the narrower group-mention scope. Accept `im:message.group_msg:readonly` when an existing app version reports that alias. Feishu cannot add `im:message.group_msg` through the one-click launcher, so Agent Bot excludes it from `addons` and prints a QR code plus a direct filtered Developer Console permission-page URL. The user should add the permission manually, publish the app version, and complete tenant approval if required. Entering `Y` skips only this permission wait and continues with a partial configuration; the bot then cannot respond to ordinary group messages that do not mention it.
|
|
52
58
|
|
|
53
59
|
Initialization always requests all-user group-message delivery. The runtime option `feishu.respondToAllGroupMessages` controls whether Agent Bot uses it: the default `true` responds to ordinary group messages, while `false` requires a mention of the current bot. Private messages are unaffected.
|
|
@@ -131,7 +137,7 @@ agentbot task newgroup <number-or-task-id> [title] [--agent <standard-name>] [--
|
|
|
131
137
|
agentbot task forkgroup <number-or-task-id> [title] [--json]
|
|
132
138
|
```
|
|
133
139
|
|
|
134
|
-
Task IDs may be supplied in full or as an unambiguous prefix. Use `task stop` to ask the running worker to send the
|
|
140
|
+
Task IDs may be supplied in full or as an unambiguous prefix. Use `task stop` to ask the running worker to send the App Server Interrupt signal; leave child-process lifecycle management to the selected Agent.
|
|
135
141
|
|
|
136
142
|
Use `task chat <number-or-task-id>` to read the Feishu chat ID associated with a task from local routing state. Plain output is only the chat ID for scripting. Add `--json` to include the stable task ID, complete context key, and the thread ID for a topic-bound task. This read-only command does not require the Agent Bot server to be running.
|
|
137
143
|
|
|
@@ -174,17 +180,17 @@ Use `/agent` in Feishu to open the unified execution-settings card on its Agent
|
|
|
174
180
|
|
|
175
181
|
Use `/newgroup [title] [--dir <cwd> | --nodir]` in Feishu to create a private group named `[agent] [project directory] <title>`, invite the command sender, and immediately create and bind a new task in that group. `/new` and `/newgroup` share the same project options: an explicit `--dir` overrides the inherited project directory, while `--nodir` forces a Projectless App Server task; reject using both together. Resolve `~`, `~/...`, and `~\...` from the current user's home directory for both commands. Projectless groups omit the project segment and use `[agent] <title>`. The new task inherits the source chat's current task project directory when neither option is present, plus its model, reasoning effort, and permission mode without interrupting or switching the source task. When the source chat has no current task, use the selected agent and its runtime defaults. An explicit title becomes both the group suffix and the task title. When the title is omitted, use task title `新任务` and group name `[agent] [project directory] 新任务 (mm-dd)`, or `[agent] 新任务 (mm-dd)` for Projectless; an explicit title never gets a date suffix. Every new group gets a deterministic scheme-C Identicon avatar: Latin project names display their first word, Chinese names display up to their first four characters, and the normalized full project path hashes into the palette and symmetric node pattern. Projectless groups use the title as the stable seed. Replace the user's home-directory prefix with `~`. The bracketed project-directory value is limited to 15 characters. Longer paths keep the final two directories when they fit, otherwise keep the final directory, truncating the tail only when the final directory itself is overlong. Use `\` on Windows and `/` on macOS/Linux. Do not automatically send a Sessions or Status card to the new group. A later `/new --dir <cwd>` or `/new --nodir` in the group may explicitly replace the inherited project shape.
|
|
176
182
|
|
|
177
|
-
Provider is part of the same inherited execution-settings group as model, reasoning effort, and permission mode. Preserve all four across `/new`, `/newgroup`, `/fork`, `/forkgroup`, and the matching `/sessions` actions. New tasks with no inherited Provider must leave it unset so
|
|
183
|
+
Provider is part of the same inherited execution-settings group as model, reasoning effort, and permission mode. Preserve all four across `/new`, `/newgroup`, `/fork`, `/forkgroup`, and the matching `/sessions` actions. New tasks with no inherited Provider must leave it unset so the selected App Server Agent uses its own default configuration. New-group welcome messages report all four settings.
|
|
178
184
|
|
|
179
185
|
Group names created by `/newgroup` and `/forkgroup` are capped at 60 displayed characters. When the generated name would exceed that limit, truncate only the title portion in the Feishu group name; preserve the underlying Agent Bot task title.
|
|
180
186
|
|
|
181
|
-
Use `/forkgroup [title]` in Feishu to fork the current position into a newly created private group. In a Feishu thread, use the thread's original anchor turn when the thread has no bound task or its bound task has not completed a turn of its own. Once the bound thread task has completed a turn, use its latest locally persisted completed turn; exclude any newer active turn without interrupting it. Resolve this source before generic thread initialization so an unbound thread does not create an intermediate task. Outside a thread, fork the current
|
|
187
|
+
Use `/forkgroup [title]` in Feishu to fork the current position into a newly created private group. In a Feishu thread, use the thread's original anchor turn when the thread has no bound task or its bound task has not completed a turn of its own. Once the bound thread task has completed a turn, use its latest locally persisted completed turn; exclude any newer active turn without interrupting it. Resolve this source before generic thread initialization so an unbound thread does not create an intermediate task. Outside a thread, fork the current App Server task's latest available completed turn. Agent Bot invites the command sender and binds the fork as the new group's current task, but does not automatically send a Sessions or Status card there. The new-group welcome message reports the forked task's model, reasoning effort, and permission type. An explicit title is used directly. Without an explicit title, both the forked task and group name use the same persistent `source title(分支 N)` sequence as `/fork`. `/forkgroup` does not add a date suffix.
|
|
182
188
|
|
|
183
189
|
Use `/new [title] --nodir` to force a new App Server Projectless task even when the current task belongs to a project. `--nodir` and `--dir <cwd>` are mutually exclusive; omitting both preserves the normal project-shape inheritance behavior.
|
|
184
190
|
|
|
185
191
|
Every task in the Feishu `/sessions` card has `New`, `NewGroup`, `Fork`, and `ForkGroup` actions. `New` inherits the source task's project directory, model, reasoning effort, and permission mode, creates a new task, and switches the current chat to it without stopping or forking the source task. `NewGroup` applies the same inheritance in a newly created private group. `Fork` switches the current chat to a branch, while `ForkGroup` binds the branch to a newly created private group; both fork actions use the selected task's latest available completed turn without interrupting an active turn.
|
|
186
192
|
|
|
187
|
-
Use `/fork [number-or-task-id]` in Feishu to branch from the current or specified
|
|
193
|
+
Use `/fork [number-or-task-id]` in Feishu to branch from the current or specified App Server task and switch to the new branch. If the source task is running, Agent Bot forks from its latest completed turn and leaves the active turn running; it rejects only when the task has no completed turn yet. Every fork request sends `excludeTurns: true` to the App Server so the response omits populated turns without removing turns from the forked history. Older App Servers that explicitly reject this experimental field are retried once without it; ambiguous failures such as timeouts or disconnects are not retried.
|
|
188
194
|
|
|
189
195
|
Status cards include a `Refresh` action that reads the latest task state and updates the same card in place without switching tasks or sending another card.
|
|
190
196
|
|