qwen-code/packages/cli
qqqys 4aa7d1ec0b
feat(cli): adopt Goal v3 in interactive TUI (#8005)
* feat(cli): adopt Goal v3 in interactive TUI

* fix(cli): restore Goal CI contracts

* fix(cli): stop a queued message from stalling the Goal loop (#8005)

Reserve the next Goal turn only for a user batch the queue will actually
release: peekNextUserBatchKey now mirrors the two-lane drain gate, so an
active Goal turn no longer binds a permit to a held plain message and the
loop keeps running.

Also release the Goal turn binding on the background-capacity early
return, drop a redundant getSteerInput spread, recognise the legacy
/goal clear aliases in interactive mode, and restore the rollback
assertion for loadPausedBackgroundAgents.

* fix(cli): address review feedback on Goal queue and retry hint (#8005)

* fix(cli): restore Goal trust gate and address review feedback (#8005)

* fix(cli): address Goal review feedback on cancel release, icons, claim gate (#8005)

* fix(cli): address Goal review feedback on non-interactive guard, icons, and drain retry (#8005)

* fix(cli): address review feedback on Goal v3 TUI (#8005)

- Strip 'set' keyword before forwarding to legacy path in non-interactive
  /goal set, preventing the keyword from leaking into the goal condition
- Add goalTerminalErrorRef to prevent post-stream cleanup from wiping
  Goal turn terminal errors
- Add 50-turn continuation budget to Goal runtime, matching the legacy
  MAX_GOAL_ITERATIONS cap
- Display verifier rejection status cards (verifier_reject cause)
- Clear stale lastReason when editing a goal objective

* fix(test): align client-goal turn count with continuation budget (#8005)

* fix(cli): address Goal set-clear and delivery-error review feedback (#8005)

Non-interactive `/goal set <clear-keyword>` now sets a literal objective
instead of clearing the active goal, by bypassing the clear-keyword check
for explicit set operations. Goal-turn stream errors now fire
onDeliveryFailed rather than onDelivered by including goalTerminalErrorRef
in the post-stream delivery dispatch.

* fix(cli): rename misleading missingActiveGoalContext variable (#8005)

* fix(cli): stop Goal queue from stranding input and orphaning prompts (#8005)

Only an active Goal turn holds ordinary input now; paused, blocked and
usage_limited states drain the queue normally so a user whose Goal is
merely paused (e.g. via Escape) is never stranded waiting for /goal clear.

A cancelled Goal continuation turn also strips its synthetic "no new real
user input" prompt from the chat history. Previously the auto-restore
branch bailed before its orphan strip ran (Goal turns add no UI user
item), so the preamble survived and appendCuratedContent merged the user's
next real message into it.

* fix(core): address Goal resume-budget and mid-turn clear review feedback (#8005)

Resuming a Goal that exhausted its 50-turn continuation budget was
accepted and reported as `active`, then immediately re-transitioned to
`usage_limited` without running a turn: the resume branch kept the
exhausted `turnCount`, which `queueContinuation` re-checks. Resume now
resets `turnCount` so an explicit resume grants a fresh continuation
budget and the reported outcome matches the settled one.

A mid-turn `/goal clear` with no active Goal was silently swallowed
because its causeless `goal_control` result rendered only when idle. The
handler now renders any causeless result (a `status` read or a no-Goal
`clear`), which never broadcasts and so cannot double-render.

* test(cli): cover Goal tool-batch fail-close guards (#8005)

* fix(core,cli): guard budget-exhaustion identity and pass goalContext to tool-result recording (#8005)

The budget-exhaustion callback in queueContinuation only checked
goal status, not identity. A replace dispatched during the journal
append could create a fresh goal that the stale callback then
incorrectly usage-limited. Capture goalId/revision at enqueue time
and return early on mismatch, matching the existing identity-guard
pattern used by handleStartFailure and recordVerificationOutcome.

The TUI recorded tool results without goalContext, so the evidence
catalog never admitted tool-result records and any Goal whose
objective depended on external state could not be verified. Pass
request.goalContext at both recordToolResult call sites in
useGeminiStream, tagging get_goal/update_goal results as
goal_runtime to match the CoreToolScheduler pattern.

---------

Co-authored-by: qwen-code-dev-bot <269191875+qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: Qwen Code Bot <qwen-code-bot@users.noreply.github.com>
Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot@users.noreply.github.com>
2026-08-01 11:21:53 +00:00
..
src feat(cli): adopt Goal v3 in interactive TUI (#8005) 2026-08-01 11:21:53 +00:00
.gitignore feat(core): add opt-in built-in web_search backed by the DashScope Responses API (#7215) 2026-07-21 10:59:36 +00:00
index.ts fix(cli): add bootstrap fast paths (#6188) 2026-07-02 22:28:11 +00:00
package.json fix(external-context): harden MCP dependencies (#8206) 2026-08-01 01:04:16 +00:00
test-setup.ts feat(serve): persist dynamic workspace registrations (#6716) 2026-07-11 16:49:40 +00:00
tsconfig.json feat(channels): add GitLab polling channel adapter (#7862) 2026-07-29 14:28:31 +00:00
vitest.config.ts fix(serve): isolate managed memory by selected workspace (#8056) 2026-07-31 15:06:38 +00:00