@keyou007/agent-bot 0.1.27-alpha.0 → 0.1.27-alpha.1
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 +11 -5
- package/README.zh.md +10 -4
- package/SECURITY.md +4 -4
- package/dist/feishu/CardRenderer.js +2 -2
- package/dist/feishu/CardRenderer.js.map +1 -1
- package/dist/local-files/GitDiffPreview.js +163 -0
- package/dist/local-files/GitDiffPreview.js.map +1 -0
- package/dist/local-files/LocalFileViewerServer.js +63 -9
- package/dist/local-files/LocalFileViewerServer.js.map +1 -1
- package/dist/local-files/TurnPreviewPage.js +106 -48
- package/dist/local-files/TurnPreviewPage.js.map +1 -1
- package/dist/terminal/TerminalPage.js +42 -13
- package/dist/terminal/TerminalPage.js.map +1 -1
- package/dist/terminal/TerminalServer.js +25 -20
- package/dist/terminal/TerminalServer.js.map +1 -1
- package/docs/technical-reference.md +14 -4
- package/docs/technical-reference.zh.md +14 -4
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/skills/agent-bot/SKILL.md +4 -2
- package/src/feishu/CardRenderer.ts +2 -2
- package/src/local-files/GitDiffPreview.ts +141 -0
- package/src/local-files/LocalFileViewerServer.ts +54 -9
- package/src/local-files/TurnPreviewPage.ts +124 -60
- package/src/terminal/TerminalPage.ts +43 -13
- package/src/terminal/TerminalServer.ts +25 -16
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.27-alpha.1] - 2026-11-28
|
|
10
|
+
|
|
11
|
+
- Keep Turn Preview file-list, tool and reasoning disclosure states when returning from a file/diff page or reloading the same history entry. Restore only expanded lazy details, isolate state by Turn, and resume live updates after back-forward cache restoration.
|
|
12
|
+
|
|
13
|
+
- Open changed-file links from Turn Preview summaries/tool details as full-file inline Git diffs when available: retain all unchanged context, highlight additions/deletions, and show old/new line numbers. Include staged/unstaged changes and tracked deletions, verify source/patch consistency, keep ordinary previews/downloads as fallbacks, read Git only on file open with bounded execution/output, and disable repository external diff/textconv/clean/process/fsmonitor commands.
|
|
14
|
+
|
|
15
|
+
- Show the terminal password settings shortcut, prefill the public default `123456` only while it remains configured, and connect after a cancellable five-second countdown. Keep custom passwords private, use normal server authentication, and skip the countdown for existing browser grants and running-Shell recovery.
|
|
16
|
+
|
|
17
|
+
- Reopen running browser terminals directly without another password, retaining the original Shell/output and revoking older browser access. First-start terminals still require the password; closed, expired and pre-restart terminals cannot be revived. Treat running-terminal recovery links as private credentials.
|
|
18
|
+
- Keep disconnected terminal Shells for thirty minutes instead of three, independently of the thirty-minute idle timeout. Move lifecycle help from the permanent page footer into the Close Terminal button tooltip and confirmation.
|
|
19
|
+
|
|
9
20
|
## [0.1.27-alpha.0] - 2026-11-22
|
|
10
21
|
|
|
11
22
|
- Generate macOS LaunchAgents with `ProcessType=Standard` instead of `Background`, avoiding background scheduling for user-requested Agent and build work. Re-register existing Profiles with `agentbot server autostart enable`, then reload the LaunchAgent after active work has finished (for example by logging out and back in); an ordinary Agent Bot restart alone does not replace an already-loaded launchd policy.
|
package/README.md
CHANGED
|
@@ -380,17 +380,21 @@ The **Terminal** field on management cards shows the 8-character token from that
|
|
|
380
380
|
|
|
381
381
|
Enter the terminal password in the webpage to connect; no Feishu approval is required. The default is **`123456`** when `terminal.password` is absent. The owner can change it in **`/settings` > Advanced > Terminal Password**, then safely restart to activate it. Saved passwords are not displayed in cards; leaving the field blank keeps the current password. Use a strong password before exposing the terminal to other devices. Passwords grant full host-user Shell access and are stored in the local Profile YAML.
|
|
382
382
|
|
|
383
|
-
|
|
383
|
+
The password page points to `/setting` (an abbreviation of `/settings`) > Advanced > Terminal Password. While the effective password is still `123456`, it prefills that default and automatically connects after a visible five-second countdown. Editing the field, connecting manually, hiding/leaving the page or going offline cancels the countdown. Custom passwords are never prefilled or sent to the page and require manual login. Saved browser sessions and running-Shell recovery connect without waiting.
|
|
384
|
+
|
|
385
|
+
A **terminal management card** is sent to the original command conversation/topic, never redirected to private chat. Only the configured owner may close or refresh it. Reopen automatically restores a running Shell without another password, revoking the old tab's access and replaying its output. Keep recovery links private: anyone holding one can reconnect while that Shell is running. An unstarted Shell still requires the password. Close and Refresh work without the webpage. Running Shells can reconnect while safe restart waits; first-start Shells cannot. Ended or pre-restart Shells cannot be recovered. Open Terminal on the original command card creates a new Shell.
|
|
384
386
|
|
|
385
387
|
Refresh/reconnect restores terminal output without sending historical device-query responses back to the Shell, preventing stray input such as `?1;2c`. Initial startup and live queries still receive normal responses.
|
|
386
388
|
|
|
387
|
-
|
|
389
|
+
On mobile, the connected terminal uses a compact toolbar without the repeated page title. Long directories are ellipsized, while connection errors remain fully visible and all three action buttons remain accessible.
|
|
390
|
+
|
|
391
|
+
Restoring network connectivity automatically resumes the existing browser session. Reconnect reuses its credentials, without resending the password or creating another Shell. Expiry or closure stops recovery; only creating or first starting a Shell requires the password. Failed password attempts are rate-limited.
|
|
388
392
|
|
|
389
393
|
Feishu `!` command cards offer **Open Terminal**. Enter the password and connect to start a **separate Shell in the card's working directory**: it never replays, attaches to, or stops the original command. Commands run as the Agent Bot host's OS user, not in the Agent sandbox.
|
|
390
394
|
|
|
391
|
-
xterm.js supports continuous input, ANSI colors, Ctrl+C, resize, and refresh/reconnect in the same browser tab. Windows uses ConPTY/PowerShell (preferring `pwsh`); macOS/Linux use a Unix PTY with the user's Shell. Input highlighting depends on the Shell and plugins such as PSReadLine. Up to three sessions may be open. Close Terminal ends the Shell immediately. Closing a tab starts a
|
|
395
|
+
xterm.js supports continuous input, ANSI colors, Ctrl+C, resize, and refresh/reconnect in the same browser tab. Windows uses ConPTY/PowerShell (preferring `pwsh`); macOS/Linux use a Unix PTY with the user's Shell. Input highlighting depends on the Shell and plugins such as PSReadLine. Up to three sessions may be open. Close Terminal ends the Shell immediately; its tooltip and confirmation contain the lifecycle help instead of a permanent page footer. Closing a tab starts a thirty-minute disconnect timeout; successfully reconnecting in time cancels it and restarts the thirty-minute idle timeout, but background output does not extend the disconnect deadline. A connected foreground page prevents idle closure. Hiding it starts the thirty-minute input/output idle timeout; input/output resets that timeout. Background idle and disconnect timeouts are independent: either can close the Shell. Sessions expire after eight hours total and do not survive Agent Bot restart. Detached background processes may outlive the Shell.
|
|
392
396
|
|
|
393
|
-
Terminal links share **the exact Preview protocol, host, port and base path**. Command and management-card links both use `/terminal/<8-character-token>`; the server selects new-shell or recovery behavior from the token. Tokens are URL-safe and case-sensitive
|
|
397
|
+
Terminal links share **the exact Preview protocol, host, port and base path**. Command and management-card links both use `/terminal/<8-character-token>`; the server selects new-shell or recovery behavior from the token. Tokens are URL-safe and case-sensitive. Command links only locate jobs and require password login; recovery links authorize reattachment to a running Shell and must be kept private. Command links remain valid after restart, while recovery links expire with their Shell. Only this terminal link format is supported. They reuse `fileViewer` network selection and `publicBaseUrl`; no separate terminal address or port is needed. HTTP Preview deployments also support terminals: use only trusted networks and configure HTTPS for untrusted/Internet access, since passwords and terminal traffic are otherwise unencrypted. Preview remains read-only and cannot bypass terminal password verification. See [terminal configuration](docs/technical-reference.md#interactive-browser-terminal). Set `terminal.enabled: false` to disable; disabling Preview also disables terminals. Safe restart waits for active terminals and temporarily blocks new ones.
|
|
394
398
|
|
|
395
399
|
## Configuration And Data
|
|
396
400
|
|
|
@@ -413,7 +417,7 @@ Relative file links in Feishu answers and thinking cards, such as `outputs/repor
|
|
|
413
417
|
|
|
414
418
|
All Feishu cards and final answers share one outbound image pipeline for sending, replying and updating. Local Markdown images become previewable Feishu images, with unchanged uploads reused across cards and refreshes. Missing files or upload failures fall back to readable text without blocking the card. Code examples, existing Feishu image keys and button callback data remain unchanged; individual cards do not need image-processing flags.
|
|
415
419
|
|
|
416
|
-
Progress cards include a `Preview` button that opens the saved Turn timeline in a compact, mobile-friendly browser view. Reasoning panels use the content title as their collapsed header and show the text directly on expansion. Tool blocks have a single collapse level and start collapsed with a meaningful one-line command summary, a compact duration (`58s` or `2:32`), and completion status. Expanding a block shows the full command prefixed by `$`, followed directly by its results, images, and changed files. Identical output/error logs appear once. Running Turns update live by patching changed sections in place, preserving expanded or collapsed steps, scroll positions, and unchanged image elements instead of reloading them. Token and other metadata updates do not replace the timeline. Collapsed tool steps and the file-change summary initially contain only their headers; commands, logs, images, and file lists are fetched on expansion. Reopening reuses loaded content, and live updates refresh only expanded details whose content changed. Failed loads offer Retry. Finished Turns do not open a live SSE connection. The waiting-for-progress placeholder is hidden once a response or other visible progress is available, and is never shown for finished Turns. Click a file in
|
|
420
|
+
Progress cards include a `Preview` button that opens the saved Turn timeline in a compact, mobile-friendly browser view. Reasoning panels use the content title as their collapsed header and show the text directly on expansion. Tool blocks have a single collapse level and start collapsed with a meaningful one-line command summary, a compact duration (`58s` or `2:32`), and completion status. Expanding a block shows the full command prefixed by `$`, followed directly by its results, images, and changed files. Identical output/error logs appear once. Running Turns update live by patching changed sections in place, preserving expanded or collapsed steps, scroll positions, and unchanged image elements instead of reloading them. Token and other metadata updates do not replace the timeline. Collapsed tool steps and the file-change summary initially contain only their headers; commands, logs, images, and file lists are fetched on expansion. Reopening reuses loaded content, and live updates refresh only expanded details whose content changed. Failed loads offer Retry. Finished Turns do not open a live SSE connection. The waiting-for-progress placeholder is hidden once a response or other visible progress is available, and is never shown for finished Turns. Click a changed file in either list to open its current Git diff when available, or the ordinary file preview otherwise; tracked deletions can also be inspected. Turn previews use the same signed viewer address and access rules as local file links. Beside Final answer, download and copy icons export the original Markdown (including formatting, code blocks, and unchanged link targets), not the rendered HTML. Download saves a UTF-8 `.md` file; Copy uses the clipboard with a fallback for HTTP/LAN previews and shows success or failure feedback. Both work on completed pages and when the final answer arrives live.
|
|
417
421
|
|
|
418
422
|
Opening `/turn <ID or index>` or Preview for an imported summary loads that Turn's execution details from its original Agent session and caches the result. Only summary pages and the selected Turn's full record are requested, never the entire full history; source tasks are not resumed or interrupted. Read failures show their reason separately from the Turn's execution status; reopen the details or refresh Preview to retry. Existing detailed snapshots remain unchanged, and unavailable historical timing or token data is not estimated.
|
|
419
423
|
|
|
@@ -435,6 +439,8 @@ Command approval cards use a short heading and show the reason first, with the c
|
|
|
435
439
|
|
|
436
440
|
TraeX plan-mode confirmations follow the task permission setting: **auto** automatically approves entering Plan mode and approving the plan, while **confirm** shows the plan with `Approve Plan` (or `Enter Plan Mode`), `Reject`, and `Cancel Request` actions. Requests and decisions remain in the card history and live Preview; automatic decisions are labeled as automatic, not as a user click. Approval continues implementation in the same task and on the same progress card when TraeX ends its planning turn. Explicit user instructions to discuss or plan only still apply. If TraeX has already entered Plan mode, Agent Bot verifies completion instead of showing a false approval failure. Otherwise, failed automatic confirmation is reported with manual controls. Preview remains read-only. Cancelling a confirmation is not the same as stopping the task, and waiting turns still block safe restart. Notifications missed by an older running version are not automatically replayed.
|
|
437
441
|
|
|
442
|
+
Changed-file links in Turn Preview's file summary and tool details open the complete current file with inline Git changes when available: unchanged lines remain visible, additions are green, and removed lines are inserted in red at their original positions, with old/new line numbers and current-file line anchors. The diff is read only when opening the file and compares the current worktree (including staged changes) with `HEAD`, not the historical Turn. Tracked deletions remain viewable; View File opens the ordinary preview. Refreshing rereads the diff. Clean/untracked files, non-Git directories, binary files, unavailable Git, oversized diffs/files and files changing during the read fall back to the ordinary viewer when the file exists. Returning to Turn Preview or reloading the same history entry preserves file-list, tool and reasoning expansion states; only expanded details load again, and cached-page returns resume live updates. Other file links, raw/download responses and ordinary live previews are unchanged.
|
|
443
|
+
|
|
438
444
|
Local images in Turn Preview Prompts, Commentary, and results load through signed file URLs, including live updates. Relative image paths resolve from the task's project directory.
|
|
439
445
|
|
|
440
446
|
Attached images from initial and appended user messages are saved with the Turn snapshot and displayed through signed file URLs, including SSE updates and reopening after a restart. Missing cached files show an unavailable placeholder. Older snapshots that never recorded attachment paths cannot restore those images automatically.
|
package/README.zh.md
CHANGED
|
@@ -375,17 +375,21 @@ agentbot schedule delete <计划ID>
|
|
|
375
375
|
|
|
376
376
|
打开网页后输入终端密码即可连接,不再需要飞书授权。未配置 `terminal.password` 时,默认密码为 **`123456`**。所有者可在 **`/settings` → 高级 → 终端密码** 修改,安全重启后生效;卡片不回显已保存密码,留空不修改。密码保存在本机 Profile YAML 中,拥有密码的人可执行主机系统用户权限的命令,向其他设备开放前请更换强密码。
|
|
377
377
|
|
|
378
|
-
|
|
378
|
+
密码页提示可在 `/setting`(`/settings` 的缩写)→ 高级 → 终端密码中修改。实际密码仍为 `123456` 时,自动填入默认值,显示 5 秒倒计时后连接;编辑密码、手动连接、切到后台/离开页面或网络离线均取消倒计时。自定义密码不回填、不下发到网页,仍需手动输入。已有浏览器凭证和运行中终端的恢复不等待倒计时。
|
|
379
|
+
|
|
380
|
+
**终端管理卡**仍发送到原命令所在会话/话题,不转发私聊,仅所有者可关闭或刷新。“重新打开终端”自动恢复仍在运行的原 Shell 和输出,无需再次输入密码,同时撤销旧网页访问。请勿分享恢复链接:持有链接的人可重新连接该运行中的 Shell。尚未启动的 Shell 仍需密码,仅在 WebSocket 鉴权后创建。安全重启等待期间允许重连或关闭已运行 Shell,但不允许首次启动。已结束或服务重启前的终端不能恢复;原命令卡片的 Open Terminal 仍用于创建新终端。
|
|
379
381
|
|
|
380
382
|
刷新/重连仅回放终端画面,不会将历史中的设备查询响应再次送入 Shell,避免命令行出现 `?1;2c` 等多余字符;首次启动和实时查询仍正常响应。
|
|
381
383
|
|
|
382
|
-
|
|
384
|
+
手机端已连接时使用紧凑工具栏,隐藏重复页面标题,长目录省略显示;连接错误仍完整展示,重连、Ctrl+C 和关闭终端三个按钮均保留。
|
|
385
|
+
|
|
386
|
+
网络恢复后自动重连已有浏览器会话,不重复提交密码或创建 Shell;过期或关闭后停止恢复。只有新建或首次启动 Shell 需要输入密码,错误密码尝试有限流保护。
|
|
383
387
|
|
|
384
388
|
飞书 `!` 命令卡片提供 **Open Terminal**。在网页输入密码并连接,即可在卡片目录启动**独立 Shell**;不会重复执行、接管或停止原命令。命令以 Agent Bot 主机的系统用户权限运行,不受 Agent 沙箱限制。
|
|
385
389
|
|
|
386
|
-
xterm.js 支持连续输入、ANSI 颜色、Ctrl+C、尺寸调整和同一浏览器标签页刷新重连。Windows 使用 ConPTY/PowerShell(优先 `pwsh`),macOS/Linux 使用 Unix PTY/用户 Shell。输入语法高亮由 Shell 和 PSReadLine 等插件提供。最多三个会话;“关闭终端”立即停止 Shell
|
|
390
|
+
xterm.js 支持连续输入、ANSI 颜色、Ctrl+C、尺寸调整和同一浏览器标签页刷新重连。Windows 使用 ConPTY/PowerShell(优先 `pwsh`),macOS/Linux 使用 Unix PTY/用户 Shell。输入语法高亮由 Shell 和 PSReadLine 等插件提供。最多三个会话;“关闭终端”立即停止 Shell,生命周期说明收在按钮提示与关闭确认中,不再常驻页面底部;关闭标签页后开始三十分钟断开计时,期间成功重连会取消断开计时并重置 30 分钟空闲计时,后台输出不会延长断开时限。页面连接正常且处于前台时不因空闲关闭;切到后台后开始 30 分钟无输入/输出计时,输入/输出会刷新计时。后台空闲与断开超时是“或”的关系,先到者生效;累计八小时后仍会自动关闭;会话不跨 Agent Bot 重启保留。脱离终端的后台进程可能继续运行。
|
|
387
391
|
|
|
388
|
-
终端链接与 Preview **共用协议、主机、端口及路径前缀**,新建和管理卡恢复入口统一为 `/terminal/<8位token>`,由服务端根据 token 判断新建或恢复。token 使用区分大小写的 URL
|
|
392
|
+
终端链接与 Preview **共用协议、主机、端口及路径前缀**,新建和管理卡恢复入口统一为 `/terminal/<8位token>`,由服务端根据 token 判断新建或恢复。token 使用区分大小写的 URL 安全字符。新建链接仅定位命令,仍需密码;恢复链接可直接重连运行中的 Shell,必须保密。新建链接重启后仍有效,恢复链接随 Shell 结束失效。终端仅支持这一链接格式,复用 `fileViewer` 的网卡选择和 `publicBaseUrl`,无需独立地址或端口。HTTP 会明文传输密码和终端流量,仅用于可信网络;不可信网络/互联网访问请配置 HTTPS。Preview 保持只读,不能绕过终端密码校验。详见[网页终端配置](docs/technical-reference.zh.md#交互式网页终端)。`terminal.enabled: false` 可禁用,关闭 Preview 也会关闭终端。安全重启等待活动终端关闭,等待期间禁止创建新终端。
|
|
389
393
|
|
|
390
394
|
## 配置与数据
|
|
391
395
|
|
|
@@ -430,6 +434,8 @@ Turn Preview 顶部用点分隔各项信息,保留“耗时”标签,Token
|
|
|
430
434
|
|
|
431
435
|
TraeX 的规划模式确认遵循任务权限设置:**auto** 自动同意进入规划模式及批准方案;**confirm** 显示方案和 `Approve Plan`(或 `Enter Plan Mode`)、`Reject`、`Cancel Request` 按钮,等待用户选择。请求和结果保留在思考卡片及实时 Preview 中,自动处理明确标记为“自动同意”,不记为用户点击。方案获批后,TraeX 结束规划轮次时,Agent Bot 在同一任务、同一张思考卡片中继续执行。用户明确要求“仅讨论”“先不要实现”时仍须遵守。若 TraeX 已经成功进入规划模式,Agent Bot 核实后不再误报审批失败;未能确认成功的自动审批仍会提示并恢复手动按钮。Preview 保持只读。取消确认不等同于停止任务,等待确认的轮次仍阻止安全重启。旧版本已丢失的确认通知不会自动补回。
|
|
432
436
|
|
|
437
|
+
Turn Preview 的文件变更汇总和工具详情中,点击变更文件时,有 Git diff 则将差异合并到完整的当前文件中:未改动行全部保留,新增行绿色高亮,删除行在原位置以红色插入,并显示新旧行号和当前文件行号锚点;已删除的跟踪文件也可查看。差异仅在打开文件时读取,比较当前工作区(含已暂存修改)与 `HEAD`,不是该历史 Turn 的固定补丁,刷新会重新读取。“查看文件”返回普通预览。文件无改动、未跟踪、非 Git 目录、二进制、Git 不可用、差异/文件超限或读取期间文件变化时,只要文件仍存在,就回退到普通文件预览。从文件页返回 Turn Preview 或刷新同一历史记录时,会保留文件列表、工具和思考的展开/折叠状态,仅重新加载展开的详情;直接恢复缓存页面时也会接续实时更新。其他文件链接、原始文件/下载及普通文件实时预览保持不变。
|
|
438
|
+
|
|
433
439
|
Turn Preview 的 Prompt、Commentary 和结果中的本地图片通过签名文件链接加载,实时更新时同样生效。相对图片路径按任务的项目目录解析。
|
|
434
440
|
|
|
435
441
|
首条及追加用户消息携带的图片会随 Turn 快照保存,在 Preview 中通过签名链接显示,支持 SSE 更新以及重启后重新打开。缓存文件已删除时会显示不可用提示;旧快照未记录的附件路径不会自动补回。
|
package/SECURITY.md
CHANGED
|
@@ -6,15 +6,15 @@ Security fixes are released for the latest published version of Agent Bot.
|
|
|
6
6
|
|
|
7
7
|
## Interactive Terminal Trust Boundary
|
|
8
8
|
|
|
9
|
-
Terminal management cards in the original command conversation/topic can close their associated Shell without browser credentials. They validate the current owner, exact card and action token. Eight-character URL tokens share `/terminal/<token
|
|
9
|
+
Terminal management cards in the original command conversation/topic can close their associated Shell without browser credentials. They validate the current owner, exact card and action token. Eight-character URL tokens share `/terminal/<token>`; the server selects command or recovery behavior. Command links require password login before starting a Shell. Recovery links grant passwordless reattachment only while their original Shell is running, rotate browser authorization and revoke old access. Keep these links private. Retired recovery tokens stay reserved so they never become new-shell links; do not shorten the independent browser keys or card action tokens. Ended terminals cannot be recovered.
|
|
10
10
|
|
|
11
11
|
The browser terminal executes arbitrary commands as the Agent Bot OS user, outside Agent sandbox settings. Disable it with `terminal.enabled: false` or disable `fileViewer`. Terminal and Preview share `fileViewer` networking and the same origin, but not authorization. Raw files have a no-script response sandbox; rendered HTML has an opaque-origin sandbox without same-origin privilege or network requests. Do not remove those boundaries or serve other arbitrary scripts in this origin. Protect profile files/signing secrets with local user access controls.
|
|
12
12
|
|
|
13
|
-
HTTP terminals are supported for trusted LAN use; traffic is unencrypted. Network interception/tampering can compromise terminal traffic and credentials;
|
|
13
|
+
HTTP terminals are supported for trusted LAN use; traffic is unencrypted. Network interception/tampering can compromise terminal traffic and credentials; password login is not transport encryption. Use HTTPS on untrusted networks or the Internet, preserve Host/Origin and proxy WebSocket upgrades. Never log terminal credentials or traffic.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
New or unstarted Shells require the terminal password, configurable through owner-only `/settings` > Advanced. The public default is `123456`: while it remains configured, the login page prefills it and automatically connects after five seconds. Anyone with a command link can therefore start a Shell under the default configuration; set a strong custom password before exposing the service. Custom passwords are never sent to the page or prefilled. Editing or leaving the login page cancels the countdown; automatic login still uses server-side authentication, rate limits and restart protection. Saved grants and running-Shell recovery do not wait for the countdown. Browser keys live in sessionStorage, not URLs; access to that browser tab or OS account is inside the trust boundary. Shells can read host files and other environment credentials even though internal Feishu/Agent Bot variables are filtered. Shell profiles also execute as that user.
|
|
16
16
|
|
|
17
|
-
Disconnecting retains the Shell for
|
|
17
|
+
Disconnecting retains the Shell for thirty minutes; a successful authenticated reconnection cancels this deadline and restarts thirty idle minutes, but command output does not extend the disconnect deadline. A connected foreground page with fresh visibility heartbeats prevents idle closure; hiding it starts thirty minutes of input/output inactivity. Either timeout closes it. Explicit close, the eight-hour absolute limit and service shutdown still end it. Detached processes may survive. Safe restart waits for active terminals; forced restart interrupts them.
|
|
18
18
|
|
|
19
19
|
## Reporting A Vulnerability
|
|
20
20
|
|
|
@@ -695,8 +695,8 @@ export class CardRenderer {
|
|
|
695
695
|
else {
|
|
696
696
|
const waiting = view.state === "approved";
|
|
697
697
|
const label = waiting ? "打开终端" : "重新打开终端";
|
|
698
|
-
elements.push(markdown(`**状态**:${waiting ? "已授权,等待网页连接" : view.connected ? "已连接" : "网页已断开,Shell 仍在运行"}\n${waiting ? "请返回原网页连接;原网页已关闭时,点击下方“打开终端”。Shell 尚未启动。" : "
|
|
699
|
-
elements.push(markdown(`[${label}](${view.reopenUrl}) ·
|
|
698
|
+
elements.push(markdown(`**状态**:${waiting ? "已授权,等待网页连接" : view.connected ? "已连接" : "网页已断开,Shell 仍在运行"}\n${waiting ? "请返回原网页连接;原网页已关闭时,点击下方“打开终端”。Shell 尚未启动。" : "点击下方“重新打开终端”直接恢复原 Shell,无需再次输入密码。前台连接时不因空闲关闭;后台空闲 30 分钟或网页断开 30 分钟后会自动关闭 Shell,成功重连取消断开计时并重置空闲计时;“关闭终端”会中断其中的命令。"}`));
|
|
699
|
+
elements.push(markdown(`[${label}](${view.reopenUrl}) · ${waiting ? "新网页输入终端密码,连接成功后启动 Shell" : "直接恢复原 Shell"}`));
|
|
700
700
|
elements.push(taskActionRow([{ text: "关闭终端", type: "danger", value: action("close") }, { text: "刷新", value: action("refresh") }]));
|
|
701
701
|
}
|
|
702
702
|
return sectionCard("网页终端管理", elements, view.state === "closed" ? "grey" : "blue");
|