@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.
Files changed (84) hide show
  1. package/admin-out/404.html +1 -1
  2. package/admin-out/_next/static/chunks/{133-33aa091fba853037.js → 422-cc74b1fdd3af5415.js} +1 -1
  3. package/admin-out/_next/static/chunks/989-e0faeff1c4a0b0b9.js +1 -0
  4. package/admin-out/_next/static/chunks/app/page-44f707ea8dad57da.js +1 -0
  5. package/admin-out/_next/static/chunks/{webpack-1a264efd965db7ab.js → webpack-edf248e07333566d.js} +1 -1
  6. package/admin-out/_next/static/css/b8c87b919758c52b.css +3 -0
  7. package/admin-out/index.html +1 -1
  8. package/admin-out/index.txt +5 -5
  9. package/bundled-docs/design/agent.md +10 -8
  10. package/bundled-docs/design/agentcore.md +13 -10
  11. package/bundled-docs/design/architecture.md +24 -14
  12. package/bundled-docs/design/canvas-extensions.md +19 -4
  13. package/bundled-docs/design/command.md +5 -5
  14. package/bundled-docs/design/cron.md +2 -2
  15. package/bundled-docs/design/evolution.md +34 -35
  16. package/bundled-docs/design/express-self.md +6 -4
  17. package/bundled-docs/design/feishu.md +18 -14
  18. package/bundled-docs/design/halo-city.md +5 -4
  19. package/bundled-docs/design/observability.md +9 -9
  20. package/bundled-docs/design/prompt-system.md +12 -12
  21. package/bundled-docs/design/session.md +14 -14
  22. package/bundled-docs/design/slack.md +22 -20
  23. package/bundled-docs/design/storage.md +30 -29
  24. package/bundled-docs/design/telegram.md +26 -8
  25. package/bundled-docs/design/web.md +3 -1
  26. package/bundled-docs/design/wechat.md +8 -6
  27. package/bundled-docs/design/wecom.md +23 -9
  28. package/bundled-docs/design/ws.md +6 -6
  29. package/bundled-docs/dev/acp-adapter.md +8 -8
  30. package/bundled-docs/dev/add-channel.md +12 -9
  31. package/bundled-docs/dev/add-model-provider.md +31 -20
  32. package/bundled-docs/dev/api.md +86 -57
  33. package/bundled-docs/dev/deploy.md +8 -6
  34. package/bundled-docs/dev/env.md +29 -21
  35. package/bundled-docs/dev/logging.md +15 -29
  36. package/bundled-docs/dev/previews.md +20 -11
  37. package/bundled-docs/dev/tools.md +26 -14
  38. package/bundled-docs/guide/README.md +1 -0
  39. package/bundled-docs/guide/agents.md +19 -53
  40. package/bundled-docs/guide/channels/README.md +7 -4
  41. package/bundled-docs/guide/channels/acp.md +3 -1
  42. package/bundled-docs/guide/channels/feishu.md +13 -11
  43. package/bundled-docs/guide/channels/slack.md +12 -10
  44. package/bundled-docs/guide/channels/telegram.md +21 -27
  45. package/bundled-docs/guide/channels/web.md +15 -11
  46. package/bundled-docs/guide/channels/wechat.md +15 -14
  47. package/bundled-docs/guide/channels/wecom.md +7 -2
  48. package/bundled-docs/guide/chat.md +10 -9
  49. package/bundled-docs/guide/cli.md +10 -8
  50. package/bundled-docs/guide/delegation-and-access.md +1 -1
  51. package/bundled-docs/guide/getting-started.md +3 -3
  52. package/bundled-docs/guide/secrets-and-credentials.md +3 -3
  53. package/bundled-docs/guide/sessions.md +3 -3
  54. package/bundled-docs/guide/skills.md +9 -7
  55. package/bundled-docs/guide/testing-agents-and-skills.md +14 -15
  56. package/bundled-docs/guide/workspace.md +29 -17
  57. package/bundled-docs/requirements/agent.md +19 -18
  58. package/bundled-docs/requirements/chat.md +16 -17
  59. package/bundled-docs/requirements/command.md +10 -10
  60. package/bundled-docs/requirements/editor.md +12 -10
  61. package/bundled-docs/requirements/explorer.md +10 -7
  62. package/bundled-docs/requirements/session.md +16 -17
  63. package/bundled-docs/requirements/settings.md +30 -18
  64. package/bundled-docs/requirements/skill.md +4 -4
  65. package/bundled-docs/requirements/source-control.md +4 -3
  66. package/bundled-docs/requirements/terminal.md +13 -13
  67. package/bundled-docs/requirements/workspace.md +19 -13
  68. package/dist/index.js +10587 -12088
  69. package/package.json +1 -1
  70. package/templates/agents/default/agent.yaml +1 -0
  71. package/templates/config.yaml +6 -0
  72. package/templates/skills/extension/SKILL.md +25 -14
  73. package/templates/skills/extension/config.yaml +9 -0
  74. package/templates/skills/extension/templates/ext.sh +166 -34
  75. package/templates/skills/web-search/SKILL.md +20 -6
  76. package/templates/skills/web-search/config.yaml +13 -0
  77. package/templates/skills/web-search/search.py +27 -6
  78. package/templates/skills/workspace/share.md +11 -3
  79. package/templates/skills/workspace/stage.py +85 -5
  80. package/admin-out/_next/static/chunks/989-92e9683ae8d39750.js +0 -1
  81. package/admin-out/_next/static/chunks/app/page-7a635969198fc62b.js +0 -1
  82. package/admin-out/_next/static/css/4ea5f674146e54d8.css +0 -3
  83. /package/admin-out/_next/static/{lm8Bz3ugTSORyuSXfyx56 → visjvN510yFK-Ff5zwx-0}/_buildManifest.js +0 -0
  84. /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 `VerticalTabList` + `ResizableSidebar` components as the chat session tabs). Each row has a terminal icon and its name, and a ✕ to close it, shown while more than one terminal is open. A "+" at the bottom opens a new terminal
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
- | Skill mini-workspace terminal | The skill directory (cwd prop passed by caller) |
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:108](../../../packages/admin/src/features/terminal/terminal-panel.tsx#L108); backend resolution in [packages/server/src/ws/terminal-manager.ts:46](../../../packages/server/src/ws/terminal-manager.ts#L46).
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. Close and reopen to pick up the new workspace root.
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** (typical after a transient WS reconnect): 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 the previous instance was disposed): 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.
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 | Start in skill mini-workspace | cwd is the skill directory (`pwd` confirms) |
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 exitCode=0; tab shows closed |
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 + a resizable bottom panel.
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
- Most tabs use the standard layout (with bottom panel):
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
- **Skills** is an exception — SkillsMain (file tree + Canvas) uses the full height, no bottom panel.
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
- | MessageSquare | Sessions | Session list | Session message viewer | Chat + Terminal |
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) | Chat + Terminal |
37
- | MessageCircle | Channels | Channel list | Channel config editor | Chat + Terminal |
38
- | Sparkles | Evolution | — | Evolution main (run/apply review) | Chat + Terminal |
39
- | Clock | Cron | — | Cron job list + run audit | Chat + Terminal |
40
- | Settings2 | Settings | — | Settings panel | Chat + Terminal |
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 float button on the far right. Toggling it detaches the panel into a draggable window:
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 at a time (xterm DOM gets rebuilt once on dock/undock; server-side terminal sessions are preserved and reattached, scroll buffer is lost)
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
- | Alt + W | Close current tab (Cmd+W cannot be overridden in browsers) |
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