Commit Graph
4368 Commits
Author SHA1 Message Date
Xubin Ren d7de5d5344 fix(webui): align standalone page widths with conversations
Reuse the conversation content width and gutters for Apps, Skills, Automations, and Channels so their main panes are no longer constrained by the narrower settings frame.

Make automation columns respond to their container widths to preserve readable messages in narrow panes. Keep the sidebar, regular settings, and existing conversation appearance unchanged, with focused layout regression coverage.

Refs NAN-111
2026-09-10 21:18:54 +08:00
chengyongru 4ed04a5df9 fix(webui): bound explicit scroll navigation duration 2026-09-10 15:33:35 +08:00
chengyongru f39702f1cf fix(webui): preserve prompt rail markers before long answers 2026-09-10 15:33:35 +08:00
chengyongru a4140dac25 fix(webui): align file edits and remove redundant status markers 2026-09-10 15:33:35 +08:00
chengyongru a3e9d0f9a9 fix(webui): align message actions and simplify compaction notices 2026-09-10 15:33:35 +08:00
chengyongru 39a817e72d feat(webui): refine sidebar hierarchy and selection feedback 2026-09-10 13:34:56 +08:00
Nasterandchengyongru da749b4a87 fix(command): rename hyphenated slash commands to Telegram-safe underscores (#5711)
Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-09-10 13:30:02 +08:00
chengyongru 55093dd75b fix(mcp): refresh expired OAuth tokens automatically (#5573)
* fix(mcp): refresh expired OAuth tokens

* fix(mcp): bind refreshed tokens to OAuth issuer

* fix(mcp): activate OAuth tools before probe cleanup

* fix(webui): preserve failed MCP OAuth status

* fix(mcp): preserve OAuth refresh across discovery retries

* test(mcp): align OAuth issuer fixture with SDK validation
2026-09-10 13:27:50 +08:00
Naster17 6a8647cfb6 fix(tg): route /compact and /evaluator-prompt to the command router
The Telegram channel forwards slash commands through an allowlist regex
that must mirror the builtin command router. /compact and
/evaluator-prompt were missing from it, and messages starting with '/'
never reach the generic text handler, so both commands were silently
dropped: pressing /compact did nothing at all.

Add both commands to the allowlist, register /compact in the Telegram
command menu, and pin the router/regex pairing in the existing regex
test.
2026-09-10 11:44:17 +08:00
Booty Destroyer 6969 dfed706bc0 fix(exec): preserve UTF-8 across streaming output chunks 2026-09-10 11:36:33 +08:00
chengyongru 8ea683679d feat(webui): expand and organize settings with autosave (#5704)
* feat(webui): expand settings with autosave and live configuration

* feat(memory): add long-term memory and idle compaction switches

* refactor(webui): clarify settings hierarchy and align compact controls

* refactor(webui): keep only memory consolidation in memory settings

* refactor(webui): defer runtime changes until explicit restart

* refactor(webui): remove default workspace setting

* fix(webui): align model lists and remove preset counters

* fix(i18n): use natural Chinese labels for chat platforms

* fix(i18n): shorten chat settings navigation label

* fix(webui): match settings navigation icons to text size

* refactor(webui): remove redundant settings sidebar heading

* refactor(webui): use icon-only back navigation in settings

* fix(webui): remove back arrow hover hint

* refactor(webui): remove redundant overview details

* refactor(webui): hide secondary descriptions in settings rows

* style(webui): replace settings dividers with rounded highlights

* refactor(webui): remove redundant model list subtitles and badges

* fix(i18n): restore chat translation namespace boundaries

* fix(i18n): complete settings translations for all locales

* fix(webui): reveal settings only for enabled capabilities

* fix(webui): consolidate capabilities and isolate settings feedback

* fix(webui): clear restart notices when settings are reverted

* fix(webui): anchor restart controls in settings sidebar

* fix(webui): shorten sidebar restart label

* fix(webui): align settings spacing and control sizes

* refactor(webui): unify settings dialogs and interaction feedback

* fix(webui): keep settings option groups on one line without scrolling

* refactor(webui): align settings spacing and sidebar icon proportions

* style(webui): match main sidebar typography to settings

* style(webui): use monospace for sidebar session handles

* refactor(webui): remove heartbeat configuration from automations

* feat(webui): expose configuration actions beside capability toggles

* style(webui): remove ellipsis from configuration actions

* refactor(webui): remove redundant app configuration controls

* feat(webui): add compact sidebar navigation and shortcut hints

* fix(webui): synchronize npm dependency lockfile

* test(webui): align input radius expectation with pill styling

* feat(webui): show daily token usage and cache breakdown

* feat(webui): add model usage details and cache hit rates

* feat(webui): chart daily token usage by model

* refactor(webui): simplify usage details and model labels

* fix(webui): hide usage dialog date range

* refactor(webui): consolidate model usage into chart legends

* fix(webui): enforce restart choices and correct settings test route

* fix(webui): polish settings localization and controls

* fix(webui): avoid repeated usage legend labels

* fix(webui): skip empty usage columns in keyboard navigation

* test(webui): assert settings behavior positively

* feat(webui): refine sidebar navigation and add drag resizing

* style(webui): soften sidebar scroll edges

* style(webui): harmonize sidebar typography and text colors

* feat(webui): move channels to the main sidebar

* style(webui): remove dotted underlines from settings hints

* fix(webui): unify tooltip hover delay

* fix(webui): support Seatbelt sandbox settings

* fix(webui): remove unused appearance density preference

* fix(webui): align settings input values consistently

* style(webui): group compact settings controls before inputs

* feat(webui): edit multiline settings in compact dialogs

* feat(webui): add continuous settings scrolling with gentle snapping

* Revert "feat(webui): add continuous settings scrolling with gentle snapping"

This reverts commit f0978c261a53c844185eeab4d0c3190fbd196fe6.
2026-09-10 11:10:51 +08:00
Young Leeandchengyongru 20f115bf46 feat(providers): send x-opencode-session header for OpenCode session (#5662)
Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-09-10 01:16:17 +08:00
Xubin Ren 61ea3ed3c4 test(exec): keep Seatbelt identity fixtures portable on Windows 2026-09-10 00:00:44 +08:00
Xubin Ren 19074b5122 fix(exec): preserve Seatbelt readonly roots and fail closed on cwd errors
Prevent renaming writable ancestors of effective read-only roots while preserving explicit read-write overrides, filesystem case aliases, and unrelated child writes.

Exit before evaluating shell lists when the sandbox working directory cannot be entered. Add native and portable regressions for both boundaries and document the ancestor restriction.
2026-09-10 00:00:44 +08:00
Xubin Ren 8b9e35bf78 fix(exec): tighten Seatbelt filesystem and launcher boundaries
Keep temporary work inside the granted workspace instead of exposing host scratch trees, enforce read-only roots, and pin the system sandbox launcher before PATH lookup. Preserve documented network access and the narrow system paths needed by shell and Git.

Add native macOS containment and launcher regressions plus shared backend contract coverage. Document scratch and custom-tool requirements without changing existing bwrap or Windows behavior.
2026-09-10 00:00:44 +08:00
LuckTerence 947ed17e8b test(sandbox): handle Windows path escaping in Seatbelt backend assertions
On Windows runners, workspace and tmp paths contain backslashes which are escaped by _sbpl_quote into double backslashes in the generated SBPL profile. Use _sbpl_quote in TestSeatbeltBackend assertions and escape backslashes in quote test to ensure assertions pass on Windows.
2026-09-10 00:00:44 +08:00
LuckTerence e217468e0a feat(exec): add a macOS Seatbelt sandbox backend
`tools.exec.sandbox` only supported bubblewrap, which depends on Linux
kernel namespaces, so macOS had no process-level isolation for shell
commands: SECURITY.md told macOS users the sandbox was simply
unavailable.

Add a `seatbelt` backend that generates an SBPL profile for
sandbox-exec(1) with the same policy bwrap applies. The workspace is
read-write, the media directory is read-only, the workspace's parent is
unreadable so config.json and its API keys stay hidden, and everything
else is denied by default.

Two macOS details the profile has to get right, both found by running
the generated command rather than by reading the SBPL reference:

- sh(1) reads `/` while resolving a path, and `(subpath "/usr")` does
  not cover the root itself. Without `(literal "/")` every wrapped
  command aborts during shell startup.
- Denying the parent directory also blocks traversal into the
  workspace, so commands fail with ENOTDIR before they run. The
  ancestors of every allowed path are therefore re-allowed for
  `file-read-metadata` only: they stay searchable, but the config
  directory still cannot be listed or read.

Paths are SBPL-escaped so a quote or backslash in a workspace path
cannot terminate a literal early and widen the rules that follow it.

Network access stays unrestricted to match bwrap, which does not pass
`--unshare-net`. Windows keeps its existing warn-and-run-unsandboxed
path, and selecting `seatbelt` on Linux fails loudly on the missing
sandbox-exec(1) exactly as selecting `bwrap` does on macOS today.

Verified on macOS 26.6.2 against the real sandbox-exec(1): workspace
writes, media reads and /tmp scratch succeed, while writing media,
reading config.json, listing the config directory, writing outside the
workspace and reading ~/.ssh are all denied.

Refs #1448
Refs #2569
2026-09-10 00:00:44 +08:00
chengyongru fea28b1a00 fix(webui): preserve project when creating a topic from its menu 2026-09-09 17:26:02 +08:00
chengyongru 1469d4811c perf(webui): reduce repeated work and bound history rendering (#5703)
* perf(webui): reduce repeated work and bound history rendering

* fix(webui): keep continuation reasoning with its answer

* refactor(webui): reuse answer buffers and prepared copy text

* perf(webui): restore conditional replay buffer initialization

* fix(webui): remove code block pagination
2026-09-09 14:02:26 +08:00
Xubin Ren 1c451b5b5f fix(webui): retain skill refreshes queued during pending requests
An in-flight response can contain the list captured before a skill was installed. Preserve one trailing refresh for picker opens that arrive during that request instead of silently dropping them, while keeping at most one request active.

Cover stale responses, coalesced trailing refreshes, and unmount cleanup after both success and failure.
2026-09-09 13:36:50 +08:00
Xubin Ren 27518ca9fd fix(webui): refresh skill suggestions when opening the picker
Refresh the shared skill list when a dollar-reference picker opens so skills installed by the agent appear without reloading the page. Coalesce in-flight requests and preserve the last known list on transient failures.

Cover post-load discovery, Tab completion, removals, request deduplication, cleanup, and retry behavior with regression tests.
2026-09-09 13:36:50 +08:00
chengyongru b5d2a3fb8e fix(webui): keep edit diffs outside reasoning folds (#5714)
* fix(webui): keep edit diffs outside reasoning folds

* fix(webui): retain live status after trailing edit diffs
2026-09-09 13:14:14 +08:00
chengyongru 7d845046e0 perf(tui): coalesce and cancel usage refreshes 2026-09-09 13:04:45 +08:00
chengyongru b7fc4146e0 feat(tui): add /usage context and token charts 2026-09-09 13:04:45 +08:00
chengyongru cccf6e4608 fix(webui): prevent italic activity labels from clipping 2026-09-09 11:50:17 +08:00
chengyongru c2f167bf78 fix(webui): preserve less-than comparisons in streaming math 2026-09-09 11:38:40 +08:00
Xubin Ren 92a297a6c8 fix(codex): refresh model catalog for Astra
The Codex catalog gates model visibility by client version. Requests advertising 0.144.0 succeed but omit Astra for an otherwise eligible account. Use the validated 0.153.4 catalog version so account discovery can expose it without changing model defaults or fallback entries.

Pin the expected wire version independently in the regression test and cover both Astra and future account models while preserving hidden-model filtering.
2026-09-09 01:03:39 +08:00
n1uz1 104917aaec fix(tools): support recursive glob filters in file searches 2026-09-08 16:13:26 +08:00
chengyongru 4c2c4396b0 fix(webui): use styled tooltips for model presets and activity previews (#5701)
* fix(webui): show effective preset in styled model tooltip

* fix(webui): use shared tooltip for activity previews
2026-09-08 16:00:54 +08:00
Arthur K.andchengyongru 813aaaea05 feat(tg): add support for streaming rich messages (#5614)
* feat(tg): add support for streaming rich messages

Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-09-08 15:49:22 +08:00
chengyongru 2b6c91472b fix(webui): keep queued prompts scoped across session switches 2026-09-08 15:16:54 +08:00
f47b8f2315 test(webui): require explicit opt-in for title generation (#5648)
Co-authored-by: zpljd258 <11162658+zpljd258@users.noreply.github.com>
Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-09-08 14:17:54 +08:00
chengyongru e77c638f89 fix(agent): keep tool results stable across replay (#5695)
* fix(agent): keep processed tool results stable across replay

* fix(agent): preserve multimodal text and complete result references

* docs: trim tool result persistence comments

* fix(tools): allow complete reads of oversized text lines

* fix: keep read_file interface unchanged in replay fix

* refactor: pass one tool result reference path

* refactor: keep tool result persistence text-only

* fix: keep tool output references stable across workspace changes
2026-09-08 14:10:55 +08:00
Ben Whittaker 7aaff4f66b fix(exec): resolve relative working_dir from workspace 2026-09-08 13:31:28 +08:00
chengyongru 3548aec576 fix: use summary checkpoints for all compaction triggers (#5694)
* fix: exclude archived history after manual compaction

* refactor: share summary checkpoints across compaction paths

* fix: use summary checkpoints for every compaction trigger

* test: assert replay starts at the archived boundary

* fix: preserve nothing summaries without raw fallback

* test: assert compaction results positively

* test: verify checkpoint continuation after session reload
2026-09-08 13:16:45 +08:00
cleverLucky c039a7052a feat(web-search): add AnySearch provider (key-optional, anonymous quota) (#5607)
* feat(web-search): add AnySearch provider (key-optional, anonymous quota)

* docs(configuration): add AnySearch web search provider
2026-09-08 11:41:10 +08:00
shakewingo 48a93f9e52 docs: clarify gateway health and WebSocket readiness 2026-09-08 11:00:46 +08:00
chengyongru 76ce905e97 fix(webui): preserve multiline dollar math with attached delimiters 2026-09-08 10:51:31 +08:00
Xubin Ren 2363530891 test(mcp): keep reconnect fixture idle across SDK versions
MCP SDK 1.30 treats an open GET notification stream as an in-flight request, so the real-server fixture no longer expires its session and the shutdown regression waits forever for a reconnect that never starts.

Decline the optional notification stream with the protocol-defined HTTP 405 response while retaining real POST, DELETE, lifespan, idle expiry and reconnect handling. Assert that successful recovery replaces the tool wrapper so the first regression cannot pass without reconnecting.

Reproduced the failure with SDK 1.30 before the repair. Both 1.29 and 1.30 now pass, including five repeated 1.30 runs and 141 related MCP tests. Runtime code and timeout limits are unchanged.
2026-09-08 10:04:15 +08:00
Xubin Ren ddf095938e fix(cli): make Desktop attachment checks portable
Avoid a false-positive session-prefix match in the architecture guard without changing endpoint validation. Pass a null pointer as an integer to the native Windows pipe fixture, and name oversized-input cases explicitly so pytest does not exceed the Windows environment-variable limit.

Keep the real owner-authenticated roundtrip and oversized-payload assertions. Local CLI, architecture and gateway checks pass; native Windows verification is rerun in CI.
2026-09-08 10:04:15 +08:00
Xubin Ren d641026fc8 fix(cli): simplify Desktop picker controls [skip ci]
Remove numeric shortcuts and their labels so target selection has one visible navigation model: arrow keys followed by Enter. Keep Ctrl+C cancellation and attachment behavior unchanged.

Update the CLI guide and real-key regression tests to verify that 1 and 2 no longer move the highlight.
2026-09-08 10:04:15 +08:00
Xubin Ren cf74d1c7e5 fix(cli): make Desktop target selection keyboard navigable [skip ci]
Reuse the existing questionary selector so users can highlight a target with arrow keys and confirm with Enter. Retain numeric shortcuts and the current Python executable label without changing discovery or attachment behavior.

Keep cancellation fail-closed with exit code 130. Exercise real navigation, EOF and Ctrl+C through both CLI launchers so cancelling cannot start a Python backend or attach to Desktop. Document the controls.
2026-09-08 10:04:15 +08:00
Xubin Ren 9a594f74ff fix(cli): isolate Desktop compatibility probes [skip ci]
An older terminal can ignore the protocol probe flag and consume inherited gateway credentials or terminal input. Scrub its TUI environment and close stdin before probing, then pass only the selected Desktop resolver metadata to the compatible client.

Validate the complete ready frame before opening mutation gates, not just its identity metadata. Add failing-before regressions and scope the existing recovery test process stub so real lease cleanup remains testable without changing runtime ownership.
2026-09-08 10:04:15 +08:00
Xubin Ren 48e7c4f697 feat(cli): attach terminal clients to the selected Desktop [skip ci]
NAN-104 requires terminal chat and browser attachment without granting a client ownership of Desktop's gateway. Resolve bounded short-lived credentials over authenticated current-user IPC, pin both Desktop and gateway identities, and reject replacement instances or incompatible clients before any mutation.

Reuse the existing TUI artifact resolver behind a narrow Desktop-only entrypoint, keep credentials out of argv/environment/files, and preserve Python-mode reconnect and gateway leases. Add protocol, real-gateway, and anonymous IPC regression coverage; matching native-host and Windows acceptance remain release gates.
2026-09-08 10:04:15 +08:00
Xubin Ren b373a95f5c fix(cli): protect Windows browser credential handoff [skip ci]
Windows browser dispatch can expose bootstrap credentials through BROWSER or native handler command arguments. Send the URL to an isolated helper over stdin and open an owner-only ACL-protected redirect file instead, with no raw-URL fallback.

Keep file ownership and bounded cleanup independent of CLI exit, reject unsafe storage, and cover shared callers, native API contracts, error paths and lifecycle regressions. Document the intentional Windows compatibility tightening; native Windows browser and ACL verification remains pending.
2026-09-08 10:04:15 +08:00
Xubin Ren 29bf9f9ca7 fix(cli): keep macOS bootstrap URLs out of argv [skip ci]
Browser bootstrap URLs contain credentials. Deliver them through native Launch Services instead of the open command, and fail without a subprocess or BROWSER fallback so shared WebUI callers cannot expose the URL in process arguments or errors.

Cover encoding, native failures, resource cleanup and Desktop dispatch with regression tests. Preserve existing browser behavior and leave TUI and non-macOS handoff changes outside this scoped repair.
2026-09-08 10:04:15 +08:00
Xubin Ren dba77b5e74 fix(cli): harden attach-only Desktop selection [skip ci]
Preserve current Python startup when Desktop is not ready before target selection, while refusing fallback after the user chooses Desktop. Keep retained launchers and virtual environment labels consistent.

Authenticate Windows pipe ownership before I/O and drain cancelled operations before releasing buffers. Add entrypoint, failure-path, transport and credential-safe browser regressions without changing backend lifecycle or configuration.
2026-09-08 10:04:15 +08:00
Xubin Ren 8fe0c62d68 feat(cli): add attach-only Desktop target selection
Keep Python and Desktop installations independent while allowing bare interactive commands to choose a running Desktop target. Validate the versioned per-user rendezvous before opening its WebUI, and preserve every explicit Python CLI invocation.

Desktop TUI attachment remains unavailable until its capability contract is published, so that selection fails explicitly without starting, replacing, or stopping a backend.

Refs NAN-104.

[skip ci]
2026-09-08 10:04:15 +08:00
chengyongru c4a25c9a09 docs: unify personal agent installation with quick start 2026-09-07 18:28:35 +08:00
chengyongru dd3d2970a7 fix(webui): keep working timer consistent across first output 2026-09-07 17:54:17 +08:00