Commit Graph

158 Commits

Author SHA1 Message Date
ekko 022e18dc8f fix windows desktop terminal popups (#1199) 2026-06-01 12:20:10 +08:00
ekko aa7c1c4fbb fix windows bridge logs and mobile headers (#1198) 2026-06-01 11:58:54 +08:00
ekko 15d358f602 fix windows desktop bridge startup (#1196) 2026-06-01 11:30:04 +08:00
ekko 4516502705 add desktop tray and updater support (#1193) 2026-06-01 11:03:18 +08:00
Qiang Han 1fbbfdfad6 fix(context): prefer provider context lengths (#1184) 2026-06-01 09:31:58 +08:00
GoldenFishX 7f9427bde5 fix(file-provider): SSHFileProvider 支持自定义端口 (#1181)
之前 SSHFileProvider 的 sshArgs() 方法硬编码使用默认端口 22,
完全忽略 TERMINAL_SSH_PORT 环境变量配置的自定义 SSH 端口。

修复内容:
- TerminalConfig 接口新增 ssh_port 字段
- SSHFileProvider 构造函数新增 port 参数
- sshArgs() 在 this.port 存在时追加 -p <port>
- getSSHEnvVars() 读取 TERMINAL_SSH_PORT 并解析为整数
- createFileProvider() 工厂函数传入 ssh.port

影响范围:所有通过 SSH 后端的文件操作(读/写/列出/删除/重命名/创建目录/复制/上传)
2026-05-31 19:57:14 +08:00
sir1st 96bdf8d1af fix Windows desktop startup readiness (#1167)
* fix desktop startup readiness on windows

* add manual desktop build workflow

* hide Windows desktop server process window

* hide Windows Python bridge worker windows

* use no-window Python for Windows desktop CLI calls

---------

Co-authored-by: xingzhi <chuzihao.czh@alibaba-inc.com>
2026-05-31 09:17:49 +08:00
ekko c998a53566 [codex] add MCP tools visibility management (#1170)
* feat(mcp): add tools visibility management

## Features
- Tools visibility modal with 3 modes: All, Include, Exclude
- 'Manage Tools' button on McpServerCard (enabled only when connected)
- 'Fetch Tools List' button to refresh available tools (raw mode)
- Responsive design for mobile (480px), tablet (768px), desktop (1280px)
- i18n translations for 9 languages (zh/en/zh-TW/ja/ko/de/es/fr/pt)

## Technical Details
- Add raw parameter to fetchMcpTools API for unfiltered tools
- Pass raw parameter through controller → bridgeMcpAction → client
- Backend _mcp_tools_list supports raw_mode to skip include/exclude filter
- 28 MCP unit tests pass (23 controller + 5 bridge action)

## Files Changed
- McpManagerView.vue: Tools visibility modal with mode selector
- McpServerCard.vue: Add manage tools button
- mcp.ts (client): Add raw parameter to fetchMcpTools
- mcp.ts (controller): Pass raw parameter to bridge
- mcp.ts (services): Pass raw parameter to client.mcpTools
- client.ts: Add raw parameter to mcpTools
- hermes_bridge.py: Support raw_mode in _mcp_tools_list
- 9 locale files: Add 14 translation keys each
- mcp-controller.test.ts: Add 3 new test cases
- bridge-mcp-action.test.ts: New test file for parameter passing

* Delete projects directory

chore: remove accidentally committed projects/ directory

* fix MCP tools visibility edge cases

* remove MCP docs screenshots

---------

Co-authored-by: Crafter-feng <succeed_happu@163.com>
Co-authored-by: Crafter-feng <37255449+Crafter-feng@users.noreply.github.com>
2026-05-31 09:00:38 +08:00
sir1st ce04b10eee Fix Windows bundled Hermes CLI launcher (#1159)
* Fix Windows bundled Hermes CLI launcher

* Update kanban service tests for Hermes process wrapper

---------

Co-authored-by: xingzhi <chuzihao.czh@alibaba-inc.com>
2026-05-30 18:57:04 +08:00
paulocavallari cb410e5007 fix(bridge): preserve text/tool-call ordering to stop split narration (#1145)
When the model interleaves narration text with tool calls within one
turn ("text → tool → more text"), the assistant text was rendered split
across the tool boundary — a word could be cut in half, e.g. the part
before the tool call ending mid-word and the remainder appearing after
the tool card.

Root cause: the agent bridge (`hermes_bridge.py`) accumulated streamed
text in `RunRecord.deltas` and tool/lifecycle events in
`RunRecord.events` as two parallel lists with no relative ordering. On
poll, the aggregated text (`"".join(deltas)`) and the events were
delivered separately, and the Node consumer (`handle-bridge-run.ts`)
processed all `chunk.events` (including `tool.started`) before the
aggregated `chunk.delta`. The real interleaving of text and tool calls
was therefore lost, splitting the text around the tool boundary.

Fix:
- Bridge: `stream_callback` now also appends each text chunk as an
  ordered `stream.delta` event into the same `events` list as
  tool.started/tool.completed, preserving true interleaving. `deltas`
  is still kept for the aggregated `output`/resume snapshot.
- Node: process `stream.delta` events inline within the events loop (in
  true order), and skip the aggregated `chunk.delta` when ordered
  `stream.delta` events were present for that chunk (avoids duplicate
  text). Text-delta handling was extracted into `processBridgeTextDelta`
  and reused by both paths.

Verified end-to-end: narration that calls a tool mid-sentence now
streams and persists as coherent text in the exact order produced, with
no word split across the tool boundary.

Co-authored-by: Paulo Cavallari <paulocavallari@users.noreply.github.com>
2026-05-30 11:49:50 +08:00
ekko b015e70b9d [codex] fix MCP management lifecycle (#1144)
* feat(mcp): add MCP server management UI

- Server CRUD: add/edit/remove with YAML/JSON Monaco editor
- raw_config passthrough: zero field loss on edit/toggle
- tool_details embedding: single-request card data (1+N → 1)
- Auto-retry exponential backoff (2s→32s, max 5 retries)
- Route safety guards (hasRoute) for dynamic sidebar
- i18n: 9 languages (de/en/es/fr/ja/ko/pt/zh/zh-TW)
- 19 unit tests + 8 UX browser tests
- 35 files, +2933 lines

* fix mcp management lifecycle

---------

Co-authored-by: Crafter-feng <succeed_happu@163.com>
2026-05-30 11:06:08 +08:00
ekko 9643a083d6 fix bridge mcp tool discovery (#1139) 2026-05-30 08:37:02 +08:00
ekko 717f577380 fix group chat agent mentions (#1111) 2026-05-29 09:02:38 +08:00
ekko 14466dfc9f make bridge worker transport configurable (#1106) 2026-05-28 22:33:33 +08:00
ekko d610c3d1b9 fix preview runtime isolation and shutdown (#1088) 2026-05-28 13:50:52 +08:00
ekko a6b3bec29b Add virtualized chat pagination (#1080) 2026-05-28 09:34:30 +08:00
ekko a43ead594e fix bridge surrogate json encoding (#1059) 2026-05-27 11:44:04 +08:00
ekko eca06faaa0 add web ui openrouter attribution (#1057) 2026-05-27 11:21:12 +08:00
GoldenFishX 3cede6fb7f fix(bridge): block thinking spinner kaomoji from contaminating conversation history (#1051)
The hermes-agent CLI KawaiiSpinner sends decorative kaomoji text
like "(◕‿◕✿) pondering..." through thinking_callback for its TUI
widget.  The bridge forwarded this as thinking.delta events, which
the frontend stored in the message reasoning field.

Over long conversations this contaminated the model's context:
_copy_reasoning_content_for_api promoted the kaomoji text to
reasoning_content, causing the LLM to reproduce kaomoji patterns
in a self-reinforcing degradation loop.

Fix: _make_thinking_callback unconditionally sends empty text.
thinking_callback is purely CLI spinner status — it has no place in
conversation history.  Actual model reasoning (reasoning.delta) is
unaffected.
2026-05-27 09:42:04 +08:00
ekko 42f7b64ffb update changelog and context default (#1045) 2026-05-26 19:35:48 +08:00
ekko 82680f5c0b fix clarify replay and compression timeout (#1044) 2026-05-26 19:15:22 +08:00
ekko b0000b4c38 fix context compressor summary prompt (#1041) 2026-05-26 17:29:19 +08:00
ekko ad1cab277a fix context token resume (#1039) 2026-05-26 16:32:07 +08:00
ekko e686f0277a [codex] scope bridge terminal env refresh to worker startup (#1031)
* fix(bridge): refresh terminal env from profile config on profile switch

Profile switching changes HERMES_HOME but the TERMINAL_* environment
variables (TERMINAL_ENV, TERMINAL_SSH_HOST, etc.) still point to the
root config's terminal settings set at gateway startup.

Add _refresh_terminal_env() that re-reads terminal config from the
active profile's config.yaml and sets the corresponding TERMINAL_* env
vars. Call it in:
- AgentPool.get_or_create(): when creating a session for a profile
- AgentPool._run_chat(): before agent execution, inside _profile_env

Errors are handled gracefully: YAML parse failures log to stderr,
terminal_tool cache invalidation failures are silently ignored, and
missing config files are skipped without error.

* fix(bridge): refresh terminal env in worker profile setup

_set_worker_profile_env() handles broker-spawned worker subprocesses
that are isolated per profile. The worker inherits TERMINAL_* env vars
from the broker (root config), and _profile_env() is a no-op in worker
mode, so terminal config was never refreshed for non-default profiles.

Adding _refresh_terminal_env() here means each worker subprocess reads
its own profile's config.yaml terminal section on startup, solving
profile-isolated terminal backends (e.g. SSH per profile).

* fix bridge terminal env refresh scope

* refresh worker profile env for new agents

* avoid bridge worker restart for channel config

* align config controller bridge restart tests

---------

Co-authored-by: GoldenFish123321 <goldfishx@gmail.com>
Co-authored-by: GoldenFishX <golden_fish@foxmail.com>
2026-05-26 00:15:27 +08:00
ekko badb17cf8e [codex] integrate goal command workflow (#1025)
* feat: integrate goal command workflow

* fix: keep goal done visible

* fix: add goal done slash command

* fix: promote queued message on run start
2026-05-25 19:26:23 +08:00
ekko 0eab6a1125 Fix plan command support in web bridge (#1018)
* fix: support plan command in web bridge

* fix: preserve queued bridge messages

* fix: avoid duplicate queued plan messages

* fix: preserve plan command semantics

---------

Co-authored-by: Codex <codex@openai.com>
2026-05-25 15:48:17 +08:00
ekko bbb8b1d536 [codex] fix bridge tool marker flush persistence (#1002)
* fix: don't drop pending tool-call-marker prefix on tool.started/run.done

The `filterBridgeToolCallMarkupDelta` filter holds back any text that
ends in a partial prefix of `[Calling tool:` (i.e. `[`, `[C`, `[Ca`,
..., `[Calling tool`) so it can decide whether the buffered chars are
the start of a tool-call markup block to be hidden, or just regular
text to be released by the next delta.

The bug: that "release on next delta" assumption breaks at TWO points:

1. **On `tool.started`**: the next chunk for this assistant message is
   the tool call itself, NOT a follow-up text delta. Buffered chars
   sit there forever and nothing flushes them — they vanish silently
   from the user-visible stream.

2. **On run completion**: the code did
   `state.bridgePendingToolCallMarkup = undefined` directly, dropping
   any pending chars without forwarding them.

Both cases produce the user-visible symptom of "abrupt cuts in text
right before/after tool calls (terminal, read_file, write_file...)" —
1 to 13 characters disappear at exactly the boundary where the model
was emitting natural prose that happened to end with `[`.

The fix introduces `flushPendingToolCallMarkup(state)` and calls it:

- In the `tool.started` branch BEFORE recording the tool call, so the
  buffered chars are appended to the open assistant message and emitted
  as a normal `message.delta` to the client.
- At run-done BEFORE clearing the buffer, same flush path.

This is a pure recovery patch — no change to the marker detection
logic itself. If the buffer turns out to actually be a real
`[Calling tool: ...]` marker that just hasn't completed yet, that
case is still caught by the existing `markerIdx >= 0` branch in the
filter on the next delta. The only behavioral change is that the
"orphan" cases (text that ends with `[` but never becomes a marker)
are no longer dropped.

* fix bridge marker flush persistence

---------

Co-authored-by: Paulo Cavallari <paulocavallari@users.noreply.github.com>
2026-05-25 11:09:16 +08:00
ekko e743c81ad3 [codex] add clarify support with response path tests (#972)
* feat: 新增 clarify(澄清/确认)交互支持

* test clarify response bridge path

---------

Co-authored-by: GoldenFish123321 <golden_fish@foxmail.com>
2026-05-24 18:09:39 +08:00
ekko 634a622934 [codex] fix media skill profile auth and run events (#965)
* fix media skill profile auth and run events

* test bridge run profile context
2026-05-24 12:52:14 +08:00
ekko 9708a6a521 Scope files jobs and plugins to request profile 2026-05-24 10:11:03 +08:00
Codex 771d122f44 Restore synced queued message UI 2026-05-24 10:11:03 +08:00
Codex 79196304c4 Delay peer user sync until queued run starts 2026-05-24 10:11:03 +08:00
Codex 238dbb507e Fix peer chat queue sync 2026-05-24 10:11:03 +08:00
Codex 7b05731d44 Refine user profile access and chat sync 2026-05-24 10:11:03 +08:00
ekko 3f6a25d8f1 Add user-scoped Hermes profile access 2026-05-24 10:11:03 +08:00
ekko 56e7716302 Bump 0.5.35 and harden CPU monitoring fallback 2026-05-23 10:47:30 +08:00
ekko 4092962db3 fix performance monitor worker blocking 2026-05-23 09:53:04 +08:00
ekko 8c4c6d6681 fix performance monitor worker blocking 2026-05-23 09:53:04 +08:00
ekko c184519c5d add bridge performance monitoring 2026-05-23 09:09:54 +08:00
ekko 3f16c4a20e Allow bridge sessions to run concurrently (#932)
* Allow bridge sessions to run concurrently

* Stabilize bridge concurrency test

* Set bridge approval timeout to 120 seconds

* harden bridge approval concurrency

---------

Co-authored-by: Codex <codex@openai.com>
2026-05-22 15:52:00 +08:00
ekko f90e79fd2f fix: sync bundled skills across profiles (#926) 2026-05-22 10:41:14 +08:00
ekko 4b759c4d8a cache group chat fixed context usage (#925) 2026-05-22 10:20:39 +08:00
ekko c3538a6b44 fix compression context usage accounting (#924) 2026-05-22 09:46:50 +08:00
ekko 254573400d Fix final context and tool status updates (#917)
Co-authored-by: Codex <codex@openai.com>
2026-05-21 23:21:26 +08:00
ekko ff1f471745 Persist custom Hermes models (#913) 2026-05-21 20:55:19 +08:00
ekko 4d89767847 Clean multimodal tool results before storage (#911) 2026-05-21 20:19:06 +08:00
ekko 39ead94352 Account for full context tokens in compression (#908)
* Account for full context tokens in compression

* Fix group chat final context updates

---------

Co-authored-by: Codex <codex@openai.com>
2026-05-21 19:40:52 +08:00
ekko b2ec321990 Fix group chat agent connection failures (#900) 2026-05-21 14:54:41 +08:00
ekko ab7dd00e8c Fix profile list column parsing (#897) 2026-05-21 14:08:58 +08:00
ekko dd3320d1ce Fix Windows netstat encoding in agent bridge (#894) 2026-05-21 12:25:38 +08:00