Commit Graph
701 Commits
Author SHA1 Message Date
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 756f6a6fe5 refactor(agent): deduplicate model request preparation 2026-10-18 00:26:19 +08:00
faf1efaf09 fix(consolidation): trigger compaction from reported usage, not just tiktoken estimates (#6260)
Co-authored-by: Muzhen2000 <254800372+Muzhen2000@users.noreply.github.com>
Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-10-17 02:47:42 +08:00
chengyongru 8f6a5594fb refactor(session): centralize state ownership in SQLite (#5943)
* fix(session): move persistence off event loop

* refactor(session): isolate async persistence boundary

* refactor(session): keep a single session manager

* refactor(session): use stateless async adapters

* fix(session): serialize local persistence without file-lock contention

* refactor(session): own async persistence and snapshot commits

* refactor(session): narrow persistence changes to async adapters

* refactor(session): remove redundant async forwarding helpers

* fix(command): offload compact session persistence

* fix(session): adapt idle compaction to current main

* fix(webui): offload session metadata persistence

* refactor(session): centralize state ownership in SQLite

* fix(session): skip storage for non-recoverable followups

* test(webui): honor the full gateway event deadline

* perf(session): persist incremental changes and reuse owner snapshots

* test(agent): allow durable worker shutdown in burst test

* fix(gateway): drain session storage on Windows console shutdown

* fix(session): enforce bounded ownership and lifecycle-safe persistence

* fix: reject unresolved home paths and stabilize platform tests

* fix(session): preserve request context compatibility and owner-backed tests

* docs: focus configuration guide on user-facing behavior

* fix(session): adapt goal admission to async ownership after rebase

* fix(session): integrate current gateway and subagent contracts

* fix(session): align rebased workspace admission and async tests

* fix(session): support compatible SQLite schema evolution

* test(agent): use session owner in workspace context regressions

* test: stabilize Windows lifecycle and browser checks

* refactor(session): remove premature JSONL file export

* ci: bound Windows full-suite worker concurrency

* chore: remove session state refactor notes

* fix(session): queue writes and retain worker connections

* perf(webui): read detached metadata for session and task lists

* perf(agent): bound prompt preparation and local token counting

* docs: remove internal session storage guide

* perf(session): skip archived transcripts during idle scans

* fix(session): coordinate turns and isolate legacy session data

Bind WebUI input generations to the execution session and serialize idle
and SDK compaction with turns. Keep turn drafts through preparation so the
latest channel route persists.

Move imported workspace JSONL and checkpoints to durable private backups
before gateway admission, resuming cleanup after interruptions. Remove
committed child sessions when task creation is cancelled.

Validation: focused Python and frontend regressions, Ruff, BasedPyright,
import boundaries, WebUI build, and isolated gateway/browser flows.

* fix(agent): keep cancellation hooks independent of prompt preparation

* fix(session): preserve admission, delivery, and migration contracts

* fix(agent): preserve cancellation settlement after rebase

* fix(session): preserve request attribution through async ownership
2026-10-16 17:28:47 +08:00
chengyongru 33ff520d12 fix: preserve subtask request attribution after restart (#6247)
* fix: preserve request origin across recovery continuations

* fix: bind request origin to each continuation

* fix: capture origin when queuing continuation messages

* chore: remove redundant request context comment

* fix: persist origin for independent system turns
2026-10-16 16:46:39 +08:00
chengyongru f101a24571 refactor(cli): use Questionary for onboarding selection (#6251)
* fix(cli): require compatible terminal prompt dependencies

Require prompt-toolkit 3.0.52 for Windows VT100 input flushing and Questionary 2.1.1 for compatibility with its prompt layout. Keep the existing major-version bounds and Python minimum.

* refactor(cli): use Questionary for onboarding selection

Delegate menu navigation, selection and scrolling to questionary.select. Retain the existing back/cancel contract, palette and position feedback through a thin adapter and exercise real prompt keyboard behavior instead of viewport arithmetic.
2026-10-16 15:34:49 +08:00
chengyongru e4fc8788c4 refactor(providers): remove duplicate chat response parsers 2026-10-16 15:05:56 +08:00
chengyongru 3abcfe70c5 perf(agent): prepare prompts outside the event loop (#6224)
* perf(agent): prepare prompts outside the event loop

* fix(agent): preserve cancellation during run cleanup

* refactor(agent): clarify prompt preparation boundaries

* revert(agent): restore original prompt preparation structure

This reverts commit 484cb96a08bf3a805f5828d5a65316be7decaaa5.
2026-10-16 13:16:13 +08:00
chengyongru 12e869d047 refactor(skills): shorten built-in skill descriptions 2026-10-16 00:15:55 +08:00
chengyongru 32f5cc76a4 fix(agent): trim redundant system prompt context 2026-10-16 00:01:24 +08:00
chengyongru 841d2b880c fix(agent): make tool error guidance neutral (#6227)
* fix(agent): make tool error guidance neutral

* refactor(tools): share tool error guidance
2026-10-15 16:58:39 +08:00
chengyongru c58bfa71bc perf(agent): skip transcript snapshots without run hooks 2026-10-15 10:48:59 +08:00
chengyongru 2ad0da786d fix(session): serialize compaction with active turns 2026-10-15 10:43:02 +08:00
chengyongru af6abde2f4 fix(skills): bind plugin snapshots to approved content (#6225)
* fix(skills): bind plugin snapshots to approved content

* fix(skills): preserve plugin document newline normalization
2026-10-15 09:41:37 +08:00
chengyongru 3a28b9e6ce perf(agent): reuse skill discovery within each prompt 2026-10-15 01:47:06 +08:00
chengyongru 4497f7ef24 refactor: remove unused internal code and styles 2026-10-14 10:50:16 +08:00
chengyongru 6b90e400e4 refactor(tools): streamline built-in tool descriptions (#6201)
* refactor(tools): streamline built-in tool descriptions

* refactor(tools): retain actionable schema details
2026-10-14 10:34:07 +08:00
chengyongru 328e933d36 refactor: isolate runtime contracts and enforce import boundaries (#6166)
* test: enforce Python import ownership boundaries

* test: protect client import boundaries and rehome shared UI contracts

* refactor: remove gateway and client dependency inversions

* fix: detect dynamic imports in conditional expressions

* refactor(tools): keep configuration contracts with their owners

* docs: keep design guidance focused on ownership and checks

* fix: preserve default threaded turn delivery
2026-10-13 13:56:28 +08:00
chengyongru cd2a863710 feat(skills): explain nanobot usage from bundled documentation (#6176)
* feat(skills): add nanobot documentation guide with bundled docs

* docs: prefer graphical setup and align bundled guides with runtime

* docs: lead provider setup with built-in endpoint defaults

* fix: preserve documentation packaging and lookup across install paths

* fix(skills): narrow documentation loading to relevant sections

* refactor(skills): keep documentation guidance concise

* fix(docs): complete first-use workflows and clarify runtime boundaries

* style(docs): remove manual paragraph wrapping

* docs: guide first-run users to conversational setup help

* docs: fold README installation alternatives and details

* docs: separate README alert marker from its body

* docs: clarify README onboarding and runtime boundaries
2026-10-13 00:44:25 +08:00
Xubin Renandchengyongru 23941355a8 feat(images): reuse named connections and image request settings
Preserve the reviewed tree while removing obsolete stacked branch history.

Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-10-12 21:22:35 +08:00
chengyongru 105b772203 refactor(agent): compose image tools in application runtimes (#6172)
* refactor(agent): move image configuration ownership into tools

* refactor(agent): compose image tools in application runtimes
2026-10-12 17:42:45 +08:00
Xubin Ren a27f294f52 perf(agent): trim workspace access context without changing scope 2026-10-11 17:06:39 +08:00
Xubin Ren da02daaa1d test(agent): guard workspace context prompt prefixes 2026-10-11 17:06:39 +08:00
Xubin Ren 1d69f630d7 fix(agent): provide current workspace access before model requests 2026-10-11 17:06:39 +08:00
Xubin Ren d7d4b97df3 test(my): handle escaped Windows paths in inspection output 2026-10-11 17:06:39 +08:00
Xubin Ren e79a0099f6 fix(my): report current workspace access in self-inspection 2026-10-11 17:06:39 +08:00
chengyongru f04ed1c2eb test: align test names with current assertions (#6130)
* test: align test names with current assertions

* test: align suite names and explicit configuration cases
2026-10-10 11:49:32 +08:00
chengyongru 98f89c6a43 docs: refresh stale runtime comments and docstrings (#6129)
* docs: refresh stale runtime comments and docstrings

* docs: correct remaining delivery and recovery descriptions
2026-10-10 11:05:55 +08:00
chengyongru fe4933d073 test(providers): verify fallback reasoning without signature offsets 2026-10-10 01:33:02 +08:00
chengyongru 994ce51502 feat(models): declare provider APIs and simplify preset configuration 2026-10-10 01:33:02 +08:00
Xubin Ren 7e00d6a944 fix(commands): keep slash-prefixed paths in normal chat 2026-10-09 12:28:32 +08:00
chengyongru 29f27dcf5d ci: reduce test runtime while preserving coverage (#6101)
* ci: reduce test runtime while preserving coverage

* test: close cached usage stores before temporary directory cleanup
2026-10-08 13:03:56 +08:00
chengyongru 5be1e589f2 feat(providers): share Responses backend with Codex WebSocket continuation (#6096)
* feat(codex): continue sessions over Responses WebSocket

* fix(codex): retain API errors with repeated handshake headers

* test(codex): assert attachment paths before JSON escaping

* refactor(providers): share Responses transport and state backend

* fix(grok): update subscription client version

* docs: keep Codex configuration focused on user settings
2026-10-08 11:54:23 +08:00
Xubin Ren 052ad09983 fix(automations): clarify chat review and scheduling choices 2026-10-07 01:12:23 +08:00
chengyongru 42f06ab1dc test: isolate Star invitation state and stabilize late-result waits (#6076)
* test: isolate Star invitation state and relax late-result deadline

* test: keep invitation fixtures outside test workspaces
2026-10-06 02:49:50 +08:00
chengyongru 6ff96f2a8f feat(subagent): add session-owned task messaging and cancellation (#5985)
let's go!
2026-10-05 05:16:33 +08:00
Shuhan Si 9136fe364e fix(runtime): preserve case in web fetch throttle keys 2026-10-03 20:21:09 +08:00
Shuhan Si e2cd6908c7 fix(evaluator): reject non-boolean notification decisions 2026-10-03 19:10:44 +08:00
chengyongru 4904305450 refactor(session): decouple history tools from WebUI replay (#6017)
* refactor(session): decouple history tools from WebUI replay

* test(oauth): make callback expiry independent of thread scheduling
2026-10-03 17:43:55 +08:00
Kail Tian 5825e15a6f fix(agent): clear stale failure state when resuming runner iterations 2026-10-03 01:01:30 +08:00
Kail Tian f2737ae813 fix(agent): preserve explicitly empty tool registries 2026-10-02 23:52:09 +08:00
chengyongru 6ecb74aea9 refactor: remove unused runtime and WebUI helpers (#5999)
* refactor: remove unused runtime and WebUI helpers

* fix: preserve exported agent helper methods
2026-10-02 01:41:05 +08:00
Arthur K. 0b402d0414 fix: stop sending context compaction notifications 2026-09-30 13:44:42 +08:00
chengyongru 99ba062a97 fix(tui): accept goal requests during active turns (#5981)
* fix(tui): accept goal requests during active turns

* fix(goal): reuse live input routing and remove busy guards

* test(goal): cover followup streams across iteration budgets

* refactor(goal): expand slash commands into hidden agent input

* fix(goal): keep generated input permission scoped to users

* refactor(agent): encapsulate goal input permission scope

* refactor(goal): preserve task text without prompt wrapper

* test(goal): consolidate coverage and exercise restart recovery

* test(goal): wait for recovery reply without task registry race
2026-09-30 13:08:13 +08:00
Carmelo Campos 663ba82f00 fix(providers): honor configured fallbacks on "insufficient credits"
An OpenAI-compatible gateway can report exhausted credits as HTTP 400 with
the message "You have insufficient credits to make this request". The
arrearage marker lists cover "insufficient_quota", "insufficient balance"
and "out of credits", but not "insufficient credits", so
is_arrearage_response() returned False and _should_fallback() fell through
to its blanket HTTP-400 short-circuit. Configured fallbackModels were then
silently skipped and the raw provider error was returned to the user.

Add the missing phrasing to both the text-marker tuple and the structured
token frozenset. Arrearage detection already runs first inside
_should_fallback(), so recognizing the phrasing is enough to restore
failover; a plain malformed-request 400 keeps its existing non-fallback
behavior.

Refs #5967
2026-09-30 09:55:31 +08:00
chengyongru 66f5f2df15 fix(my): scope subagent snapshots to the current session (#5976)
* fix(my): scope subagent snapshots to the current session

* test(my): reuse runtime fixture in session isolation checks
2026-09-29 17:44:37 +08:00
chengyongru b7abbcd70b fix(agent): require subagent consolidator at construction 2026-09-29 15:28:05 +08:00
Kail Tian 4f7479ca64 fix(web): propagate web_fetch failures as structured tool errors 2026-09-28 15:44:56 +08:00
chengyongru 5294dc2e3f fix(webui): restore Codex title generation and diagnose API failures (#5952)
* fix(webui): restore Codex title generation and diagnose API failures

* refactor(logging): keep title diagnostics out of provider contracts

* fix(webui): defer title reasoning to model defaults

* refactor(webui): inline default title reasoning argument
2026-09-28 14:50:21 +08:00
chengyongru 4a7ad00e4f fix(tokens): warm fallback tokenizer in background (#5861)
* fix(tokens): keep fallback token estimation offline

* fix(tokens): warm fallback tokenizer in background

* test(tokens): isolate agent fixtures from tokenizer readiness

* test(tokens): keep Codex pressure fixtures within byte budget

* docs: remove manual wrapping from troubleshooting prose
2026-09-28 13:50:55 +08:00