Commit Graph
3697 Commits
Author SHA1 Message Date
nanobot 417e2f19d5 feat: add deploy/rollback supervisor script
Test Suite / Detect changes (push) Has been cancelled
Test Suite / Python (Windows, 3.14) (push) Has been cancelled
Test Suite / Python (minimum, 3.11) (push) Has been cancelled
Test Suite / Python (latest, 3.14 + coverage) (push) Has been cancelled
Test Suite / webui (push) Has been cancelled
Test Suite / docker (push) Has been cancelled
Git-checkout-based deployment with health checks and automatic rollback.
Usage: deploy.sh <commit> | deploy.sh rollback | deploy.sh status
2026-07-27 21:57:34 +08:00
nanobot 99b86a22c8 feat: recover stale sessions on gateway startup
Test Suite / Detect changes (push) Has been cancelled
Test Suite / Python (Windows, 3.14) (push) Has been cancelled
Test Suite / Python (minimum, 3.11) (push) Has been cancelled
Test Suite / Python (latest, 3.14 + coverage) (push) Has been cancelled
Test Suite / webui (push) Has been cancelled
Test Suite / docker (push) Has been cancelled
Scan all session files on startup and recover any with stale turn state
(pending_user_turn or runtime_checkpoint metadata) left from a previous
crash or restart. Previously this only happened lazily when a new message
arrived for the affected session.

