491 Commits

Author SHA1 Message Date
Xubin Ren
d99f589a59 refactor(session): clarify reference boundaries 2026-08-04 12:14:51 +08:00
Xubin Ren
d8aeb0eb2c refactor(session): simplify cross-session flow 2026-08-04 12:14:51 +08:00
Xubin Ren
62d34b5eb7 refactor(session): tighten cross-session access 2026-08-04 12:14:51 +08:00
Xubin Ren
f15ea84dd1 fix(session): enforce trusted read scope 2026-08-04 12:14:51 +08:00
Xubin Ren
4c07c40b34 feat(session): link agent references 2026-08-04 12:14:51 +08:00
Xubin Ren
5dd3dc5450 fix(session): harden cross-session references 2026-08-04 12:14:51 +08:00
Xubin Ren
9b25da7b92 feat(session): add cross-session references 2026-08-04 12:14:51 +08:00
Xubin Ren
39e1533c3b fix(gateway): make resource teardown cancellation-safe 2026-08-03 16:00:39 +08:00
santhreal
4c387f6633 fix(memory): handle non-string timestamp and missing role in raw_archive 2026-08-01 20:14:28 +08:00
KDB
39bb20c76b fix(session): tolerate malformed persisted session summary
AutoCompact.prepare_session runs on the turn hot path
(AgentLoop._compact_session) and read the persisted _last_summary metadata
with an unguarded meta['text'] and datetime.fromisoformat(meta['last_active']).
A _last_summary dict that was hand-edited or written by another version
(missing text/last_active, or a non-ISO last_active) raised KeyError/ValueError
out of the turn.

