@keyou007/agent-bot 0.1.13-alpha.1 → 0.1.13-alpha.3
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 +11 -0
- package/README.md +106 -103
- package/README.zh.md +76 -73
- package/dist/acp/AcpProcessManager.js +8 -3
- package/dist/acp/AcpProcessManager.js.map +1 -1
- package/dist/acp/AcpSessionManager.js +15 -0
- package/dist/acp/AcpSessionManager.js.map +1 -1
- package/dist/cli/InitializationWelcome.js +116 -0
- package/dist/cli/InitializationWelcome.js.map +1 -0
- package/dist/cli/help.js +4 -2
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/serverStatus.js +27 -0
- package/dist/cli/serverStatus.js.map +1 -1
- package/dist/cli/taskListOutput.js +72 -0
- package/dist/cli/taskListOutput.js.map +1 -0
- package/dist/cli.js +103 -56
- package/dist/cli.js.map +1 -1
- package/dist/codex/CodexProcessManager.js +34 -4
- package/dist/codex/CodexProcessManager.js.map +1 -1
- package/dist/codex/CodexRuntime.js +3 -0
- package/dist/codex/CodexRuntime.js.map +1 -1
- package/dist/feishu/CardRenderer.js +164 -2
- package/dist/feishu/CardRenderer.js.map +1 -1
- package/dist/feishu/FeishuConnector.js +16 -5
- package/dist/feishu/FeishuConnector.js.map +1 -1
- package/dist/index.js +23 -4
- package/dist/index.js.map +1 -1
- package/dist/proxy/ProxySessionController.js +157 -59
- package/dist/proxy/ProxySessionController.js.map +1 -1
- package/dist/runtime/AcpRuntimeAdapter.js +3 -0
- package/dist/runtime/AcpRuntimeAdapter.js.map +1 -1
- package/dist/runtime/agentEnvironment.js +24 -4
- package/dist/runtime/agentEnvironment.js.map +1 -1
- package/dist/runtime/createAgentRuntimeRegistry.js +7 -3
- package/dist/runtime/createAgentRuntimeRegistry.js.map +1 -1
- package/dist/state/StateStore.js +12 -9
- package/dist/state/StateStore.js.map +1 -1
- package/dist/supervision/SafeRestartNotifier.js +1 -9
- package/dist/supervision/SafeRestartNotifier.js.map +1 -1
- package/docs/technical-reference.md +12 -4
- package/docs/technical-reference.zh.md +12 -4
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/skills/agent-bot/SKILL.md +53 -22
- package/src/acp/AcpProcessManager.ts +16 -3
- package/src/acp/AcpSessionManager.ts +14 -0
- package/src/cli/InitializationWelcome.ts +160 -0
- package/src/cli/help.ts +4 -2
- package/src/cli/serverStatus.ts +28 -0
- package/src/cli/taskListOutput.ts +91 -0
- package/src/cli.ts +140 -55
- package/src/codex/CodexProcessManager.ts +38 -3
- package/src/codex/CodexRuntime.ts +6 -0
- package/src/feishu/CardRenderer.ts +204 -1
- package/src/feishu/FeishuConnector.ts +13 -4
- package/src/index.ts +35 -3
- package/src/proxy/ProxySessionController.ts +186 -59
- package/src/runtime/AcpRuntimeAdapter.ts +5 -0
- package/src/runtime/agentEnvironment.ts +41 -3
- package/src/runtime/createAgentRuntimeRegistry.ts +18 -3
- package/src/runtime/types.ts +5 -0
- package/src/state/StateStore.ts +12 -9
- package/src/supervision/SafeRestartNotifier.ts +1 -11
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@ The project follows [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.13-alpha.3] - 2026-08-05
|
|
10
|
+
|
|
11
|
+
- Send a polished, logo-branded private welcome card after every successful `agentbot init`, with first-use capabilities, upgrade highlights, same-version refresh confirmation based on Profile initialization history, and a link to the project Changelog.
|
|
12
|
+
- Limit safe-restart progress cards to the conversations that explicitly requested the restart instead of enrolling recently active chats.
|
|
13
|
+
|
|
14
|
+
## [0.1.13-alpha.2] - 2026-08-04
|
|
15
|
+
|
|
16
|
+
- Show every configured Agent process's PID and initialized version in `agentbot server status` and its JSON output.
|
|
17
|
+
- Stop forwarding Lark credentials and internal restart state to Agent processes; preserve ordinary parent variables while exposing only namespaced, non-secret Agent Bot Profile and Lark identity context.
|
|
18
|
+
- Repair missing turn-parent links after a Worker crash so `/turns` keeps the correct conversation graph across restart recovery.
|
|
19
|
+
|
|
9
20
|
## [0.1.13-alpha.1] - 2026-08-03
|
|
10
21
|
|
|
11
22
|
- Route safe-restart status cards and restarting acknowledgements to every conversation that triggers the pending restart plus every conversation active during the previous minute, retaining each enrolled route until the restart completes while preserving Feishu topic replies; add `agentbot server restart --task <task>` and reject ambiguous CLI routing when multiple conversations are active.
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="assets/agent-bot-logo.png" alt="Agent Bot
|
|
2
|
+
<img src="assets/agent-bot-logo.png" alt="Agent Bot Logo" width="180">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
# Agent Bot
|
|
6
6
|
|
|
7
|
-
Use Codex, TraeX, and compatible ACP agents
|
|
7
|
+
Use local Codex, TraeX, and compatible ACP agents through Feishu.
|
|
8
8
|
|
|
9
9
|
English | [简体中文](README.zh.md)
|
|
10
10
|
|
|
@@ -14,11 +14,11 @@ Agent Bot runs on your computer and connects a Feishu bot to your local coding a
|
|
|
14
14
|
|
|
15
15
|
- Use your existing local Codex or TraeX login from Feishu
|
|
16
16
|
- Create, continue, switch, fork, and stop tasks
|
|
17
|
-
- Reset the current conversation
|
|
18
|
-
-
|
|
17
|
+
- Reset the current conversation from any successfully completed progress card
|
|
18
|
+
- Collaborate with text, images, group chats, and topics
|
|
19
19
|
- Queue follow-up Prompts or add instructions while a task is running
|
|
20
|
-
-
|
|
21
|
-
-
|
|
20
|
+
- Continue existing work after Agent Bot restarts
|
|
21
|
+
- Run through the local Console UI without Feishu
|
|
22
22
|
|
|
23
23
|
## Quick Start
|
|
24
24
|
|
|
@@ -26,153 +26,163 @@ Agent Bot runs on your computer and connects a Feishu bot to your local coding a
|
|
|
26
26
|
|
|
27
27
|
- Node.js 22 or later
|
|
28
28
|
- At least one supported App Server Agent: Codex or TraeX
|
|
29
|
-
- A completed local login for the Agent you
|
|
29
|
+
- A completed local login for the Agent you plan to use
|
|
30
30
|
|
|
31
|
-
Check the installed Agents and login
|
|
31
|
+
Check the installed Agents and their login status:
|
|
32
32
|
|
|
33
|
-
```
|
|
33
|
+
```bash
|
|
34
34
|
codex --version
|
|
35
35
|
codex login status
|
|
36
36
|
traex --version
|
|
37
37
|
traex login status
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
You can continue
|
|
40
|
+
You can continue once either Codex or TraeX is ready. `agentbot init` checks both and can help install or upgrade them.
|
|
41
41
|
|
|
42
42
|
### Install
|
|
43
43
|
|
|
44
|
-
```
|
|
44
|
+
```bash
|
|
45
|
+
# Install the stable version
|
|
45
46
|
npm install --global @keyou007/agent-bot
|
|
47
|
+
# Install the Alpha version to try the latest features
|
|
48
|
+
# npm install --global @keyou007/agent-bot@alpha
|
|
46
49
|
agentbot --version
|
|
47
50
|
agentbot --help
|
|
48
51
|
```
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
```powershell
|
|
53
|
-
npm install --global @keyou007/agent-bot@alpha
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
This installs `agentbot` as the primary command. The legacy `agent-bot` command remains available temporarily, prints a deprecation warning, and will be removed in a future release. Command-line help, status, progress, prompts, and errors follow the system language for Chinese and English locales; all other locales fall back to English. JSON output remains language-neutral and stable. See the [technical reference](docs/technical-reference.md#development-and-source-installation) to install from source.
|
|
53
|
+
See the [technical reference](docs/technical-reference.md#development-and-source-installation) to install from source.
|
|
57
54
|
|
|
58
55
|
### Initialize
|
|
59
56
|
|
|
60
|
-
```
|
|
57
|
+
```bash
|
|
61
58
|
agentbot init
|
|
62
59
|
```
|
|
63
60
|
|
|
64
|
-
Initialization detects Codex and TraeX and reports their installed versions. Missing or outdated Agents are
|
|
61
|
+
Initialization detects Codex and TraeX and reports their installed versions. Missing or outdated Agents are listed with the appropriate install or upgrade commands. Agent Bot saves its configuration to `~/.agent-bot/config.yaml`.
|
|
65
62
|
|
|
66
|
-
|
|
63
|
+
A fresh initialization normally presents three QR-code or link steps in the terminal.
|
|
67
64
|
|
|
68
|
-
|
|
65
|
+
1. **Create the bot.** This creates a Feishu app with the standard basic messaging configuration and saves its App ID, App Secret, and authorizing user. This step cannot be skipped because Agent Bot cannot connect to Feishu without it. Permissions already provided during creation are not repeated below.
|
|
66
|
+
2. **Add the all-group-message permission.** The only additional core permission needed after bot creation is `im:message.group_msg`. It lets Agent Bot receive ordinary group messages that do not @ the bot. Feishu requires this permission to be added manually in the Developer Console. Enter `Y` to skip waiting; private chats still work without it, but group users must @ the bot.
|
|
67
|
+
3. **Add the remaining event and callback.** The bot-creation template already provides the other permissions Agent Bot needs. The third step adds only:
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
| Type | Event or callback | Purpose |
|
|
70
|
+
| ---- | ----------------- | ------- |
|
|
71
|
+
| Event | `im.chat.updated_v1` | Detect group renames and synchronize them to Agent task titles. |
|
|
72
|
+
| Callback | `card.action.trigger` | Enable card button interactions. |
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
After these steps, the `~/.agent-bot` directory is initialized and Agent Bot starts automatically. Every successful `agentbot init` sends a private welcome card containing the Agent Bot logo. The first card introduces the main capabilities; after an upgrade it highlights the new version, while a same-version rerun confirms that the Profile was refreshed.
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
Agent Bot includes a keepalive mechanism that automatically reconnects after Agent Bot, Codex, or TraeX crashes.
|
|
75
77
|
|
|
76
|
-
|
|
77
|
-
| ---------------------- | ----------------------------------- |
|
|
78
|
-
| `--reset` | Back up and fully reset an explicitly selected Profile |
|
|
79
|
-
| `--skip-feishu` | Initialize for Console only; do not start the server |
|
|
80
|
-
| `--reconfigure-feishu` | Replace existing Feishu credentials |
|
|
81
|
-
| `--json` | Print a machine-readable result |
|
|
82
|
-
| `--profile <directory>`| Use an isolated profile directory |
|
|
83
|
-
| `--config <path>` | Use a specific configuration file |
|
|
84
|
-
|
|
85
|
-
After upgrading Agent Bot, rerun `agentbot init` to refresh the Profile. It preserves existing values in `config.yaml` and `.env`, fills settings and environment variables added by the current version, lets you confirm or change the default Agent, and rechecks the Agents and bot configuration. If the server is already running, initialization schedules a safe restart so the current Agent Bot version and refreshed configuration take effect after active work finishes. In a non-interactive terminal, `init` cannot ask for a selection and keeps the already configured default Agent.
|
|
78
|
+
### Start And Stop
|
|
86
79
|
|
|
87
|
-
|
|
80
|
+
Start the service:
|
|
88
81
|
|
|
89
|
-
```
|
|
90
|
-
agentbot
|
|
82
|
+
```bash
|
|
83
|
+
# agentbot init starts the Server automatically, so manual startup is usually unnecessary.
|
|
84
|
+
agentbot server start
|
|
91
85
|
```
|
|
92
86
|
|
|
93
|
-
|
|
87
|
+
Check the service status:
|
|
94
88
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
```powershell
|
|
89
|
+
```bash
|
|
98
90
|
agentbot server status
|
|
99
91
|
```
|
|
100
92
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
The `Agent Bot 已启动` startup card shows the version currently running. It is sent to every known private chat, groups active in the previous minute, and every group enrolled for the current safe restart; topic routes receive it in their parent group.
|
|
93
|
+
Stop the service:
|
|
104
94
|
|
|
105
|
-
|
|
95
|
+
```bash
|
|
96
|
+
agentbot server stop
|
|
97
|
+
```
|
|
106
98
|
|
|
107
|
-
|
|
99
|
+
Safely restart the service:
|
|
108
100
|
|
|
109
|
-
```
|
|
110
|
-
agentbot server
|
|
101
|
+
```bash
|
|
102
|
+
agentbot server restart
|
|
111
103
|
```
|
|
112
104
|
|
|
105
|
+
It waits for currently running Agent tasks to finish before restarting, allowing every task to complete normally.
|
|
106
|
+
|
|
113
107
|
### Update Or Uninstall
|
|
114
108
|
|
|
115
109
|
Stop the running service before replacing or removing the global package:
|
|
116
110
|
|
|
117
|
-
```
|
|
111
|
+
```bash
|
|
118
112
|
agentbot server stop
|
|
119
113
|
npm install --global @keyou007/agent-bot@latest
|
|
120
|
-
agentbot
|
|
114
|
+
agentbot init # Update the Profile and start the Server
|
|
121
115
|
```
|
|
122
116
|
|
|
123
117
|
To uninstall:
|
|
124
118
|
|
|
125
|
-
```
|
|
119
|
+
```bash
|
|
126
120
|
agentbot server stop
|
|
127
121
|
npm uninstall --global @keyou007/agent-bot
|
|
128
122
|
```
|
|
129
123
|
|
|
130
|
-
Uninstalling the npm package does not delete
|
|
124
|
+
Uninstalling the npm package does not delete user data under `~/.agent-bot`.
|
|
131
125
|
|
|
132
|
-
|
|
126
|
+
### Multiple Profiles
|
|
133
127
|
|
|
134
|
-
|
|
128
|
+
Multiple Profiles let you run several independent Agent Bot instances on the same device without interfering with one another.
|
|
135
129
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
agentbot
|
|
130
|
+
Create a new Profile with:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Select a new Profile directory and initialize a new bot
|
|
134
|
+
agentbot --profile ~/.agent-bot-rescue init
|
|
135
|
+
agentbot --profile ~/.agent-bot-rescue server start
|
|
136
|
+
agentbot --profile ~/.agent-bot-rescue server status
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Commands without `--profile` use the main Profile at `~/.agent-bot`.
|
|
140
|
+
|
|
141
|
+
Each Profile stores its own `config.yaml`, `.env`, `data/`, and `logs/` in the selected directory. Feishu credentials and local control endpoints are isolated as well.
|
|
142
|
+
|
|
143
|
+
### Reset A Profile
|
|
144
|
+
|
|
145
|
+
To completely reconfigure an existing Profile, stop its Server and select the Profile explicitly:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
agentbot --profile ~/.agent-bot server stop # Stop the main Profile Server
|
|
149
|
+
agentbot --profile ~/.agent-bot init --reset # Reset the main Profile
|
|
141
150
|
```
|
|
142
151
|
|
|
143
|
-
|
|
152
|
+
Reset moves the current `config.yaml`, `.env`, `data/`, and `logs/` into `.reset-backups`, then creates clean files and directories. Existing backups are retained permanently and are not overwritten or cleaned by later resets. The old remote Feishu app is not deleted.
|
|
144
153
|
|
|
145
|
-
|
|
154
|
+
Reset does not remove Codex or TraeX chat sessions. It only recreates the Feishu bot and clears Agent Bot's local data.
|
|
146
155
|
|
|
147
|
-
|
|
156
|
+
## Daily Commands
|
|
148
157
|
|
|
149
|
-
### Console
|
|
158
|
+
### Console UI/TUI
|
|
150
159
|
|
|
151
|
-
```
|
|
160
|
+
```bash
|
|
152
161
|
agentbot console
|
|
153
162
|
```
|
|
154
163
|
|
|
155
|
-
The Console UI
|
|
164
|
+
The Console UI does not require Feishu credentials. It does not share task state with a running Server unless `--force` is supplied.
|
|
156
165
|
|
|
157
|
-
###
|
|
166
|
+
### Task Management
|
|
158
167
|
|
|
159
|
-
```
|
|
168
|
+
```bash
|
|
160
169
|
agentbot task list
|
|
170
|
+
agentbot task current [--json]
|
|
161
171
|
agentbot task status <task>
|
|
162
172
|
agentbot task prompt <task> "<prompt>"
|
|
163
|
-
agentbot task newgroup <task> [title] [--agent <name>] [--dir <path> | --nodir]
|
|
173
|
+
agentbot task newgroup <task> [title] [--agent <standard-name>] [--dir <path> | --nodir]
|
|
164
174
|
agentbot task forkgroup <task> [title]
|
|
165
175
|
agentbot task title <task> "<title>"
|
|
166
176
|
agentbot task stop <task>
|
|
167
177
|
```
|
|
168
178
|
|
|
169
|
-
`<task>` can be a number from `task list`, a task ID, or an unambiguous task-ID prefix. Run `agentbot --help` for all CLI options.
|
|
179
|
+
`task current` shows details for the Codex or TraeX task currently invoking the CLI. Its JSON output includes Agent Bot's `localSessionId` and the native `remoteSessionId`. `<task>` can be a number from `task list`, a task ID, or an unambiguous task-ID prefix. Run `agentbot --help` for all CLI options.
|
|
170
180
|
|
|
171
|
-
`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
|
|
181
|
+
`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 own Runtime defaults. `--dir` overrides the project directory and supports `~`; `--nodir` forces a Projectless App Server task. `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`.
|
|
172
182
|
|
|
173
183
|
## Feishu Commands
|
|
174
184
|
|
|
175
|
-
|
|
185
|
+
Enter a message beginning with `/` directly in the Feishu chat box to run a command.
|
|
176
186
|
|
|
177
187
|
| Command | Purpose |
|
|
178
188
|
| ---------------------------------------- | ------------------------------------------- |
|
|
@@ -194,30 +204,33 @@ Plain text continues the current task. Messages beginning with `/` are commands.
|
|
|
194
204
|
| `/newgroup [title] [--dir <cwd> \| --nodir]` | Create a private group for a new task |
|
|
195
205
|
| `/forkgroup [title]` | Fork the current position into a private group |
|
|
196
206
|
| `/agent [name]` | Open Agent settings or select the default Agent |
|
|
197
|
-
|
|
|
198
|
-
| `/
|
|
199
|
-
| `/help` | Show in-chat help |
|
|
207
|
+
| `/restart [--force]` | Restart safely, or immediately with `--force` |
|
|
208
|
+
| `/help` | Show in-chat help |
|
|
200
209
|
|
|
201
|
-
Slash commands accept any unique prefix, and compound commands accept registered initialisms: `/sess` runs `/sessions`, `/fg` runs `/forkgroup`, `/ng` runs `/newgroup`, and `/ns` runs `/nosteer`. Exact command names take priority. An ambiguous prefix such as `/s` or `/f` is rejected and
|
|
210
|
+
Slash commands accept any unique prefix, and compound commands accept registered initialisms: `/sess` runs `/sessions`, `/fg` runs `/forkgroup`, `/ng` runs `/newgroup`, and `/ns` runs `/nosteer`. Exact command names take priority. An ambiguous prefix such as `/s` or `/f` is rejected and lists every matching command.
|
|
202
211
|
|
|
203
|
-
|
|
212
|
+
Private chats, group timelines, and topics maintain separate current tasks. You can send an image by itself or together with text. While a task is running, plain text adds instructions; use `/queue` (or `/nosteer`) when you need to guarantee a later turn.
|
|
204
213
|
|
|
205
|
-
|
|
214
|
+
The `/sessions` card shows five tasks per page and uses `Previous` and `Next` to update the card in place. Each task provides `NewGroup` and `ForkGroup` actions, so you can create a same-project group or fork the selected task directly into a new group.
|
|
206
215
|
|
|
207
|
-
|
|
216
|
+
`/turns` opens the current task's completed-turn history, with 10 turns per page. Each turn has its own numbered node and indented content. Graph lanes follow the actual parent turns, preserve Reset branches and merges across pages, and do not connect turns merely because their completion times are adjacent. The active conversation point is marked `Current`; every other entry has a `Reset` button that restores the conversation context to that completed turn and moves the marker there without reverting local files. The success notice shows the selected Prompt summary, completion time, and Turn ID. Turns completed after the selected point remain in history, and turns created on the new branch after Reset are shown as well. Reset is unavailable while the task is running.
|
|
208
217
|
|
|
209
|
-
`/
|
|
218
|
+
Inside a topic, `/forkgroup` forks from the topic's original turn until the topic task has completed a turn of its own. After that, it forks from the topic task's latest completed turn. A running turn is never used as a fork point.
|
|
210
219
|
|
|
211
|
-
|
|
220
|
+
After `/forkgroup` creates a new group, its welcome message shows the forked task's current Provider, model, reasoning effort, and permission type.
|
|
212
221
|
|
|
213
|
-
|
|
222
|
+
`/new` and `/newgroup` support the same project options. Use `--dir <cwd>` to override the inherited project directory, or `--nodir` to force a Projectless App Server task; the two options cannot be combined. In both commands, `~`, `~/...`, and `~\...` represent the current user's home directory. `/newgroup` immediately creates and binds the task in the new group while continuing to inherit the current task's Provider, model, reasoning effort, and permission mode without affecting the source task. If the source chat has no current task, Agent Bot uses the selected Agent and its Runtime defaults. An explicit title becomes both the group-name suffix and the task title.
|
|
214
223
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
When `/newgroup` omits the title, both the task title and the group-title portion use `新任务 (mm-dd)`, producing the default group name `[agent] [project dir] 新任务 (mm-dd)`. Projectless groups omit the project segment entirely, using `[agent] title`. When `/forkgroup` omits the title, its task and group name use the same persistent `source title(分支 N)` sequence as `/fork`, without a date suffix. Feishu group names created by `/newgroup` and `/forkgroup` are capped at 60 displayed characters. When a generated name is too long, Agent Bot truncates only the title portion in the group name; the task title itself stays unchanged.
|
|
224
|
+
When `/newgroup` omits the title, the task title and the title portion of the group name both use `新任务 (mm-dd)`, producing `[agent] [project dir] 新任务 (mm-dd)`. Projectless groups omit the project segment entirely and use `[agent] title`. When `/forkgroup` omits the title, its task and group name use the same persistent `source title(分支 N)` sequence as `/fork`, without a date suffix. Feishu group names created by `/newgroup` and `/forkgroup` display at most 60 characters. If the generated name is too long, Agent Bot truncates only the title portion of the group name; the task title itself remains unchanged.
|
|
218
225
|
|
|
219
226
|
Renaming a bound group to `[agent] [project dir] title` synchronizes only `title` to the current task. The Agent and project-directory prefixes remain group metadata and are never included in the task title. The older `[agent] title` format remains supported.
|
|
220
227
|
|
|
228
|
+
## Local Commands
|
|
229
|
+
|
|
230
|
+
Enter a message beginning with `!` directly in the Feishu chat box to run a local command in the current task directory.
|
|
231
|
+
|
|
232
|
+
For example, `! ls` lists files in the current directory, and `! git status` shows the state of the current Git repository.
|
|
233
|
+
|
|
221
234
|
## Configuration And Data
|
|
222
235
|
|
|
223
236
|
Agent Bot keeps user-owned files outside the repository:
|
|
@@ -231,28 +244,18 @@ Agent Bot keeps user-owned files outside the repository:
|
|
|
231
244
|
|
|
232
245
|
Set `AGENT_BOT_HOME` to use another user-data directory. See [config.example.yaml](config.example.yaml) for configuration examples.
|
|
233
246
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
### Multiple Profiles
|
|
237
|
-
|
|
238
|
-
Commands without `--profile` use the main profile at `~/.agent-bot`. To run another bot with isolated credentials, configuration, data, logs, and local control endpoint, pass its directory explicitly on every command:
|
|
247
|
+
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.
|
|
239
248
|
|
|
240
|
-
|
|
241
|
-
agentbot --profile ~/.agent-bot-rescue init
|
|
242
|
-
agentbot --profile ~/.agent-bot-rescue server start
|
|
243
|
-
agentbot --profile ~/.agent-bot-rescue server status
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
Alternative profiles are directory-based and are not registered by name. Each one uses `config.yaml`, `.env`, `data/`, and `logs/` inside the selected directory. `--profile` cannot be combined with `--config`.
|
|
249
|
+
By default, Agent Bot responds to ordinary messages in groups containing the bot. Set `feishu.respondToAllGroupMessages` to `false` to require users to @ the bot in groups; private chats are unchanged. Initialization still requests the complete group-message permission set so changing this option later does not require another authorization.
|
|
247
250
|
|
|
248
251
|
## Troubleshooting
|
|
249
252
|
|
|
250
|
-
- **The bot does not respond:** run `agentbot server status` and check `~/.agent-bot/logs/agent-bot.log
|
|
251
|
-
- **The Worker restarted after a Node crash:** check `~/.agent-bot/data/last-crash.json`, `~/.agent-bot/logs/worker.stderr.log`, and `~/.agent-bot/data/crash-reports
|
|
252
|
-
- **Feishu permissions are incomplete:** rerun `agentbot init` and follow the displayed authorization steps
|
|
253
|
-
- **An Agent cannot start:** run `codex login status` or `traex login status` as the same operating-system user that runs Agent Bot, then rerun `agentbot init` to check its version
|
|
254
|
-
- **You only need local testing:** run `agentbot init --skip-feishu`, then `agentbot console
|
|
255
|
-
- **A safe restart keeps waiting:** inspect active tasks with `agentbot task list --status running
|
|
253
|
+
- **The bot does not respond:** run `agentbot server status` and check `~/.agent-bot/logs/agent-bot.log`
|
|
254
|
+
- **The Worker restarted after a Node crash:** check `~/.agent-bot/data/last-crash.json`, `~/.agent-bot/logs/worker.stderr.log`, and `~/.agent-bot/data/crash-reports/`
|
|
255
|
+
- **Feishu permissions are incomplete:** rerun `agentbot init` and follow the displayed authorization steps
|
|
256
|
+
- **An Agent cannot start:** run `codex login status` or `traex login status` as the same operating-system user that runs Agent Bot, then rerun `agentbot init` to check its version
|
|
257
|
+
- **You only need local testing:** run `agentbot init --skip-feishu`, then run `agentbot console`
|
|
258
|
+
- **A safe restart keeps waiting:** inspect active tasks with `agentbot task list --status running`
|
|
256
259
|
|
|
257
260
|
## More Documentation
|
|
258
261
|
|