chengyongru
0ce335bf12
fix(gateway): avoid restarting stopped systemd services
2026-11-10 23:47:23 +08:00
chengyongru
a4d2430140
refactor: remove redundant comments and docstrings ( #6527 )
...
* refactor: remove redundant comments and docstrings
* fix(signal): annotate async context manager as a generator
2026-10-30 13:07:03 +08:00
chengyongru and B Rishabh Rao
1c28b20c7e
fix(gateway): reuse Windows-safe atomic lease I/O
...
Adopt the read_atomic_bytes/replace_atomic integration proposed by
balabommablock-cpu, preserving UTF-8 decoding and the existing lease locks.
Exercise a real snapshot reader across an actual replacement instead of
only checking helper calls.
Adapted-from: https://github.com/balabommablock-cpu/nanobot/commit/8d671457935e44579f37ceffe6dbaf61b36b00be
Related to HKUDS/nanobot#6514
Co-authored-by: B Rishabh Rao <262621052+balabommablock-cpu@users.noreply.github.com >
2026-10-29 13:11:21 +08:00
chengyongru and BBTAN-bot
2853287ed7
perf(gateway): avoid unchanged client lease writes
...
Keep status snapshots read-only and only persist monitor cleanup when
client records change, while retaining atomic orphan shutdown decisions.
Related to HKUDS/nanobot#6514
Co-authored-by: BBTAN-bot <255698778+BBTAN-bot@users.noreply.github.com >
2026-10-29 13:11:21 +08:00
Xubin Ren and chengyongru
fbb61a373f
feat(update): integrate managed installs and recoverable in-app updates ( #6168 )
...
Add owner-aware Stable and Preview updates with explicit consent, verified release plans, protected process handoff and bounded service recovery. Keep configuration and conversations separate from program rollback.
Include the compact About controls, Windows long-path support, native package recovery checks and optional macOS Dock lifecycle integration. Preserve documented guidance for installations owned by other managers.
This code integration does not publish packages, enable signing or advance the public update channel.
Co-authored-by: chengyongru <61816729+chengyongru@users.noreply.github.com >
2026-10-21 19:16:56 +08:00
chengyongru
73a55e0b2f
fix(gateway): request graceful Windows shutdown ( #6353 )
...
* fix(gateway): request graceful Windows shutdown
* docs(cli): simplify Windows gateway stop guidance
* test(gateway): compare native Windows owner SIDs
2026-10-21 11:05:30 +08:00
chengyongru
36c36a1324
feat(cli): add --home instance directory selector ( #6128 )
...
* feat(cli): add --home instance directory selector
* refactor(cli): keep instance home selection command-line only
* fix(cli): clarify WebUI channel confirmation
* docs: condense multiple-instance setup guide
* docs(cli): shorten instance home option help
* docs: remove manual paragraph wrapping
2026-10-10 11:16:53 +08:00
chengyongru
d8b4f612f2
fix(gateway): recover degraded WebSocket listener ( #5544 )
...
* fix(gateway): recover degraded WebSocket listener
* test(websocket): model listener readiness in startup stub
* fix(tui): keep launcher alive during gateway recovery
* test(websocket): colocate listener lifecycle coverage
2026-08-27 10:23:35 +08:00
Xubin Ren
2cdfba38b2
fix(runtime): preserve interrupted turns on gateway exit
2026-08-24 00:58:04 +08:00
Xubin Ren
12029f8812
feat(runtime): add user-controlled turn recovery
2026-08-24 00:58:04 +08:00
chengyongru
df14259717
perf(tui): reduce cold-start latency
2026-08-18 16:28:46 +08:00
chengyongru
369a3443eb
fix(gateway): allow Windows launcher PID handoff
2026-08-18 11:51:14 +08:00
Xubin Ren
99d5fa2908
fix(gateway): preserve runtime identity compatibility
2026-08-18 03:21:00 +08:00
Xubin Ren
19ad1adfe7
fix(gateway): stabilize process identities
2026-08-18 03:21:00 +08:00
Xubin Ren
dc3e3c1a2a
fix(gateway): prevent lifecycle races
2026-08-17 20:56:10 +08:00
Xubin Ren
c671acd6a8
fix(gateway): preserve shared runtime identity
2026-08-17 20:56:10 +08:00
Xubin Ren
d6847b0107
fix(runtime): recover orphaned gateway clients
2026-08-17 20:56:10 +08:00
Xubin Ren
eafc0bc6eb
fix(gateway): serialize shared runtime lifecycle
2026-08-17 20:56:10 +08:00
Xubin Ren
05acd79466
fix(gateway): probe Windows clients safely
2026-08-17 20:56:10 +08:00
Xubin Ren
cd6a11b3c5
fix(gateway): harden shared client lifecycle
2026-08-17 20:56:10 +08:00
Xubin Ren
19be5be1c0
refactor(gateway): scope foreground registration
2026-08-17 20:56:10 +08:00
Xubin Ren
014eab5f6a
fix(gateway): register foreground instances
2026-08-17 20:56:10 +08:00
Xubin Ren
b8333a2d7e
fix(cli): make gateway persistence explicit
2026-08-17 20:56:10 +08:00
Xubin Ren
74c11e5d28
fix(cli): share on-demand gateway lifecycle
2026-08-17 20:56:10 +08:00
chengyongru
757ad9c764
refactor: enforce BasedPyright strict type checking ( #5158 )
2026-07-29 21:37:11 +08:00
Xubin Ren
fe0717b385
feat(webui): add guided setup flows
...
* feat(channels): add guided setup flows
* test(channels): preserve setup config values
* fix(channels): reflect saved setup state
* refactor(channels): simplify setup state metadata
* fix(channels): harden setup lifecycle
* refactor(channels): centralize setup contracts
* fix(channels): route setup actions through webui shim
* fix(channels): adapt settings for compact screens
* fix(models): preserve default preset display
* feat(models): add curated Codex catalog
* fix(webui): stop attached gateway on interrupt
* fix(webui): simplify apps catalog
* docs(webui): clarify apps and runtime features
* feat(settings): add guided capability setup
* fix(webui): harden setup and managed services
* test: keep managed runtime checks portable
* test: scope POSIX runtime coverage
* fix(webui): simplify file settings
* feat(files): bundle document reading
* fix(webui): harden setup request boundaries
* fix(webui): prevent channel setup status squeeze
* fix(settings): group provider compatibility aliases
* refactor(settings): remove redundant setup surfaces
* fix(webui): harden guided setup lifecycle
* fix(webui): preserve channel setup compatibility
2026-07-13 13:11:46 +08:00
dajiaohuang
67b56cba74
@
...
fix(gateway): self-heal state file PID on server startup
After /restart on Windows, the gateway process gets a new PID (os.execv
creates a new process on Windows), but the state file at
run/gateway.<suffix>.json still contains the old PID from the initial
background spawn. Nothing rewrites it, leaving state inconsistent.
Add GatewayRuntime.refresh_state_pid() — a classmethod that reads the
existing state file, updates the PID and identity to the current
process, and writes atomically. Call it early in _run_gateway() so the
state file is always correct regardless of how the process was started
(initial spawn, os.execv, or subprocess.Popen).
On POSIX os.execv preserves the PID, so this is a no-op in normal
operation there, but still beneficial after any unusual restart path.
Fixes #4511
@
2026-07-06 15:29:11 +08:00
Xubin Ren
83e4bae7db
fix(gateway): skip ctrl-break wait when signal is rejected
2026-07-04 21:25:46 +08:00
xcao
58b5bb9204
fix(gateway): handle Windows stop fallback
2026-07-04 21:25:46 +08:00
chengyongru
bc1df49201
fix(gateway): handle lifecycle edge cases
2026-06-24 10:29:08 +08:00
Xubin Ren
e3c9aff41e
feat(gateway): add background and service controls
2026-06-22 14:48:49 +08:00