Sibling readers already tolerate the same data: estimate_session_prompt_tokens
uses .get('text') and _archive parses inside try/except. Mirror that tolerance:
skip when text is unusable, and fall back to the session's own updated_at (the
value the writer persists) when last_active is missing or unparseable, so the
archived summary is preserved instead of crashing the turn.
2026-08-01 19:29:16 +08:00
chengyongru
6a1a45d07a
feat: preserve Responses reasoning state and compact context (#5172) 2026-07-30 22:39:43 +08:00
Solaris-star
511c764f45 fix(agent): route finish_reason='length' with blank content to length recovery
When an LLM response arrives with finish_reason='length' and has_tool_calls
but blank text content (e.g. the model spent its whole output budget on a
tool call whose closing tag was truncated), the runner dropped the tool
calls and then misrouted the blank response into the empty-response retry
branch. Retrying the same prompt cannot recover from output-budget
exhaustion, so every retry hit the same length ceiling and the turn ended
in the generic apology.

The length-recovery branch was gated on 'finish_reason == length and not
is_blank_text(clean)', so a blank-but-truncated turn could never reach it.

- The empty-response retry branch now excludes finish_reason == 'length'
  (in addition to 'error').
- The length-recovery branch no longer requires non-blank content, so a
  blank-but-truncated turn enters recovery and appends
  build_length_recovery_message (which handles a blank tail safely).

Adds a regression test asserting the length-recovery path is taken; it
fails on the unfixed code and passes with the fix.

Fixes #5133
2026-07-30 19:55:19 +08:00
Xubin Ren
0eac82984c test(mcp): stabilize idle reconnect timing 2026-07-30 19:44:09 +08:00
yu-xin-c
9ec4420104 fix(agent): release idle session locks 2026-07-30 19:17:37 +08:00
KDB
e633f867e8 fix(session): tolerate invalid idle-compaction timestamps 2026-07-30 18:52:16 +08:00
chengyongru
e2563e2e74
refactor(cli): split commands into focused modules (#5175) 2026-07-30 15:01:35 +08:00
chengyongru
c33c188afb
fix(session): preserve history during idle compaction (#5167) 2026-07-30 10:45:45 +08:00
Xubin Ren
ba0ba4749d feat(webui): add skills marketplace 2026-07-30 01:13:37 +08:00
chengyongru
757ad9c764
refactor: enforce BasedPyright strict type checking (#5158) 2026-07-29 21:37:11 +08:00
chengyongru
e703481755
fix(memory): expose media references to session consolidation (#5157)
Co-authored-by: shakewingo <yaoyingshakewin@gmail.com>
Co-authored-by: bingqilinweimaotai <111987281+bingqilinweimaotai@users.noreply.github.com>
2026-07-29 15:18:44 +08:00
chengyongru
393d429e0a
fix(ci): stabilize and speed up CI (#5145) 2026-07-28 22:55:59 +08:00
chengyongru
0c6c0438d4
feat(config): add actionable startup diagnostics and WebUI recovery (#5110) 2026-07-28 18:52:05 +08:00
chengyongru
ae089aa3ae fix(webui): reconcile threads after browser resume 2026-07-28 16:25:08 +08:00
chengyongru
78cf68c291 fix(agent): snapshot active tasks before cancellation 2026-07-28 15:42:52 +08:00
chengyongru
fd17c1352a fix(sdk): harden host integration contracts 2026-07-28 15:30:28 +08:00
chengyongru
c050955ae3 feat(sdk): add host integration extension points 2026-07-28 15:30:28 +08:00
chengyongru
12f828ea3d
fix(agent): read document attachments on demand (#5122) 2026-07-28 13:33:06 +08:00
chengyongru
ef9e687f19
refactor(core): remove redundant runtime scaffolding (#5127) 2026-07-28 11:07:58 +08:00
chengyongru
f78ad59ed0
fix(memory): preserve Dream input integrity (#5114) 2026-07-27 21:37:13 +08:00
yu-xin-c
7fd28c9f06 fix(memory): preserve unprocessed dream history 2026-07-27 15:47:21 +08:00
chengyongru
c13df29457
feat(memory): restore Dream model preset override (#5107) 2026-07-27 14:43:25 +08:00
chengyongru
281b4b7f0b
chore: remove expired v0.3.1 compatibility shims (#5106) 2026-07-27 13:53:04 +08:00
chengyongru
39348dfafe refactor(agent): remove dead lifecycle scaffolding 2026-07-27 12:00:06 +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
chengyongru
2a1f840ce2 fix(cli): support Codex OAuth in quick start 2026-07-27 02:51:04 +08:00
Xubin Ren
68717937e8 fix(agent): throttle idle scans by default 2026-07-27 02:15:48 +08:00
Andrew Khmylov
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
b55b76d755 fix(streaming): preserve recovered segments across channels 2026-07-27 01:39:46 +08:00
chengyongru
e6baecafcd fix(agent): close length recovery lifecycle gaps 2026-07-27 01:39:46 +08:00
chengyongru
27a00c7a4f fix(webui): merge length recovery stream segments 2026-07-27 01:39:46 +08:00
chengyongru
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
chengyongru
b19039f9d0 fix(agent): preserve length-recovered output 2026-07-27 01:39:46 +08:00
Xubin Ren
5d8046deef test(heartbeat): cover ignored unified routes 2026-07-27 00:12:44 +08:00
yu-xin-c
a7a6c26eab fix(heartbeat): route unified sessions to last channel 2026-07-27 00:12:44 +08:00
Xubin Ren
ff379b91cf fix(agent): preserve merged runtime context markers 2026-07-26 23:46:54 +08:00
yu-xin-c
eb93060f95 fix(agent): preserve pending runtime context 2026-07-26 23:46:54 +08:00
santhreal
745757cc37 fix(memory): skip non-dict history.jsonl lines when reading 2026-07-26 17:45:51 +08:00
santhreal
259d8a018c fix(skills): tolerate null requires/bins/env in skill metadata 2026-07-26 17:44:41 +08:00
Xubin Ren
e260d9b31c fix(agent): apply execution policy to existing workspaces 2026-07-24 19:25:52 +08:00