Commit Graph
4963 Commits
Author SHA1 Message Date
pei711 5fd79c25fa fix(providers): preserve first SSE event after UTF-8 BOM 2026-10-18 20:10:51 +08:00
Xubin Ren d0a1423ccf fix(agent): retain skipped inline reasoning separators 2026-10-18 19:57:34 +08:00
yixi ning ed8143f7d0 fix(agent): preserve separators in streamed inline reasoning 2026-10-18 19:57:34 +08:00
Xubin Ren a389633b9c fix(email): preserve case-colliding attachment files 2026-10-18 19:44:48 +08:00
fhgffy 38c92558ca fix(email): preserve attachments with colliding filenames 2026-10-18 19:44:48 +08:00
Jin Long ba406fc624 fix(session): preserve Unicode separators during JSONL migration 2026-10-18 19:30:29 +08:00
chengyongru 0a8b18fa58 fix(deepseek): align model capabilities with the official API (#6283)
* fix(deepseek): preserve vision for legacy Flash aliases

* fix(deepseek): expose validated model catalog capabilities

* fix(deepseek): retain explicit off control with live reasoning levels

* docs: clarify provider-specific model guidance
2026-10-18 19:17:05 +08:00
fhgffy aef8127aff fix(email): exclude attached messages from body extraction 2026-10-18 19:11:29 +08:00
Xubin Ren 271bda1d81 fix(napcat): simplify unknown-size handling and check download cap 2026-10-18 18:56:28 +08:00
Lengshuang 17684ca5c4 fix(napcat): keep a message whose image declares a non-numeric size
Napcat reports an image segment's file_size as a string that is not
always numeric, so int() raises ValueError. The upfront size guard only
caught TypeError and KeyError, the ValueError escaped _download_image
into _on_message, and the whole inbound message was dropped — text
included — with only a background-handler warning left behind.

Handle ValueError as the guard already handles a missing size: skip the
upfront check and let the streamed download enforce max_image_bytes.
Log it, since a declared size we cannot read is worth knowing about.
2026-10-18 18:56:28 +08:00
Xubin Ren 90fcb7f903 test(agent): close session input fixtures and share shutdown diagnostics 2026-10-18 18:33:24 +08:00
Xubin Ren 2756c6bb78 test(agent): capture native shutdown timeout stacks 2026-10-18 18:33:24 +08:00
Xubin Ren 3d25912510 fix(telegram): preserve fence syntax across message chunks 2026-10-18 18:33:24 +08:00
Xubin Ren b3fba7c78f test(telegram): verify fenced code at outbound send boundary 2026-10-18 18:33:24 +08:00
HuiandClaude Opus 5.5 7f64efbb95 fix(telegram): render tilde and longer code fences as code
The Markdown-to-HTML converter only protected ``` blocks, and closed a
block at the first ``` it met. A ~~~ block was formatted as prose ("#
setup" turned bold, __init__ into <b>init</b>), and a ```` block showing a
``` example rendered as an empty <pre> followed by leaked, re-formatted
text.

Protect fenced blocks line by line first: open on ``` or ~~~, close on a
run of the same character at least as long. One-line ```code``` and
unclosed fences keep the previous regex handling. The streaming preview
strips fences through the same helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 18:33:24 +08:00
Xubin Ren df6158ec18 test(telegram): cover plain and fragment media URLs 2026-10-18 17:38:49 +08:00
Gianfranco DemarcoandCursor 9214390f9d fix(telegram): detect remote media types with queries
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-18 17:38:49 +08:00
Xubin Ren 6baf7178a8 fix(webui): cancel stale history reads on local navigation 2026-10-18 17:13:18 +08:00
Xubin Ren 27ef6fe24f fix(webui): center prompt navigation in the complete chat frame 2026-10-18 17:13:18 +08:00
Xubin Ren f230409b5a fix(webui): navigate from history to unsaved live prompts 2026-10-18 17:13:18 +08:00
Xubin Ren f9a3e55b64 perf(webui): revalidate prompt summaries and bound navigation work 2026-10-18 17:13:18 +08:00
Xubin Ren bf1eada575 fix(webui): navigate complete prompt history with bounded pages 2026-10-18 17:13:18 +08:00
takiAA 5f6e8a6baa fix(documents): preserve complete PDF pages across reads 2026-10-18 16:52:47 +08:00
Xubin Ren 42276f4884 test(shell): treat vanished Linux proc entries as stopped 2026-10-18 16:40:43 +08:00
Rudy Celekli da673d3b5a types: annotate spreadsheet column offsets 2026-10-18 16:40:43 +08:00
Rudy Celekli af353fae73 fix(grep): preserve XLSX cell locators for literal tabs
Keep extracted spreadsheet text unchanged and carry actual cell start offsets into grep headers. Add real workbook GrepTool regressions and plain/empty-cell controls. Focused literal-source extraction/ContentPage replay passes; full GrepTool and required CI remain pending.
2026-10-18 16:40:43 +08:00
lux-liang a2f9fae8fe fix(documents): skip chart-only sheets when reading XLSX files 2026-10-18 16:22:53 +08:00
Xubin Ren 6330b748de test(shell): handle process reaping during PID checks 2026-10-18 15:55:24 +08:00
fhgffy 8adab28aee fix(web): handle case-insensitive image media types 2026-10-18 15:55:24 +08:00
Shoaib b4f381ca55 fix(media): keep upload filenames within the UTF-8 byte limit
The 80-character stem limit can still produce a filename longer than 255
bytes when a document name contains CJK characters or emoji. Adding the
upload ID then makes an otherwise valid document name fail on disk.

Retain the character limit and trim only stems that exceed the remaining
byte budget after the ID, separator, and extension. Decode at a character
boundary so the saved name remains valid Unicode.

Add file-write regressions for CJK and emoji document names.

Validation: 38 media and attachment-store tests; Ruff; BasedPyright;
import-boundary checks; git diff --check.
2026-10-18 15:23:07 +08:00
Xubin Ren c49d84b4e5 fix(whatsapp_agent): retain unsent scheduled results across reconnects 2026-10-18 14:49:49 +08:00
Xubin Ren 86f16ff493 fix(whatsapp_agent): clarify privacy and align current channel setup 2026-10-18 14:49:49 +08:00
Xubin Ren 5a0f2c2dc3 fix(whatsapp_agent): preserve poll continuity and partial delivery progress 2026-10-18 14:49:49 +08:00
Carmelo Campos 4d45564362 fix(whatsapp_agent): scope the bad-token heuristic away from media methods
The Developer Manual documents 400/100 as meaning "the API token is
present but not valid" only on endpoints without media. Media methods
share that same status and code with an unknown or expired media id and
with a length cap.

Classifying a 400 from `GET /media/<id>` as an invalid token would stop
the channel because one attachment expired, so media requests now pass
`media_endpoint=True` and the heuristic is skipped for them. A malformed
Authorization header (401/190) is still recognised on every endpoint.

Also corrects the state module docstring: the store keeps the cursor,
dedup window, creator identifier, and delivery receipts, and holds no
token material.
2026-10-18 14:49:49 +08:00
Carmelo Campos b7cb5da4b5 feat(channels): add WhatsApp Agent Platform channel
Adds `whatsapp_agent`, an additive channel that connects nanobot to the
official WhatsApp Agent Platform API (https://api.whatsapp.com/agent/v1).
It authenticates with a per-agent API token and long-polls `GET /updates`
instead of linking a device, so it is the officially supported interface
rather than the Neonize linked-device protocol used by the existing
`whatsapp` channel.

The existing `whatsapp` channel is unchanged; both can run at once under
different names.

Design notes:
- The poll cursor, dedup window, and creator identifier live in one
  atomically replaced state file. A message id is recorded before it is
  handled, so a crash re-reads the batch without answering twice, and the
  cursor is only accepted after the batch is processed.
- The first poll omits `offset`, which resolves the head and never replays
  up to 30 days of history into an auto-replying agent.
- A changed token resets the cursor, because `next_offset` is only valid
  for the agent that issued it.
- Each API method is paced below its own rolling 60-second limit, and
  progress/tool-hint messages default to off because they spend the shared
  12-per-minute send budget.
- Retries are limited to confirmed non-delivery (`429`, `503`/`131016`).
  A `500` or read timeout is ambiguous, so it is not retried unless
  `retryAmbiguousSends` is set; a duplicate is worse than a missed reply.
- Inbound media is downloaded through the shared SSRF guard, size-capped,
  and verified against the reported digest. Outbound media is validated
  before upload.
- Reactions are receive-only, matching the API. The token is never logged
  or persisted; state stores only a SHA-256 fingerprint.

Docs compare both WhatsApp channels, including the lack of end-to-end
encryption, country availability, and rate limits.
2026-10-18 14:49:49 +08:00
chengyongru 74942bd190 test: replace false-green checks with behavioral coverage (#6282)
* test: replace false-green checks with behavioral coverage

* test: complete behavior-focused audit coverage
2026-10-18 03:16:25 +08:00
chengyongru c7ab7aa6da refactor(webui): remove obsolete topic rename dialog mode 2026-10-18 01:48:42 +08:00
chengyongru d9537bcc94 feat(webui): rename sidebar topics inline 2026-10-18 01:48:42 +08:00
chengyongru 7edd377352 fix(webui): keep search activity summaries on one line 2026-10-18 01:45:53 +08:00
chengyongru c91e2bd553 fix(webui): preserve list semantics around links
Classify compact title-plus-URL previews at the Markdown AST boundary instead of flattening arbitrary list descendants. Preserve ordinary prose, nested lists, independent links, numbering, task status, and inline formatting across streaming modes.

Refs NAN-269.
2026-10-18 00:48:07 +08:00
chengyongru 756f6a6fe5 refactor(agent): deduplicate model request preparation 2026-10-18 00:26:19 +08:00
chengyongru 1a4cee5815 fix(webui): align mention overlay spacing with the native caret 2026-10-18 00:25:47 +08:00
Xubin Ren 61666c495a fix(webui): reuse preview tabs for resolved file aliases 2026-10-18 00:14:36 +08:00
Xubin Ren 0869c928a2 feat(webui): preview Markdown files with a source toggle 2026-10-18 00:14:36 +08:00
chengyongru 742ea48df3 fix(webui): keep CLI Apps reads off the event loop 2026-10-18 00:05:14 +08:00
chengyongru 8de03ac0a2 fix(webui): use file-type icons in file change activity 2026-10-17 23:27:00 +08:00
chengyongru d076e4ef13 docs(automations): keep Markdown paragraphs on one line 2026-10-17 18:26:15 +08:00
Xubin Ren 508cedff31 fix(channels): retain scheduled results across pre-send outages 2026-10-17 12:49:03 +08:00
Xubin Ren 61db036cee test(cron): narrow delivery review to saved-chat routing 2026-10-17 12:49:03 +08:00
Xubin Ren 8691bdedd5 test(cron): cover WebUI-origin cross-channel delivery 2026-10-17 12:49:03 +08:00