368 Commits

Author SHA1 Message Date
Xubin Ren
067e0c4a40
feat(cli): add safe WebUI first-run launcher (#4688) 2026-07-03 18:58:04 +08:00
chengyongru
5283ceae85
Add optional Nanobot plugin controls (#4396)
* feat: add optional nanobot features

* test: update azure install hint expectation

* fix: validate optional feature extras

maintainer edit: verify requested dependency extras before treating optional features as installed, propagate restart state from feature enablement, and align docs with the new plugins enable command.

* fix: bound optional feature installs

maintainer edit: make optional feature installs time out as a normal install failure instead of leaving the WebUI or CLI action waiting indefinitely.

* feat: slim optional channel dependencies

* fix: log optional install commands

* fix(webui): gate remote feature installs

* docs: clarify webhook plugin example

* fix(webui): harden optional feature installs

* fix: install optional deps without package fallback

* fix(cli): refine plugin feature controls

* fix(webui): count enabled nanobot features

* fix(webui): allow slow feature install routes

* fix(webui): allow disabling websocket channel

* fix(plugins): simplify optional feature controls

* fix(webui): polish apps catalog states

* fix(webui): confirm nanobot support installs

* fix(webui): polish nanobot install dialog

* fix(webui): suppress empty websocket handshakes

* fix(webui): clarify apps plugin summary

* fix(webui): localize workspace access copy

* fix(plugins): polish optional feature controls (#4691)

---------

Co-authored-by: Xubin Ren <52506698+Re-bin@users.noreply.github.com>
2026-07-03 18:17:52 +08:00
chengyongru
acb0e853ff refactor(trigger): share automation turn delivery 2026-07-02 13:32:46 +08:00
chengyongru
afef27dd6c fix(webui): show pending local triggers 2026-07-02 13:32:46 +08:00
chengyongru
f32007c83f fix(trigger): defer local triggers until session idle 2026-07-02 13:32:46 +08:00
chengyongru
2ebf5c4972 refactor(trigger): name CLI trigger source as local
maintainer edit: cron is also a trigger source, so keep the new CLI-delivered source explicitly named as local trigger across backend, WebUI, docs, and tests.
2026-07-02 13:32:46 +08:00
chengyongru
2a0cd19a74 feat(trigger): add session-bound local triggers 2026-07-02 13:32:46 +08:00
chengyongru
5f4cfbcb16 refactor(bus): type outbound runtime events 2026-07-01 20:17:00 +08:00
dajiaohuang
56443ac6e2 @
feat(api): require api_key when binding to all interfaces (parity with WS gateway)

The OpenAI-compatible API server had no authentication option, unlike the
WebSocket gateway which already refuses wildcard binds without a token.
When bound to 0.0.0.0, any caller who could reach the port could drive
the agent with its default tool posture.

- Add api_key field to ApiConfig (schema.py).
- Add wildcard_host_requires_auth validator that rejects wildcard binds
  without api_key, mirroring the WS gateway pattern.
- Add Bearer-token auth middleware to the API server (server.py).
  /health remains unauthenticated.
- Replace the wildcard-host CLI warning with a hard error when api_key
  is unset, and pass api_key to create_app.

Fixes #4490
@
2026-07-01 13:09:49 +08:00
hamb1y
bfbae5a7b3 fix(cli): refresh oauth provider default models 2026-06-30 23:02:42 +08:00
hamb1y
58cce14a07 fix(cli): allow oauth login to set main provider 2026-06-30 23:02:42 +08:00
chengyongru
44a5ed1bc0 feat(providers): support provider-scoped proxy config 2026-06-30 17:33:36 +08:00
Xubin Ren
34f776b48b test(cli): lock disabled dream cursor advancement 2026-06-25 22:53:10 +08:00
axelray-dev
f7b027a295 fix: only advance dream cursor when behind latest (#4242)
Address review: avoid overwriting cursor on every restart when Dream
is disabled. Now only advances if current cursor is behind the latest
position, so repeated restarts don't permanently skip entries.
2026-06-25 22:53:10 +08:00
axelray-dev
6c880a6691 fix: advance dream cursor when Dream is disabled to prevent prompt bloat (#4242)
When dream.enabled is false, the Dream cron job never runs, so the
dream cursor (.dream_cursor) stays at its initial value (0). This
causes read_recent_history_for_prompt() to treat every history entry
as unprocessed, injecting the full chat history into every system
prompt and growing without bound.

Fix: fast-forward the dream cursor to the latest history entry at
gateway startup when Dream is disabled.
2026-06-25 22:53:10 +08:00
Ilya Gusev
7899857201 refactor(cli): simplify onboard search-provider dispatch
- Extract _set_field_from_choices for the shared pick-and-set tail used by
  both the LLM and search provider handlers.
- Replace the single-entry _TYPED_FIELD_HANDLERS registry with a direct
  isinstance check in _resolve_field_handler (robust to renames, no
  class-name strings).
- Drop a redundant str() in the search default computation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 22:52:50 +08:00
Ilya Gusev
9354b80a6e fix(cli): show search engines (incl. Keenable) in onboard wizard
The onboard wizard dispatched field handlers by bare field name, so
WebSearchConfig.provider was hijacked by the LLM-provider handler and
showed LLM providers instead of search engines. Keenable was also never
wired into the CLI wizard when it landed in the WebUI.

- Add a single source of truth for selectable search providers
  (SEARCH_PROVIDER_OPTIONS in web.py); WebUI settings now import it.
- Add a WebSearchConfig-aware search-provider picker to the wizard and
  resolve handlers by (model type, field name) so the LLM and search
  provider fields no longer collide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 22:52:50 +08:00
Xubin Ren
c915e98c15 test: cover archived heartbeat target selection 2026-06-24 15:45:49 +08:00
Heng Wei Bin
de4009efbd fix: exclude archived keys in heartbeat & fallback missing session timestamps 2026-06-24 15:45:49 +08:00
Xubin Ren
90703002c9 fix(gateway): restore tty signal mode for ctrl-c 2026-06-22 23:20:45 +08:00
Xubin Ren
747104c9cc fix(gateway): make foreground shutdown responsive 2026-06-22 22:00:07 +08:00
Xubin Ren
fbaa85117b fix: close MCP stdio transports from agent task 2026-06-22 18:59:50 +08:00
chengyongru
0db9fbe250 chore: default context window to 200k 2026-06-22 18:33:49 +08:00
Xubin Ren
e3c9aff41e feat(gateway): add background and service controls 2026-06-22 14:48:49 +08:00
Xubin Ren
351aabd512 fix: polish onboard wizard keyboard navigation 2026-06-22 13:04:05 +08:00
chengyongru
9b52202f4a fix: make quick start rollback on websocket failure
maintainer edit: stage Quick Start edits on a draft config so declining WebSocket/password setup cannot leave saveable provider defaults behind. Align beginner WebUI docs with the password-protected setup.
2026-06-22 13:04:05 +08:00
chengyongru
fca1f2ad02 fix: secure quick start webui setup
Add Quick Start endpoint choices for subscription plan providers, require explicit WebSocket confirmation, and require a WebUI password when enabling the WebSocket channel. Update docs to route Quick Start users through the WebUI instead of agent -m.
2026-06-22 13:04:05 +08:00
chengyongru
e5294002ed fix: broaden quick start provider setup
Drive Quick Start provider choices from the provider registry instead of a short allowlist. Clean up parenthetical wizard labels and keep the beginner docs in sync.
2026-06-22 13:04:05 +08:00
chengyongru
eb14720381 fix: ask for quick start model id
Remove automatic Quick Start model discovery. Users now explicitly enter the model ID after choosing the provider and API key, and incomplete Quick Start input does not leave partial provider config behind.
2026-06-22 13:04:05 +08:00
chengyongru
d14b692368 refactor: simplify quick start onboarding
Cleanup-only simplification: remove a one-entry dispatch table, avoid unused provider tuple unpacking, and strip the selected model once before storing it.
2026-06-22 13:04:05 +08:00
chengyongru
8e9f09f829 fix: keep onboard cli defaults unchanged
Remove the PR changes that made nanobot onboard default to the wizard, added --defaults, added non-TTY fallback behavior, and changed the Docker smoke command. Keep Quick Start available through nanobot onboard --wizard.
2026-06-22 13:04:05 +08:00
chengyongru
da225fc24e fix: fetch openai quick start models
Use OpenAI's SDK default base URL for Quick Start model discovery without writing that default into the saved provider config.
2026-06-22 13:04:05 +08:00
chengyongru
71631f9ab0 fix: ask provider in quick start
Maintainer edit: replace Quick Start key/base detection with an explicit provider-first flow. Users choose the provider that issued the API key, paste the key, and only custom OpenAI-compatible setups ask for a base URL.
2026-06-22 13:04:05 +08:00
chengyongru
2319b660e6 fix: make quick start provider neutral
Maintainer edit: restart the Quick Start flow around an API-key-first path without recommending OpenRouter or DeepSeek. Detect unique key prefixes locally, fall back to a user-provided base URL, and only fetch models from that approved URL.
2026-06-22 13:04:05 +08:00
chengyongru
ed3a8f64d8 fix: use deepseek for quick start onboarding
Maintainer edit: restart the Quick Start default around a mainland-friendly provider instead of making OpenRouter the first-run dependency. Update wizard copy, default preset, focused tests, and beginner docs to use DeepSeek with the current deepseek-v4-flash model.
2026-06-22 13:04:05 +08:00
chengyongru
0e9b136315 fix: streamline quick start onboarding flow
Maintainer edit: continue the wizard simplification pass by making Quick Start save after the API key path, hiding save/summary actions until they are needed, removing failed-key side effects, and aligning beginner docs with the local WebUI path.
2026-06-22 13:04:05 +08:00
chengyongru
fa5f7f5b88 fix: make onboarding api-key first
Maintainer edit: collapse the first-run wizard to an API-key-only Quick Start and move lower-frequency provider, model, channel, gateway, and tool settings behind Advanced Settings.
2026-06-22 13:04:05 +08:00
chengyongru
1dbec3da50 fix: simplify beginner quick start
Maintainer edit: reduce the default onboarding path to a recommended local WebUI setup that only asks for an OpenRouter key, while keeping the detailed provider/channel flow available for advanced setup.
2026-06-22 13:04:05 +08:00
chengyongru
84143d31b2 refactor: reuse onboard config refresh path
Simplify pass: share the existing-config refresh flow between non-interactive defaults and declined overwrite prompts without changing behavior.
2026-06-22 13:04:05 +08:00
chengyongru
3d773d9054 fix: preserve config during non-interactive defaults onboarding
Maintainer edit: make explicit --defaults refresh existing configs without prompting when no TTY is available, preserving user values for CI and Docker runs.
2026-06-22 13:04:05 +08:00
chengyongru
9c7d1c9507 Use channel login in onboarding wizard 2026-06-22 13:04:05 +08:00
chengyongru
db68fc1c09 Use provider registry in quick start 2026-06-22 13:04:05 +08:00
chengyongru
f9f5a19910 Route WebUI quick start through channel config 2026-06-22 13:04:05 +08:00
chengyongru
0097488eed Keep quick start channels opt-in 2026-06-22 13:04:05 +08:00
chengyongru
fc7971b3b6 Improve onboard wizard setup flow 2026-06-22 13:04:05 +08:00
chengyongru
cd51654bf1 fix: keep channel login generic
maintainer edit: remove the Feishu-specific config-file guard from the shared CLI login command. Feishu now follows the Weixin pattern where channel.login owns its setup and persistence.
2026-06-18 22:38:06 +08:00
bllackhu
593ab4a788 feat(feishu): add QR scan-to-create bot CLI login feishu command
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 22:38:06 +08:00
04cb
e36c43c9e5 fix(cli): use configured bot_icon for agent interactive banner (#4262) 2026-06-14 12:51:43 +08:00
Xubin Ren
7ff8e02eaf chore(repo): remove desktop app from core repo 2026-06-13 00:14:21 +08:00
chengyongru
a50b3ac0f2 fix: harden cron session automation flows 2026-06-12 18:13:25 +08:00