@turmind/halo 1.5.4 → 1.5.6
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/admin-out/404.html +1 -1
- package/admin-out/_next/static/chunks/{133-33aa091fba853037.js → 422-cc74b1fdd3af5415.js} +1 -1
- package/admin-out/_next/static/chunks/989-e0faeff1c4a0b0b9.js +1 -0
- package/admin-out/_next/static/chunks/app/page-44f707ea8dad57da.js +1 -0
- package/admin-out/_next/static/chunks/{webpack-1a264efd965db7ab.js → webpack-edf248e07333566d.js} +1 -1
- package/admin-out/_next/static/css/b8c87b919758c52b.css +3 -0
- package/admin-out/index.html +1 -1
- package/admin-out/index.txt +5 -5
- package/bundled-docs/design/agent.md +10 -8
- package/bundled-docs/design/agentcore.md +13 -10
- package/bundled-docs/design/architecture.md +24 -14
- package/bundled-docs/design/canvas-extensions.md +19 -4
- package/bundled-docs/design/command.md +5 -5
- package/bundled-docs/design/cron.md +2 -2
- package/bundled-docs/design/evolution.md +34 -35
- package/bundled-docs/design/express-self.md +6 -4
- package/bundled-docs/design/feishu.md +18 -14
- package/bundled-docs/design/halo-city.md +5 -4
- package/bundled-docs/design/observability.md +9 -9
- package/bundled-docs/design/prompt-system.md +12 -12
- package/bundled-docs/design/session.md +14 -14
- package/bundled-docs/design/slack.md +22 -20
- package/bundled-docs/design/storage.md +30 -29
- package/bundled-docs/design/telegram.md +26 -8
- package/bundled-docs/design/web.md +3 -1
- package/bundled-docs/design/wechat.md +8 -6
- package/bundled-docs/design/wecom.md +23 -9
- package/bundled-docs/design/ws.md +6 -6
- package/bundled-docs/dev/acp-adapter.md +8 -8
- package/bundled-docs/dev/add-channel.md +12 -9
- package/bundled-docs/dev/add-model-provider.md +31 -20
- package/bundled-docs/dev/api.md +86 -57
- package/bundled-docs/dev/deploy.md +8 -6
- package/bundled-docs/dev/env.md +29 -21
- package/bundled-docs/dev/logging.md +15 -29
- package/bundled-docs/dev/previews.md +20 -11
- package/bundled-docs/dev/tools.md +26 -14
- package/bundled-docs/guide/README.md +1 -0
- package/bundled-docs/guide/agents.md +19 -53
- package/bundled-docs/guide/channels/README.md +7 -4
- package/bundled-docs/guide/channels/acp.md +3 -1
- package/bundled-docs/guide/channels/feishu.md +13 -11
- package/bundled-docs/guide/channels/slack.md +12 -10
- package/bundled-docs/guide/channels/telegram.md +21 -27
- package/bundled-docs/guide/channels/web.md +15 -11
- package/bundled-docs/guide/channels/wechat.md +15 -14
- package/bundled-docs/guide/channels/wecom.md +7 -2
- package/bundled-docs/guide/chat.md +10 -9
- package/bundled-docs/guide/cli.md +10 -8
- package/bundled-docs/guide/delegation-and-access.md +1 -1
- package/bundled-docs/guide/getting-started.md +3 -3
- package/bundled-docs/guide/secrets-and-credentials.md +3 -3
- package/bundled-docs/guide/sessions.md +3 -3
- package/bundled-docs/guide/skills.md +9 -7
- package/bundled-docs/guide/testing-agents-and-skills.md +14 -15
- package/bundled-docs/guide/workspace.md +29 -17
- package/bundled-docs/requirements/agent.md +19 -18
- package/bundled-docs/requirements/chat.md +16 -17
- package/bundled-docs/requirements/command.md +10 -10
- package/bundled-docs/requirements/editor.md +12 -10
- package/bundled-docs/requirements/explorer.md +10 -7
- package/bundled-docs/requirements/session.md +16 -17
- package/bundled-docs/requirements/settings.md +30 -18
- package/bundled-docs/requirements/skill.md +4 -4
- package/bundled-docs/requirements/source-control.md +4 -3
- package/bundled-docs/requirements/terminal.md +13 -13
- package/bundled-docs/requirements/workspace.md +19 -13
- package/dist/index.js +10587 -12088
- package/package.json +1 -1
- package/templates/agents/default/agent.yaml +1 -0
- package/templates/config.yaml +6 -0
- package/templates/skills/extension/SKILL.md +25 -14
- package/templates/skills/extension/config.yaml +9 -0
- package/templates/skills/extension/templates/ext.sh +166 -34
- package/templates/skills/web-search/SKILL.md +20 -6
- package/templates/skills/web-search/config.yaml +13 -0
- package/templates/skills/web-search/search.py +27 -6
- package/templates/skills/workspace/share.md +11 -3
- package/templates/skills/workspace/stage.py +85 -5
- package/admin-out/_next/static/chunks/989-92e9683ae8d39750.js +0 -1
- package/admin-out/_next/static/chunks/app/page-7a635969198fc62b.js +0 -1
- package/admin-out/_next/static/css/4ea5f674146e54d8.css +0 -3
- /package/admin-out/_next/static/{lm8Bz3ugTSORyuSXfyx56 → visjvN510yFK-Ff5zwx-0}/_buildManifest.js +0 -0
- /package/admin-out/_next/static/{lm8Bz3ugTSORyuSXfyx56 → visjvN510yFK-Ff5zwx-0}/_ssgManifest.js +0 -0
|
@@ -5,11 +5,11 @@ xterm.js terminal with a node-pty backend, multi-tab, reconnect-resilient.
|
|
|
5
5
|
## Core behaviour
|
|
6
6
|
|
|
7
7
|
### Multi-tab
|
|
8
|
-
- Each tab owns an independent PTY
|
|
8
|
+
- Each tab owns an independent PTY; the first one is spawned only when the Terminal tab is first opened
|
|
9
9
|
- Every terminal has a unique `terminalId` for routing
|
|
10
10
|
- Tabs close independently
|
|
11
11
|
- All tabs on a client share one WebSocket connection (multiplexed by `terminalId`)
|
|
12
|
-
- The tab list is a column of Chrome-style **vertical tabs** on the right of the terminal (same `
|
|
12
|
+
- The tab list is a column of Chrome-style **vertical tabs** on the right of the terminal (same `VerticalTabRow` / `ResizableSidebar` components as the chat session tabs). Each row has a terminal icon and its name, and a ✕ that closes just that terminal; it appears on hover only, and not at all while a single terminal is left. A "+" at the bottom opens a new terminal
|
|
13
13
|
- The list can be **resized** by dragging its left edge (120–480px, default 160px), and **collapsed** to a `w-10` rail of square icons with a "+" at the bottom. Both settings persist globally in `localStorage` (`halo_terminal_sidebar_open`, `halo_terminal_sidebar_width`)
|
|
14
14
|
|
|
15
15
|
### Working directory
|
|
@@ -17,12 +17,12 @@ xterm.js terminal with a node-pty backend, multi-tab, reconnect-resilient.
|
|
|
17
17
|
| Scenario | Initial cwd |
|
|
18
18
|
|---|---|
|
|
19
19
|
| Default workspace terminal | Current project's workspace root (`activeProject.path`) |
|
|
20
|
-
|
|
|
20
|
+
| Explorer context menu → open in terminal | A new terminal in the right-clicked folder (or the file's parent) |
|
|
21
21
|
| No workspace bound | `?folder=` URL param, falling back to server `$HOME` |
|
|
22
22
|
|
|
23
|
-
Derivation in [packages/admin/src/features/terminal/terminal-panel.tsx
|
|
23
|
+
Derivation in `createTerminal` in [packages/admin/src/features/terminal/terminal-panel.tsx](../../../packages/admin/src/features/terminal/terminal-panel.tsx); backend resolution in `TerminalManager.start` in [packages/server/src/ws/terminal-manager.ts](../../../packages/server/src/ws/terminal-manager.ts).
|
|
24
24
|
|
|
25
|
-
Workspace switch does **not** migrate existing terminals — they keep their original cwd
|
|
25
|
+
Workspace switch reloads the page and does **not** migrate existing terminals — they keep their original cwd and are only reattached in their own workspace (within the grace period); the new workspace starts a fresh terminal at its root.
|
|
26
26
|
|
|
27
27
|
### Reconnect resilience
|
|
28
28
|
|
|
@@ -31,19 +31,19 @@ When the WebSocket drops:
|
|
|
31
31
|
1. PTYs are **not killed** — they stay in the module-level `terminals` map with `currentWs = null` (`packages/server/src/ws/terminal-manager.ts`)
|
|
32
32
|
2. Output during detach is buffered (ring buffer, up to `config.limits.terminalOutputBuffer` = 50 KB per terminal)
|
|
33
33
|
3. Grace period: `config.timeout.terminalGrace` (default 5 min)
|
|
34
|
-
4. On reconnect, the client sends `terminal:reattach` (sent on initial mount **and** on every subsequent `_connected` event)
|
|
34
|
+
4. On reconnect, the client sends `terminal:reattach` with its `browserId` and workspace path (sent on initial mount **and** on every subsequent `_connected` event); only PTYs of that browser × workspace are claimed
|
|
35
35
|
5. Server replays the entire output buffer, reattaches live I/O, and responds with `terminal:reattached { terminalIds: [...] }`
|
|
36
36
|
6. If the grace timer expires first, the PTY is killed and the detach entry removed
|
|
37
37
|
|
|
38
38
|
Connection-level liveness and reconnect (server keepalive tolerance, client self-check timer, auth-expiry handling) are owned by the shared WS client — see [design/ws.md](../design/ws.md#client-side-liveness--reconnect).
|
|
39
39
|
|
|
40
|
-
On the reattach handler ([packages/admin/src/features/terminal/terminal-panel.tsx](../../../packages/admin/src/features/terminal/terminal-panel.tsx)), each id in `terminalIds` is dispatched by whether a local xterm instance already exists:
|
|
40
|
+
When the WS drops, the bottom panel remounts `TerminalPanel` (fresh key on `_disconnected`): local xterm instances are disposed without sending `terminal:close`, and the new panel reattaches like a page load. The local scrollback is lost; the server replays only what was buffered while detached. On the reattach handler ([packages/admin/src/features/terminal/terminal-panel.tsx](../../../packages/admin/src/features/terminal/terminal-panel.tsx)), each id in `terminalIds` is dispatched by whether a local xterm instance already exists:
|
|
41
41
|
|
|
42
|
-
- **Already exists** (
|
|
43
|
-
- **Does not exist** (first mount, or the
|
|
42
|
+
- **Already exists** (a reattach without a remount): only a `terminal:resize` is sent so server PTY dimensions resync; the existing instance keeps its scrollback and continues receiving live output.
|
|
43
|
+
- **Does not exist** (first mount, or after the remount above): a fresh xterm container is created and bound to that id. Bracketed paste mode is resynced by locally writing `\x1b[?2004h` into the new instance — bash enabled the mode on the PTY at spawn time, but that sequence went to the disposed instance; without the resync, a multi-line paste into the reattached terminal would be sent unbracketed and execute line by line.
|
|
44
44
|
|
|
45
45
|
### Environment
|
|
46
|
-
- Shell: `$SHELL` or `/bin/bash`
|
|
46
|
+
- Shell: `$SHELL` or `/bin/bash` (`ComSpec` / `powershell.exe` on Windows); bash / zsh / sh / fish start as login shells (`-l`)
|
|
47
47
|
- Terminal type: `xterm-256color`
|
|
48
48
|
- Default size: 80 × 24 (resize requests override)
|
|
49
49
|
- Strips `npm_config_prefix` env (avoids nvm warnings when starting node)
|
|
@@ -95,7 +95,7 @@ Source: [packages/server/src/ws/terminal-manager.ts](../../../packages/server/sr
|
|
|
95
95
|
| Config key | Default | Purpose |
|
|
96
96
|
|---|---|---|
|
|
97
97
|
| `config.timeout.terminalGrace` | 300,000 ms | Detach retention period |
|
|
98
|
-
| `config.limits.terminalOutputBuffer` | 50,000 bytes | Detach output ring buffer cap |
|
|
98
|
+
| `config.limits.terminalOutputBuffer` (setting `general.limits.terminal_scrollback_bytes`) | 50,000 bytes | Detach output ring buffer cap |
|
|
99
99
|
|
|
100
100
|
Defined in [packages/server/src/config.ts](../../../packages/server/src/config.ts).
|
|
101
101
|
|
|
@@ -104,12 +104,12 @@ Defined in [packages/server/src/config.ts](../../../packages/server/src/config.t
|
|
|
104
104
|
| # | Scenario | Expected |
|
|
105
105
|
|---|---|---|
|
|
106
106
|
| T1 | Start, run `ls` | Output arrives; prompt returns |
|
|
107
|
-
| T2 |
|
|
107
|
+
| T2 | Explorer → right-click a folder → Open in Integrated Terminal | A new terminal whose cwd is that folder (`pwd` confirms) |
|
|
108
108
|
| T3 | Resize window | PTY cols/rows update; long-running process (e.g. `watch ls`) reflows |
|
|
109
109
|
| T4 | Disconnect mid-command (`sleep 5 && echo done`) → reconnect within grace period | Buffered output replayed; `done` visible |
|
|
110
110
|
| T5 | Disconnect → wait > grace period → reconnect | Terminal gone (PTY killed at grace expiry) |
|
|
111
111
|
| T6 | Open 3 tabs, close 1 explicitly | Other 2 keep their PTYs; closed one gets `terminal:exit` |
|
|
112
|
-
| T7 | `exit` from within shell | `terminal:exit` with
|
|
112
|
+
| T7 | `exit` from within shell | `terminal:exit` with the shell's exit code; the terminal prints `[Process exited]` and its tab stays until closed |
|
|
113
113
|
| T8 | Paste a 10 KB block | Sent as `terminal:input` without choking; shell echoes in chunks |
|
|
114
114
|
|
|
115
115
|
Follows the pattern of [test/session.md](../test/session.md).
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Workspace Layout — Requirements
|
|
2
2
|
|
|
3
|
-
Overall workspace layout: Activity Bar + Sidebar + main content
|
|
3
|
+
Overall workspace layout: Activity Bar + Sidebar + main content; the Explorer tab adds a resizable bottom panel.
|
|
4
4
|
|
|
5
5
|
## Layout structure
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The Explorer tab uses the layout with the docked bottom panel:
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
+---+-------------+---------------------------+
|
|
@@ -22,22 +22,27 @@ Most tabs use the standard layout (with bottom panel):
|
|
|
22
22
|
+---+--------------+---------------------------+
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Every other tab uses the full height with no docked bottom panel (Skills: SkillsMain = file tree + Canvas).
|
|
26
26
|
|
|
27
|
-
The Bottom Panel (Chat + Terminal) can also be **floated** into a draggable window that survives activity-tab switching — see "Bottom panel" below.
|
|
27
|
+
The Bottom Panel (Chat + Terminal) can also be **floated** into a draggable window that survives activity-tab switching, or **maximized** over the whole viewport — see "Bottom panel" below.
|
|
28
28
|
|
|
29
29
|
## Activity Bar tabs
|
|
30
30
|
|
|
31
31
|
| Icon | Tab | Sidebar | Main content | Bottom panel |
|
|
32
32
|
|---|---|---|---|---|
|
|
33
33
|
| FolderTree | Explorer | File tree + ops | Canvas (Monaco + previews) | Chat + Terminal |
|
|
34
|
-
|
|
|
34
|
+
| GitBranch | Source Control | Changes + commit box | Diff / history graph | — |
|
|
35
|
+
| MessageSquare | Sessions | Session list | Session message viewer | — |
|
|
35
36
|
| Zap | Skills | Skill list | SkillsMain (full height) | — |
|
|
36
|
-
| Bot | Agents | — | Agent config editor + Test (full width) |
|
|
37
|
-
| MessageCircle | Channels | Channel list | Channel config editor |
|
|
38
|
-
| Sparkles | Evolution |
|
|
39
|
-
| Clock | Cron |
|
|
40
|
-
| Settings2 | Settings | — | Settings panel |
|
|
37
|
+
| Bot | Agents | — | Agent config editor + Test (full width) | — |
|
|
38
|
+
| MessageCircle | Channels | Channel list | Channel config editor | — |
|
|
39
|
+
| Sparkles | Evolution | Run list + status filters | Evolution main (run/apply review) | — |
|
|
40
|
+
| Clock | Cron | Job list | Cron job detail / form + run audit | — |
|
|
41
|
+
| Settings2 | Settings | — | Settings panel | — |
|
|
42
|
+
|
|
43
|
+
The Source Control entry is hidden in workspaces that are not git repos.
|
|
44
|
+
|
|
45
|
+
Below Settings sits the quick-toggles entry (network status, finish notification, and on desktop pin / keep-screen-awake) — see [explorer.md → Desktop windows](explorer.md#desktop-windows-multi-window).
|
|
41
46
|
|
|
42
47
|
## Resizable panels
|
|
43
48
|
- **Sidebar width**: drag between sidebar and main content
|
|
@@ -53,12 +58,12 @@ Two tabs:
|
|
|
53
58
|
Current tab stored in `editorStore.bottomTab`.
|
|
54
59
|
|
|
55
60
|
### Floating mode
|
|
56
|
-
The tab bar has a
|
|
61
|
+
The tab bar has a maximize button and, at the far right, a float button. Toggling the float button detaches the panel into a draggable window:
|
|
57
62
|
- **Default position/size**: bottom-right corner, 480×640 with a 24px margin
|
|
58
63
|
- **Drag**: grab the tab bar (anywhere except buttons) to reposition
|
|
59
64
|
- **Resize**: four edges (N/S/E/W) + four corners (NW/NE/SW/SE), minimum size 320×240
|
|
60
65
|
- **Visible from any activity tab** — Explorer's in-layout bottom panel is hidden while floating; Canvas takes full height
|
|
61
|
-
- **Only one instance** mounted
|
|
66
|
+
- **Only one instance** is mounted; dock / undock / maximize just move it, so terminals and their scroll buffers survive
|
|
62
67
|
- **State is in `sessionStorage`** (`halo_bottom_floating` + `halo_bottom_float_rect`) — page refresh reverts to docked mode
|
|
63
68
|
- **Agent "Test" button** dispatches `halo:navigate → explorer` to surface Chat; this jump is suppressed while floating since Chat is already globally visible
|
|
64
69
|
- **Close (✕) button** on the float window's tab bar docks it back
|
|
@@ -69,7 +74,8 @@ The tab bar has a float button on the far right. Toggling it detaches the panel
|
|
|
69
74
|
|---|---|
|
|
70
75
|
| Cmd/Ctrl + P | Quick Open (fuzzy file search) |
|
|
71
76
|
| Cmd/Ctrl + S | Save current file |
|
|
72
|
-
|
|
|
77
|
+
| Cmd/Ctrl + ` | Toggle the bottom panel between Chat and Terminal |
|
|
78
|
+
| Alt + W | Close current tab (Cmd+W cannot be overridden in browsers; the desktop app uses Cmd/Ctrl + W) |
|
|
73
79
|
|
|
74
80
|
## Auth
|
|
75
81
|
|