Commit Graph
397 Commits
Author SHA1 Message Date
chengyongruandXubin Ren 93de413432 feat(agent): expose request routing metadata through my 2026-07-12 00:35:17 +08:00
chengyongruandXubin Ren d349b65713 test(agent): remove obsolete runtime context assertions 2026-07-12 00:35:17 +08:00
chengyongruandXubin Ren 54b250430d fix(session): stop synthesizing MCP preset prompt context 2026-07-12 00:35:17 +08:00
chengyongruandXubin Ren e206ee4e70 refactor(agent): remove legacy image mode prompt injection 2026-07-12 00:35:17 +08:00
chengyongruandXubin Ren 2eb7398f34 fix(agent): close runtime context persistence gaps 2026-07-12 00:35:17 +08:00
chengyongruandXubin Ren f75d3519db feat(agent): add persistent runtime context providers 2026-07-12 00:35:17 +08:00
chengyongruandXubin Ren 7f8c3453e1 refactor(agent): gate sustained goals behind explicit /goal
Replace the legacy long-goal skill contract with command-scoped goal tools and runtime guidance. Keep goal state durable across continuations while restricting create and replace mutations to explicit user /goal turns.
2026-07-12 00:35:17 +08:00
Xubin Ren edf78e7054 fix(mcp): keep transport cleanup in owner tasks 2026-07-11 11:45:20 +08:00
chengyongruandXubin Ren bd0dd85f44 test: isolate MCP reconnect DNS transport
Maintainer edit: the real MCP reconnect regression test can bind the class-level PinnedDNSAsyncTransport lock to its pytest event loop. Patch the MCP module to use a test-local transport subclass so later async tests do not inherit that loop-bound lock.
2026-07-11 11:45:20 +08:00
469d004773 test: add MCP reconnect crash regression
maintainer edit: port the real streamable-http idle-timeout reproduction from #4764 so this PR carries regression coverage for #4302's gateway crash path.