- Add SessionManager.list_session_keys() to enumerate session keys from disk
- Add AgentLoop.recover_stale_sessions() to scan and recover all sessions
- Call recover_stale_sessions() during gateway startup in _run_gateway
2026-07-27 21:27:29 +08:00
chengyongruandchengyongru e819b7eea4 fix(webui): stabilize repeated model preset rows 2026-07-27 18:11:10 +08:00
chengyongruandchengyongru 3f808d0a68 docs: improve README discoverability 2026-07-27 15:57:03 +08:00
yu-xin-candXubin Ren 7fd28c9f06 fix(memory): preserve unprocessed dream history 2026-07-27 15:47:21 +08:00
chengyongruandGitHub c13df29457 feat(memory): restore Dream model preset override (#5107) 2026-07-27 14:43:25 +08:00
chengyongruandGitHub 281b4b7f0b chore: remove expired v0.3.1 compatibility shims (#5106) 2026-07-27 13:53:04 +08:00
chengyongruandchengyongru 39348dfafe refactor(agent): remove dead lifecycle scaffolding 2026-07-27 12:00:06 +08:00
chengyongruandXubin Ren b3d3a3e6c3 fix(image): delegate DNS to explicit proxy 2026-07-27 10:06:19 +08:00
chengyongruandXubin Ren d73794bc68 fix(image): honor provider proxy for URL downloads 2026-07-27 10:06:19 +08:00
Xubin Ren cc3dbbe804 fix(security): block IPv6 unspecified SSRF targets 2026-07-27 10:06:19 +08:00
Xubin Ren 4408cde019 fix(security): harden generated image downloads 2026-07-27 10:06:19 +08:00
Xubin Ren cf1e801a29 fix(image): align Gemini hints with model capabilities 2026-07-27 03:07:41 +08:00
Xubin Ren a8604a3172 fix(image): scope Gemini image sizes by model 2026-07-27 03:07:41 +08:00
ef445cc246 fix(image): narrow Gemini Flash aspect-ratio and image-size scoping
Address review feedback that the capability checks were broader than the
documented per-model matrix:

- Drop the extreme aspect ratios (1:4, 4:1, 1:8, 8:1) from the Flash
  allow-list. They are only documented for 3.1 Flash / Flash Lite, so the
  global set could send an unsupported ratio to 2.5 Flash Image or 3.1 Pro
  Image. Keep the ratios common to every Flash image model.
- Identify imageSize support positively via "gemini-3" instead of excluding
  "2.5". The old predicate also matched gemini-2.0-flash-preview-image-
  generation, which (with the default 1K size) altered that model's request
  shape even though only Gemini 3+ image models accept a configurable size.

Add tests for the gemini-2.0 image-size drop and the extreme-ratio drop.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-27 03:07:41 +08:00
4986590bd7 fix(image): pass aspect ratio and size to Gemini Flash image models
The Gemini Flash image path (`generateContent`) dropped both `aspect_ratio`
and `image_size`: `generate()` never forwarded them and
`_generate_gemini_flash` did not accept them, so every request fell back to
1:1 / input-matched output. The Imagen path was unaffected.

Forward the hints and emit them under
`generationConfig.responseFormat.image` per the current Gemini API. Aspect
ratio is validated against the accepted set; `imageSize` is validated against
{512,1K,2K,4K} and only sent to Gemini 3+ image models, since
`gemini-2.5-flash-image` supports only `aspectRatio`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-27 03:07:41 +08:00
Xubin Ren b695a7e875 fix(cli): harden quick start OAuth handling 2026-07-27 02:51:04 +08:00
Xubin Ren a4ec83fb0d fix(cli): scope Codex proxy env resolution 2026-07-27 02:51:04 +08:00
chengyongruandXubin Ren 2a1f840ce2 fix(cli): support Codex OAuth in quick start 2026-07-27 02:51:04 +08:00
Xubin Ren addaf2d3fc fix(dingtalk): harden group reply sender labels 2026-07-27 02:33:41 +08:00
9f3dee0192 docs(dingtalk): clarify disable_private_chat intent in comments
Addresses automated review: document that the guard is an intentional hard group-only switch (allowlisted DMs blocked by design) and that str() guards a None sender_id. Comment-only.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-27 02:33:41 +08:00
205889f9e0 feat(dingtalk): prefix group replies with sender mention
In group chats, prefix the outbound markdown reply with an H1 naming the sender (# @<nick>) so the addressed user can spot it in a busy group. Private replies are sent verbatim.

Visual only: DingTalk markdown robot messages do not push real @ notifications (that would require staffId plumbing and a different message type). sender_name is read from OutboundMessage.metadata, which the agent loop already propagates from inbound metadata.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-27 02:33:41 +08:00
14e692e40d feat(dingtalk): add disable_private_chat to reject 1:1 DMs
Add a `disable_private_chat` config flag (JSON alias `disablePrivateChat`,
default False) to the DingTalk channel. When enabled, any non-group (1:1)
message is rejected with a Chinese notice directing the user to group chat
("该机器人未开启私聊,请在群聊中与我对话。") before permission/pairing logic
runs, so even allowlisted senders are redirected. Group messages are
unaffected.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-27 02:33:41 +08:00
Xubin Ren 68717937e8 fix(agent): throttle idle scans by default 2026-07-27 02:15:48 +08:00
Andrew KhmylovandXubin Ren 7aab7e8830 feat(agent): make idle compaction scan interval configurable
Before this change, idle compaction is triggered every 1 second
if the incoming message stream is idle.
When triggered, it enumerates all session files, loads and parses them,
and then checks their expiration.

This becomes too CPU-intensive, especially on low-power devices like Raspberry Pi.
It's unlikely that you actually need to compact every second over the long time.

This change adds a configurable throttling for idle-compaction.

Default behavior is unchanged.
2026-07-27 02:15:48 +08:00
Xubin Ren 4e2640f2d2 fix(memory): keep failed Dream batches retryable 2026-07-27 02:00:41 +08:00
shixi-liandXubin Ren 15e42059bd fix(memory): progress past completed no-op batches 2026-07-27 02:00:41 +08:00
Xubin Ren b55b76d755 fix(streaming): preserve recovered segments across channels 2026-07-27 01:39:46 +08:00
chengyongruandXubin Ren e6baecafcd fix(agent): close length recovery lifecycle gaps 2026-07-27 01:39:46 +08:00
chengyongruandXubin Ren 27a00c7a4f fix(webui): merge length recovery stream segments 2026-07-27 01:39:46 +08:00
chengyongruandXubin Ren 3cc5a98d9f refactor(agent): derive recovery count from segments 2026-07-27 01:39:46 +08:00
chengyongruandXubin Ren 1d2ed6e4d2 fix(agent): reset recovery chains across injections
Reset both the recovered segments and retry budget whenever injected input starts a new logical answer. Cover fatal tool-error boundaries and rename the prompt test module so pytest can collect the full suite.
2026-07-27 01:39:46 +08:00
chengyongruandXubin Ren 154cbc1974 refactor(agent): trim recovery tail anchor 2026-07-27 01:39:46 +08:00
chengyongruandXubin Ren df2e5b7225 fix(agent): anchor truncated response continuations 2026-07-27 01:39:46 +08:00
chengyongruandXubin Ren b19039f9d0 fix(agent): preserve length-recovered output 2026-07-27 01:39:46 +08:00
Xubin Ren c1899e2cb4 fix(mcp): decode URI-encoded schema refs 2026-07-27 01:14:41 +08:00
amplifierplusandXubin Ren 9aae7485d6 fix(mcp): normalize local schema refs 2026-07-27 01:14:41 +08:00
chengyongruandXubin Ren 2e2f15dd0c fix(channels): serialize Feishu connect completion 2026-07-27 01:00:12 +08:00
KDBandXubin Ren 4835814746 fix(channels): ignore confirmations after connect cancellation 2026-07-27 01:00:12 +08:00
Xubin Ren d236883e2d fix(pairing): reject malformed store entries 2026-07-27 00:46:40 +08:00
santhrealandXubin Ren f7bf4c972e fix(pairing): treat null approved/pending maps as empty 2026-07-27 00:46:40 +08:00
Xubin Ren cf6ca13b6d fix(exec): preserve bwrap workspace masking 2026-07-27 00:31:00 +08:00
yu-xin-candXubin Ren 22e61003f9 test(exec): make bwrap bind tests portable 2026-07-27 00:31:00 +08:00
yu-xin-candXubin Ren 01a11b3980 feat(exec): allow extra bwrap bind roots 2026-07-27 00:31:00 +08:00
Xubin Ren 5d8046deef test(heartbeat): cover ignored unified routes 2026-07-27 00:12:44 +08:00
yu-xin-candXubin Ren a7a6c26eab fix(heartbeat): route unified sessions to last channel 2026-07-27 00:12:44 +08:00
chengyongruandchengyongru be43a54570 fix(webui): prevent mobile thread overflow 2026-07-26 23:59:28 +08:00
Xubin Ren ff379b91cf fix(agent): preserve merged runtime context markers 2026-07-26 23:46:54 +08:00
yu-xin-candXubin Ren eb93060f95 fix(agent): preserve pending runtime context 2026-07-26 23:46:54 +08:00
santhrealandXubin Ren 07c3e02d5c fix(triggers): treat null runHistory as empty when loading triggers 2026-07-26 23:33:28 +08:00