qwen-code/packages/cli/src
qqqys ca61d7827e
feat(channels): add identity and task lifecycle metadata (#6105)
* chore: ignore local worktrees

* docs(channels): design identity and task lifecycle p0

* docs(channels): plan identity and task lifecycle p0

* feat(channels): add identity and task lifecycle metadata

* fix(channels): suppress cancelled tool call lifecycle

* fix(channels): cover loop lifecycle metadata

* fix(channels): harden lifecycle event edges

* fix(channels): finalize cancelled lifecycle before cleanup

* fix(channels): address lifecycle review suggestions

* fix(channels): close lifecycle cancellation races

* fix(channels): separate pending cancel state

* fix(channels): order clear cancellation lifecycle

* fix(channels): suppress loop chunks during pending cancel

* test(channels): use active session in cancel regression

* fix(channels): sanitize lifecycle tool fields

* fix(channels): route shared tool call lifecycle

* fix(channels): preserve pending cancel intent

* fix(channels): preserve responses after failed cancel

* fix(channels): tighten lifecycle cancellation reasons

* fix(channels): close lifecycle cancel races and validate identity config

Address the outstanding review findings on #6105:

- carry a typed reason on ChannelLoopSkippedError and report disabled
  loops as 'dropped' instead of 'timeout'
- treat a turn as committed once delivery starts: /cancel re-checks
  deliveryStarted after the cancel RPC settles, and neither prompt path
  lets a late-settling cancel rewrite a delivered turn into cancelled
  (or follow a /clear cancellation with completed)
- tag failed lifecycle events with phase: agent vs delivery
- validate identity/memoryScope shape at config parse time instead of
  throwing an opaque TypeError on the first prompt of every session
- guard onPromptStart hooks, pass job.id to loop onPromptStart/End,
  append the boundary block after operator instructions, gate
  /who + /status identity lines on configured identity/memoryScope,
  cache the boundary prompt, and route error logs through
  lifecycleError()

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(channels): keep failed terminal event when cancel settles post-delivery

Self-review follow-up: once delivery started, the catch paths no longer
reconcile a pending cancel — a late-resolving cancel RPC used to flip
cancelled=true there, suppressing the failed emit while the /cancel
handler (seeing deliveryStarted) also declined to emit, leaving a
started task with no terminal lifecycle event at all.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(channels): hold streamed chunks while a cancel is pending

Chunks arriving while a /cancel RPC is in flight were pushed straight
into the BlockStreamer, which can send a block on a size/paragraph
threshold before the cancel resolves — leaking output a successful
cancel can never recall. Hold the pending-window chunks instead: replay
them (block streaming + text_chunk transcript) when the cancel fails,
discard them when it succeeds. onResponseChunk stays live through the
window so adapter-accumulated display state has no permanent hole on a
failed cancel; adapters gate visible updates on their own stop flags.

Also stop passing the loop job id to onPromptStart/onPromptEnd (and the
/clear eviction path): the hook contract is inbound platform message
ids, and adapters act on them — cards and reactions keyed to a fake id.
Lifecycle events still carry job.id for correlation.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(channels): defer adapter chunks while cancel is pending

---------

Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-07-02 09:04:07 +00:00
..
acp-integration fix(cli): avoid blocking ACP sessions on MCP readiness (#6161) 2026-07-02 13:52:17 +08:00
commands feat(channels): add identity and task lifecycle metadata (#6105) 2026-07-02 09:04:07 +00:00
config fix(release): reduce npm package scan triggers (#6164) 2026-07-02 08:06:43 +00:00
core revert(core): revert Protocol enum & model-identity decoupling (#5089) (#5745) 2026-06-23 16:32:38 +08:00
dualOutput fix(dual-output): prevent FIFO blocking on startup when no reader connected (#4894) 2026-06-15 06:04:06 +08:00
export feat(vscode-companion): support /export session command (#2592) 2026-04-24 17:55:26 +08:00
i18n feat(core): Add leader approval for plan-required teammates (#6138) 2026-07-01 23:34:18 +00:00
nonInteractive feat(core,cli,sdk): resume an interrupted turn without a synthetic "continue" message (#5030) 2026-06-28 13:24:06 +00:00
patches
remoteInput fix(cli): handle truncated remote input files (#5473) 2026-06-21 06:39:03 +08:00
serve fix(release): reduce npm package scan triggers (#6164) 2026-07-02 08:06:43 +00:00
services feat(core,cli): unified reasoning effort with /effort command (#6072) 2026-07-01 20:20:28 +00:00
startup fix(core): handle stale worktree session markers (#5229) 2026-06-19 03:43:39 +08:00
test-utils feat(cli): Add skill usage stats (#5826) 2026-06-25 00:10:55 +00:00
ui feat(core,cli): unified reasoning effort with /effort command (#6072) 2026-07-01 20:20:28 +00:00
utils feat(core,cli): unified reasoning effort with /effort command (#6072) 2026-07-01 20:20:28 +00:00
gemini.test.tsx feat(cli): add --safe-mode flag to disable all customizations for troubleshooting (#4943) 2026-06-29 12:29:48 +00:00
gemini.tsx feat(cli): add --safe-mode flag to disable all customizations for troubleshooting (#4943) 2026-06-29 12:29:48 +00:00
nonInteractiveCli.test.ts feat(loop): add autonomous mode for a bare /loop (#5991) 2026-06-30 10:29:18 +00:00
nonInteractiveCli.ts feat(cli): support inline one-shot model override in /model (#5967) (#6022) 2026-06-30 22:45:31 +00:00
nonInteractiveCliCommands.test.ts feat(cli): support inline one-shot model override in /model (#5967) (#6022) 2026-06-30 22:45:31 +00:00
nonInteractiveCliCommands.ts feat(cli): support inline one-shot model override in /model (#5967) (#6022) 2026-06-30 22:45:31 +00:00
validateNonInterActiveAuth.test.ts feat(auth): discontinue Qwen OAuth free tier (2026-04-15 cutoff) (#3291) 2026-04-15 22:30:20 +08:00
validateNonInterActiveAuth.ts