323 Commits

Author SHA1 Message Date
Xubin Ren
9ef5b1e145 fix: reset ssrf whitelist on config reload and document config refresh 2026-04-04 19:43:18 +08:00
04cb
5f08d61d8f fix(security): add ssrfWhitelist config to unblock Tailscale/CGNAT (#2669) 2026-04-04 19:43:18 +08:00
Xubin Ren
c3b4ebae53 refactor(agent): move internal prompts into packaged templates 2026-04-04 11:09:37 +00:00
Xubin Ren
7b852506ff fix(telegram): register Dream menu commands with Telegram-safe aliases
Use dream_log and dream_restore in Telegram's bot command menu so command registration succeeds, while still accepting the original dream-log and dream-restore forms in chat. Keep the internal command routing unchanged and add coverage for the alias normalization path.
2026-04-04 10:31:26 +00:00
Xubin Ren
549e5ea8e2 fix(telegram): shorten polling network errors 2026-04-04 10:26:58 +00:00
Xubin Ren
04419326ad fix(memory): migrate legacy HISTORY.md even when history.jsonl is empty 2026-04-04 10:11:53 +00:00
Xubin Ren
0a3a60a7a4 refactor(memory): simplify Dream config naming and rename gitstore module 2026-04-04 10:01:45 +00:00
Xubin Ren
408a61b0e1 feat(memory): protect Dream cron and polish migration UX 2026-04-04 09:01:42 +00:00
Xubin Ren
6e896249c8 feat(memory): harden legacy history migration and Dream UX 2026-04-04 08:41:46 +00:00
Xubin Ren
7e0c196797 fix(memory): repair Dream follow-up paths and move GitStore to utils
Made-with: Cursor
2026-04-04 04:49:42 +00:00
Xubin Ren
30ea048f19 Merge remote-tracking branch 'origin/main' into pr-2717-review 2026-04-04 04:42:52 +00:00
Xubin Ren
7229a81594 fix(providers): disable Azure SDK retries by default
Made-with: Cursor
2026-04-04 12:36:45 +08:00
pikaxinge
dbdf7e5955 fix: prevent retry amplification by disabling SDK retries 2026-04-04 12:36:45 +08:00
Xubin Ren
91a9b7db24 Merge origin/main into fix/retry-after-robust
Made-with: Cursor
2026-04-03 19:07:30 +00:00
Xubin Ren
9840270f7f test(tools): cover media dir access under workspace restriction
Made-with: Cursor
2026-04-04 03:03:58 +08:00
imfondof
896d578677 fix(restart): show restart completion with elapsed time across channels 2026-04-04 02:21:42 +08:00
imfondof
ba7c07ccf2 fix(restart): send completion notice after channel is ready and unify runtime keys 2026-04-04 02:21:42 +08:00
Lingao Meng
a05f83da89 test(providers): cover reasoning_content extraction in OpenAI compat provider
Add regression tests for the non-streaming (_parse dict branch) and
streaming (_parse_chunks dict and SDK-object branches) paths that extract
reasoning_content, ensuring the field is populated when present and None
when absent.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2026-04-04 02:09:57 +08:00
Xubin Ren
f409337fcf Merge remote-tracking branch 'origin/main' into pr-2646 2026-04-03 17:53:52 +00:00
daliu858
06989fd65b feat(qq): add configurable instant acknowledgment message (#2561)
Add ack_message config field to QQConfig (default: Processing...). When non-empty, sends an instant text reply before agent processing begins, filling the silence gap for users. Uses existing _send_text_only method; failure is logged but never blocks normal message handling.

Made-with: Cursor
2026-04-04 01:52:39 +08:00
Flo
49c40e6b31 feat(telegram): include author context in reply tags (#2605) (#2606)
* feat(telegram): include author context in reply tags (#2605)

* fix(telegram): handle missing attributes in reply_user safely
2026-04-04 01:52:39 +08:00
pikaxinge
5d1ea43858 fix: robust Retry-After extraction across provider backends 2026-04-02 18:39:24 +00:00
chengyongru
f824a629a8 feat(memory): add git-backed version control for dream memory files
- Add GitStore class wrapping dulwich for memory file versioning
- Auto-commit memory changes during Dream consolidation
- Add /dream-log and /dream-restore commands for history browsing
- Pass tracked_files as constructor param, generate .gitignore dynamically
2026-04-03 00:32:54 +08:00
chengyongru
b9616674f0 feat(agent): two-stage memory system with Dream consolidation
Replace single-stage MemoryConsolidator with a two-stage architecture:

- Consolidator: lightweight token-budget triggered summarization,
  appends to HISTORY.md with cursor-based tracking
- Dream: cron-scheduled two-phase processor that analyzes HISTORY.md
  and updates SOUL.md, USER.md, MEMORY.md via AgentRunner with
  edit_file tools for surgical, fault-tolerant updates

New files: MemoryStore (pure file I/O), Dream class, DreamConfig,
/dream and /dream-log commands. 89 tests covering all components.
2026-04-02 22:42:25 +08:00
Xubin Ren
e4b335ce81 refactor: extract runtime response guards into utils runtime module 2026-04-02 13:54:40 +00:00
Xubin Ren
714a4c7bb6 fix(runtime): address review feedback on retry and cleanup 2026-04-02 10:57:12 +00:00
Xubin Ren
eefd7e60f2 Merge remote-tracking branch 'origin/main' into feat/runtime-hardening 2026-04-02 10:40:49 +00:00
Xubin Ren
3558fe4933 fix(cli): honor custom config path in channel commands 2026-04-02 18:37:46 +08:00
masterlyj
11ba733ab6 fix(test): update load_config mock to accept config_path parameter 2026-04-02 18:37:46 +08:00
haosenwang1018
7a6416bcb2 test(matrix): skip cleanly when optional deps are missing 2026-04-02 18:17:00 +08:00
cypggs
ca68a89ce6 merge: resolve conflicts with upstream/main, preserve typing indicator 2026-04-02 14:28:23 +08:00
Xubin Ren
cc33057985 refactor(providers): rename openai responses helpers 2026-04-02 13:43:34 +08:00
Xubin Ren
ded0967c18 fix(providers): sanitize azure responses input messages 2026-04-02 13:43:34 +08:00
Kunal Karmakar
61d7411238 Fix failing test 2026-04-02 13:43:34 +08:00
Kunal Karmakar
76226274bf Failing test 2026-04-02 13:43:34 +08:00
Kunal Karmakar
e206cffd7a Add tests and handle json 2026-04-02 13:43:34 +08:00
Kunal Karmakar
ac2ee58791 Add tests and logs 2026-04-02 13:43:34 +08:00
Kunal Karmakar
8c0607e079 Use SDK for stream 2026-04-02 13:43:34 +08:00
Kunal Karmakar
0417c3f03b Use OpenAI responses API 2026-04-02 13:43:34 +08:00
Xubin Ren
9ba413c82e test(cron): cover deliver flag on scheduled jobs 2026-04-02 13:03:46 +08:00
Xubin Ren
a3e4c77fff fix(providers): normalize anthropic cached token usage 2026-04-02 12:51:45 +08:00
chengyongru
da08dee144 feat(provider): show cache hit rate in /status (#2645) 2026-04-02 12:51:45 +08:00
Xubin Ren
485c75e065 test(exec): verify windows drive-root workspace guard 2026-04-02 04:00:03 +08:00
zhangxiaoyu.york
bc2e474079 Fix ExecTool to block root directory paths when restrict_to_workspace is enabled 2026-04-02 04:00:03 +08:00
Xubin Ren
7e719f41cc test(providers): cover github copilot lazy export 2026-04-02 03:46:40 +08:00
Xubin Ren
2ec68582eb fix(sdk): route github copilot through oauth provider 2026-04-02 03:46:40 +08:00
RongLei
c5f0997381 fix: refresh copilot token before requests
Address PR review feedback by avoiding an async method reference as the OpenAI client api_key.

Initialize the client with a placeholder key, refresh the Copilot token before each chat/chat_stream call, and update the runtime client api_key before dispatch.

Add a regression test that verifies the client api_key is refreshed to a real string before chat requests.

Generated with GitHub Copilot, GPT-5.4.
2026-04-02 03:46:40 +08:00
RongLei
a37bc26ed3 fix: restore GitHub Copilot auth flow
Implement the real GitHub device flow and Copilot token exchange for the GitHub Copilot provider.

Also route github-copilot models through a dedicated backend and strip the provider prefix before API requests.

Add focused regression coverage for provider wiring and model normalization.

Generated with GitHub Copilot, GPT-5.4.
2026-04-02 03:46:40 +08:00
Xubin Ren
fbedf7ad77 feat: harden agent runtime for long-running tasks 2026-04-01 19:12:49 +00:00
chengyongru
69624779dc fix(test): fix flaky test_fixed_session_requests_are_serialized
Remove the fragile barrier-based synchronization that could cause
deadlock when the second request is scheduled first. Instead, rely
on the session lock for serialization and handle either execution
order in assertions.
2026-03-31 21:50:33 +08:00