Co-authored-by: tjc0726 <49085201+tjc0726@users.noreply.github.com>
2026-07-11 11:45:20 +08:00
flyzstuandXubin Ren f3d1b9ca2d fix(mcp): defer stale stack cleanup during reconnect 2026-07-11 11:45:20 +08:00
Xubin Ren c111aaa7ee fix(dream): gate periodic commits on content changes 2026-07-11 11:16:59 +08:00
Aleksander W. Oleszkiewicz (Alek)andXubin Ren 9adcd3d923 adding tests to prevent regression 2026-07-11 11:16:59 +08:00
chengyongruandXubin Ren fe7d94359b fix(agent): preserve runtime compatibility contracts 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren 10930f3902 Revert "test(agent): probe runtime change amplification"
This reverts commit 85c73779f9cb6c4cd707fb51f80cb4e363861861.
2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren 6b7470646f test(agent): probe runtime change amplification 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren 21f58cbabf refactor(agent): make resolver sole runtime owner 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren c9d3e74342 refactor(agent): require runtime for consolidation 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren 5bd3d1e0af refactor(agent): centralize runtime default mutations 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren af85c356b8 refactor(agent): capture subagent runtime before spawn 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren 198fd9f869 refactor(agent): capture runtime at turn admission 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren 45ace23580 test(agent): assert subagent runtime generation 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren b4f069800e refactor(agent): make runner consume required runtime 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren 3f8170e835 test(agent): characterize active runner provider drift 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren cb03d2c748 refactor(agent): snapshot generation without provider mutation 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren bd94fefd1a refactor(agent): introduce immutable model runtime resolver 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren 42d7ad34a4 refactor(agent): unify request context routing 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren bb3b449e09 refactor(agent): capture original user text per turn 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren 55317094b6 test(agent): characterize request context isolation 2026-07-10 17:54:34 +08:00
chengyongruandXubin Ren 0ae28571e7 fix(agent): close file edit activity on cancellation 2026-07-09 10:42:43 +08:00
chengyongruandXubin Ren 7768672c5b feat: add file edit diff progress view
Capture file edit snapshots through runner tool lifecycle hooks and render unified diffs in the WebUI with folding and truncation controls.
2026-07-09 10:42:43 +08:00
chengyongruandXubin Ren 8559458258 refactor(agent): add turn hook factories 2026-07-08 21:02:12 +08:00
chengyongruandXubin Ren 04dbf17426 test(agent): cover turn hook ordering 2026-07-08 21:02:12 +08:00
chengyongruandXubin Ren a52a88455b refactor(agent): extract turn hook assembly 2026-07-08 21:02:12 +08:00
chengyongruandXubin Ren 3f33ff3143 chore: remove unused dead code 2026-07-07 15:41:27 +08:00
hamb1yandXubin Ren 9eade9be5f test: update quick start provider expectations 2026-07-06 12:13:00 +08:00
Kenneth ZhaoandGitHub f0c989ba2d fix(dream): ground memory audit records in the real git diff (#4673)
* fix(dream): ground commit messages and cursor advance in the real git diff

Dream consolidation could emit a /dream-log audit record that did not match
the actual file changes: build_dream_commit_message appended the LLM's
unverified resp.content, dream_run_completed only checked the stop reason, and
file contents were deliberately omitted from the prompt. The combination let a
single-turn self-report become the durable audit record.

- gitstore: add summarize_working_tree() — a structured, machine-derived
  summary (per-file +N/-M, totals, capped unified diff) of working-tree
  changes vs HEAD. Pure filesystem/git ground truth, never LLM narrative.
- memory: build_dream_commit_message now takes the diff body instead of resp;
  dream_content_diff() exposes the real delta over SOUL/USER/MEMORY.md only
  (excludes .dream_cursor so cursor writes aren't mistaken for edits);
  build_dream_prompt embeds current file contents so the model edits reality,
  not a stale mental model.
- builtin/cli: both Dream paths now compute the diff, gate cursor advance on
  a non-empty delta (no-op runs no longer swallow history), and commit with
  the diff-grounded message. Non-git workspaces fall back to the completion
  check.
- dream.md: document that contents are embedded, and add a chain-of-
  verification guardrail so the model's summary cannot claim unmade edits.

A regression test proves a lying resp.content never reaches the audit log
while the real diff does.

* fix(dream): mark non-UTF-8 memory files as binary in diff summary

Address review feedback (Q1 on PR #4673): summarize_working_tree read
working-tree files with errors="replace", which would emit U+FFFD
replacement chars into the audit record if a memory file ever held
invalid UTF-8 — misrepresenting the diff it is meant to make truthful.

Switch to errors="strict" and catch UnicodeDecodeError: a non-UTF-8
(or binary/corrupt) file is now recorded as "{path}: binary or
non-UTF-8 file changed" and omitted from the unified diff, so the
audit record stays honest. An empty diff block is also suppressed when
all changes are binary.

Adds a defensive regression test asserting no replacement char leaks.
2026-07-06 12:12:55 +08:00
chengyongruandXubin Ren 614ea86a81 test: align MCP transient reconnect coverage
maintainer edit: update the existing transient retry tests for reconnect-first behavior and keep structured retry-failure coverage in the focused MCP transient suite.
2026-07-04 21:15:18 +08:00
LILACandGitHub b19a744110 fix(providers): update Anthropic default model to claude-sonnet-4-6
Update the Anthropic provider default model and matching docs/tests from claude-sonnet-4-20250514 to claude-sonnet-4-6.

Fixes #4675
2026-07-03 15:46:19 +08:00
Xubin Ren c9c69e4316 fix(memory): cap workspace Dream prompt overrides 2026-07-03 00:41:51 +08:00
chengyongruandXubin Ren f38fd7d5d3 feat(memory): add workspace Dream prompt override 2026-07-03 00:41:51 +08:00
chengyongruandXubin Ren 5af22042ec fix(trigger): keep local worker alive on turn cancel 2026-07-03 00:36:29 +08:00
chengyongruandXubin Ren aecb5fbc33 fix(agent): avoid tool compaction echo loops 2026-07-03 00:36:22 +08:00
chengyongruandXubin Ren 34535b4e7c fix(webui): hide subagent backfill payloads 2026-07-02 14:36:23 +08:00
Stellar鱼andXubin Ren 5abe06f808 test: cover runner blocked tool-call finish reasons 2026-07-02 14:36:18 +08:00
chengyongruandXubin Ren acb0e853ff refactor(trigger): share automation turn delivery 2026-07-02 13:32:46 +08:00
chengyongruandXubin Ren f32007c83f fix(trigger): defer local triggers until session idle 2026-07-02 13:32:46 +08:00
chengyongruandXubin Ren 2ebf5c4972 refactor(trigger): name CLI trigger source as local
maintainer edit: cron is also a trigger source, so keep the new CLI-delivered source explicitly named as local trigger across backend, WebUI, docs, and tests.
2026-07-02 13:32:46 +08:00
chengyongruandXubin Ren 55b550ee01 fix(trigger): hide external trigger inputs 2026-07-02 13:32:46 +08:00
chengyongruandXubin Ren 5f4cfbcb16 refactor(bus): type outbound runtime events 2026-07-01 20:17:00 +08:00