When config.json has no channels configuration, the WebUI QR login
connect flow obtained a token but only saved it to account.json (state
file). The subsequent post-connect enable step (set_channel_config_enabled)
read config.json, found no weixin section, and wrote back a default
config with token="" - silently losing the freshly obtained credential.
Add _persist_connect_credentials to _commit_account so the token and
base_url are written to config.json before the enable step runs. This
covers both the WebUI connect flow and the CLI QR login path, mirroring
the established Feishu save_registration_result pattern.
Session files lived under <workspace>/sessions/ (since #713), which is the
on-disk scope of the agent's filesystem tools. With restrict_to_workspace
enabled, an agent could read_file / list_dir every session transcript —
including other users' or channels' conversations — bypassing the scoped
sessions.py access layer entirely.
Move session storage to ~/.nanobot/sessions/<sha256-of-resolved-workspace>[:16]/,
outside the workspace. Per-workspace isolation (the goal of #713) is preserved
via a hash of the resolved workspace path, so different workspaces keep
independent session stores. A one-shot, idempotent migration moves legacy
in-workspace *.jsonl files into the new location at store init.
Scope note: this protects sessions whenever restrict_to_workspace=true. The
default restrict_to_workspace=false leaves read_file unrestricted in general
(not only sessions) and is a separate concern.
Refs #5278
Run one-shot commands in their own process tree and terminate all
descendants after timeout, cancellation, or unexpected failures.
Co-authored-by: TRAE CLI <noreply@bytedance.com>
Installed CLI apps were started with os.environ.copy(), so provider keys
from the parent process were visible to untrusted binaries. Use a minimal
allowlist env matching the shell tool.
Fixes#4783
Installed CLI apps were started with os.environ.copy(), so provider keys
from the parent process were visible to untrusted binaries. Use a minimal
allowlist env matching the shell tool.
Fixes#4783
- Disable pinch/double-tap zoom via the viewport meta (system-level
accessibility zoom is unaffected).
- Add viewport-fit=cover so standalone mode renders edge-to-edge; the
layout already uses env(safe-area-inset-*) from #4693.
- Add apple-mobile-web-app-* metas for standalone launch, status bar, and
home screen label on iOS.
- Prevent double-tap zoom and orientation text inflation via inline CSS.
- Exclude /webui/* endpoints from the service worker cache; the
/webui/bootstrap endpoint issues fresh gateway credentials on every load
and must never be cached or replayed offline.
- Restrict cache-first handling to hashed /assets/ files (served immutable).
Un-hashed brand icons and the favicon stay network-first so future icon
swaps reach installed clients.
- Prune stale hashed assets whenever the app shell refreshes, so old build
assets cannot accumulate even when sw.js itself is unchanged.
- Serve the cached app shell for offline deep-link navigations.
- Ignore service worker registration failures; add unit tests for the
service worker and the main-entry registration.
- Add manifest.json with icons for install prompt
- Add service worker with cache-first for static assets
- Register SW in main.tsx
- Link manifest in index.html