Commit graph

209 commits

Author SHA1 Message Date
tanzhenxin
dc833d9d94 feat: add bugfix workflow, test-engineer agent, and debugging skills
- Add test-engineer agent for bug reproduction and verification
- Add /qc:bugfix command for structured bugfix workflow
- Add e2e-testing skill covering headless/interactive modes, MCP testing
- Add structured-debugging skill for hypothesis-driven debugging
- Simplify AGENTS.md to focus on essential commands and conventions
- Add terminal-capture scenario for bugfix workflow testing
- Add .qwen folder to ESLint ignore list

Known limitations: The /qc:bugfix workflow and e2e-testing skill
are experimental and may be unstable or consume significant tokens.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-04 18:30:09 +08:00
tanzhenxin
7e490ddc65 test(integration): skip cron interactive tests in sandbox environment
- Add IS_SANDBOX environment detection
- Skip cron interactive tests when running in Docker sandbox
- Move timeout options inline with test definitions
- Add comment explaining flaky test workaround

This prevents flaky test failures in the Docker sandbox environment while preserving test coverage in local development.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-01 19:51:49 +08:00
tanzhenxin
e03144ed34 fix: resolve punycode to userland package and skip env var test in sandbox
- Resolve punycode to userland package instead of deprecated node:punycode
  built-in to avoid deprecation warnings
- Skip cron-tools env var test in sandbox mode since Docker containers
  don't receive environment variables set in the test process

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-01 18:58:19 +08:00
tanzhenxin
b2f04418fa
Merge pull request #2628 from QwenLM/feat/channels-telegram
feat(channels): add extensible Channels platform with plugin system and Telegram/WeChat/DingTalk channels
2026-04-01 16:19:08 +08:00
tanzhenxin
76d64c9464
Merge pull request #2731 from QwenLM/feat/in-session-cron-loops
feat(cron): add in-session loop scheduling with cron tools
2026-04-01 16:18:46 +08:00
tanzhenxin
63f1963377
Merge pull request #2698 from QwenLM/refactor/subagent-model-selection
feat: add cross-provider model selection for subagents
2026-04-01 16:17:54 +08:00
tanzhenxin
f70cc05bbc
Merge pull request #2777 from QwenLM/fix/pty-fd-leak-upgrade-node-pty
fix: upgrade @lydell/node-pty to 1.2.0-beta.10 to fix PTY FD leak on macOS
2026-04-01 15:38:13 +08:00
DennisYu07
5221002831 remove hooks experimental and refactor hook Config 2026-04-01 11:50:23 +08:00
tanzhenxin
89b79544d1 fix: upgrade @lydell/node-pty to 1.2.0-beta.10 to fix PTY FD leak
The previous version (1.1.0) has a native-level bug on macOS where each
PTY spawn leaks one /dev/ptmx file descriptor that is never closed. Over
a long session with hundreds of shell commands, this exhausts the
system-wide PTY pool (kern.tty.ptmx_max = 511), breaking other programs
like tmux and new terminal windows.

Root cause: microsoft/node-pty#882

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-01 07:55:56 +08:00
tanzhenxin
7962d4f790 Merge remote-tracking branch 'origin/main' into feat/channels-telegram 2026-03-30 19:17:22 +08:00
tanzhenxin
1af0ef9a7c Merge remote-tracking branch 'origin/main' into feat/in-session-cron-loops 2026-03-30 19:08:25 +08:00
DennisYu07
f0f5ee0bda fix integration test 2026-03-30 18:41:48 +08:00
tanzhenxin
9dd22eb152 feat(cron): integrate cron scheduling into ACP session lifecycle
- Add cron queue and scheduler state management to Session class
- Handle cron cancellation on user prompt and cancelPendingPrompt
- Start cron scheduler after prompt execution completes
- Drain cron queue sequentially to prevent concurrent chat access
- Execute cron prompts with proper message echoing and tool handling
- Add integration test for cron firing and sessionUpdate streaming

This enables cron jobs created during an ACP session to fire in the
background and stream results back to the client via sessionUpdate
notifications, even after the originating prompt has returned.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-30 18:06:09 +08:00
tanzhenxin
314a9ded78 refactor(tests): replace Playwright with @xterm/headless in cron tests
Use @xterm/headless (pure Node.js terminal emulator) instead of
Playwright + browser-based xterm.js for cron interactive tests.
Add InteractiveSession utility for future interactive tests.
2026-03-29 06:15:31 +00:00
tanzhenxin
ded89618ec refactor(tests): reorganize integration tests by execution mode
Move non-interactive tests to cli/, interactive tests to interactive/.
Add cron-interactive.test.ts wrapping terminal-capture E2E in vitest.
Update npm scripts and release workflow for new directory layout.
2026-03-29 05:49:17 +00:00
tanzhenxin
707b06ca48 fix(cron): replace "Claude" with "Qwen Code" in tool messages
Also adds terminal capture test scenario for cron-loop feature.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-29 13:17:52 +08:00
tanzhenxin
a3623fd819 feat(cron): add interactive E2E tests and fix cron trigger reactivity
- Add getScreenText() to TerminalCapture for reading rendered xterm.js screen
- Add E2E tests for in-session cron: inline firing, user priority, error resilience
- Fix cron prompts not processing by adding cronTrigger state dependency

This ensures cron-injected prompts are processed immediately when fired,
not just when streaming state changes, and provides comprehensive test
coverage for the in-session cron feature.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-29 04:22:28 +00:00
tanzhenxin
57cf2b0bf2 refactor(cron): rename cron_expression param to cron and enhance documentation
- Rename cron_expression parameter to cron for brevity across CronCreateTool
- Expand tool description with comprehensive usage guidance for one-shot and recurring tasks
- Add best practices for avoiding :00/:30 minute marks to reduce API load spikes
- Document 3-day auto-expiration for recurring jobs and session-only lifetime
- Add additionalProperties: false to all cron tool schemas for stricter validation
- Update integration tests and loop SKILL to use renamed parameter

This improves the developer experience with clearer parameter names and provides users with detailed guidance on scheduling patterns and runtime behavior.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-29 11:05:37 +08:00
tanzhenxin
439a1a46e2 feat(cron): make cron tools opt-in via experimental settings
Change cron/loop tools from opt-out to opt-in. Cron tools are now
disabled by default and can be enabled via:
- settings.json: { "experimental": { "cron": true } }
- Environment variable: QWEN_CODE_ENABLE_CRON=1

This ensures experimental features are explicitly enabled by users
who want to try them.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-29 02:25:28 +00:00
tanzhenxin
99e5a9fbfd test(integration): add cron tools integration tests
- Test cron_create, cron_list, cron_delete tool registration
- Test create-list-delete workflow in single turn
- Test one-shot (non-recurring) job creation

This validates the cron scheduler tool functionality end-to-end.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-29 01:15:14 +00:00
mingholy.lmh
4219101397 test(sdk): improve permission message pattern matching
Support both 'declined' and 'denied' variants for permission denied messages in tool control tests.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 16:36:06 +08:00
tanzhenxin
811ccdd02d Merge remote-tracking branch 'origin/main' into feat/channels-telegram 2026-03-27 08:21:41 +00:00
tanzhenxin
ad20049a4e Merge remote-tracking branch 'origin/main' into refactor/subagent-model-selection 2026-03-27 11:56:29 +08:00
tanzhenxin
5d58b2f112 feat: simplify subagent model configuration with model selector
Refactor subagent model configuration from nested modelConfig object to a simple model string field for better UX and clarity.

Changes:
- Replace modelConfig object with model string in SubagentConfig interface
- Add model-selection.ts utility for parsing and validating model selectors
- Support 'inherit' keyword and bare model IDs (e.g., 'glm-5', 'claude-sonnet-4-6')
- Maintain backward compatibility by parsing legacy modelConfig frontmatter
- Update validation to reject cross-provider authType-prefixed selectors
- Update SDK types (TypeScript and Java) to reflect new schema
- Add comprehensive tests for model selection and validation
- Update documentation with model selection examples

Breaking changes:
- modelConfig.frontmatter field deprecated in favor of model field
- Cross-provider model selectors (e.g., 'openai:gpt-4') not supported for subagents

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 11:49:45 +08:00
tanzhenxin
987eebd1c4 docs(channels): add plugin developer guide and rename mock to plugin-example
- Add comprehensive developer guide for building channel plugins
- Add user-facing docs for installing/configuring custom channel plugins
- Replace custom-channels.md with new plugins.md
- Rename @qwen-code/channel-mock to @qwen-code/channel-plugin-example
- Add messageId field to Envelope type for response correlation

This provides clear documentation for developers building custom channel
adapters and renames the mock package to better reflect its purpose as
a reference implementation example.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 03:19:34 +00:00
tanzhenxin
0f9e4409df feat(channels): add mock channel package for E2E testing
- Add @qwen-code/channel-mock package with MockPluginChannel
- Add createMockServer for programmatic test control via WebSocket
- Refactor integration test to use real WebSocket E2E flow

This enables testing the full channel pipeline (WebSocket → ChannelBase → AcpBridge → agent)
instead of the previous in-process loopback approach.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-26 14:30:33 +00:00
tanzhenxin
2b10a2dc54 test(channels): add loopback channel integration test
- Uses in-process LoopbackChannel instead of 3-process mock architecture
- Tests real agent responses through full channel pipeline
- Verifies session state persistence across messages
- Validates per-sender session routing

This provides lightweight integration testing for the channel plugin
system without external dependencies.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-26 14:15:56 +00:00
Mingholy
27bb18455f
Merge pull request #2644 from QwenLM/fix-sdk-e2e
test(sdk): improve tool control docs and add pattern matching tests
2026-03-26 21:43:09 +08:00
Mingholy
849a7327eb
Potential fix for code scanning alert no. 110: Replacement of a substring with itself
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-03-26 21:41:10 +08:00
mingholy.lmh
3edbf561e6 test(sdk): remove debug executable path 2026-03-26 21:14:35 +08:00
mingholy.lmh
9db176a07b test(sdk): improve abort test reliability with partial message handling
- Use includePartialMessages and isSDKPartialAssistantMessage for more reliable abort triggering
- Remove flaky tool name assertions that could fail when tools aren't registered (issue #2653)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-26 21:02:30 +08:00
Mingholy
00447356ad
Merge pull request #2602 from QwenLM/feat/hooks-refactor-hooks-ui
feat(hooks ui): refactor ui for Qwen Code hooks
2026-03-26 20:11:50 +08:00
mingholy.lmh
6aab02f13f test(sdk): add tool control pattern matching tests
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-24 22:31:59 +08:00
mingholy.lmh
0da574d800 test: simplify tool control test by removing redundant tool restrictions
Remove excludeTools and allowedTools configurations from the test
as coreTools is sufficient for limiting available tools. Update
canUseTool expectation to verify write_file is properly called.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-23 19:30:03 +08:00
DennisYu07
b08154dbee refactor ui for qwen code hooks 2026-03-23 11:24:59 +08:00
yiliang114
905f2c3f36 Merge branch 'main' into fix/pr2371-btw-complete 2026-03-21 01:10:48 +08:00
yiliang114
dff9822f9b fix(cli): improve /btw overlay UX — layout, dismiss hints, and history cleanup
- Make /btw overlay mutually exclusive with Composer (replaces input area)
- Add dismiss hints: "Press Escape to cancel" (pending) / "Press Space,
  Enter, or Escape to dismiss" (completed)
- Skip adding /btw to conversation history to avoid duplicate display
- Prioritize dialog shortcuts over btw dismiss via dialogsVisibleRef
- Add `sleep` property to terminal-capture FlowStep for async wait scenarios

Made-with: Cursor
2026-03-21 01:07:02 +08:00
tanzhenxin
19ed08098b refactor(core): rename task tool to agent
- Update tool name aliases to map 'task' to 'agent' as legacy alias
- Add proper 'agent' tool name aliases (Agent, AgentTool)
- Update canonical-to-rule display mapping from 'task' to 'Agent'
- Update tests to expect 'agent' instead of 'task'
- Fix debug log message from [TaskTool] to [Agent]

This completes the tool renaming from "task" to "agent" for clarity,
as "agent" better describes the tool's purpose of delegating to
subagents.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-20 15:50:06 +08:00
tanzhenxin
9824e395a8 refactor(core): rename read_file parameter from absolute_path to file_path
This unifies the parameter naming convention across file-related tools
(edit, write_file, read_file) to consistently use file_path.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-20 11:05:47 +08:00
DennisYu07
6f914e4f4e merge main 2026-03-19 17:12:19 +08:00
tanzhenxin
63da2bb926
Merge pull request #2434 from QwenLM/feat/concurrent-task-execution
feat(core): execute task tools concurrently for improved performance
2026-03-18 19:08:53 +08:00
mingholy.lmh
79083ffd50 Fix SDK message event pairing and improve content block handling
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-18 18:10:23 +08:00
mingholy.lmh
eea92fc8db fix: ensure message_start and message_stop are always paired in SDK stream events
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-18 18:10:23 +08:00
DennisYu07
b236e4152f Merge branch 'main' into feat/hook_sessionstart_sessionend 2026-03-17 20:34:13 -07:00
tanzhenxin
78faa365cb feat(tools): allow read-file access to OS temp directory
- Add os.tmpdir() to allowed paths in read-file tool
- Add tests for reading files from OS temp directory
- Add terminal capture scenario for PR review testing

This supports the PR review workflow which saves context to temp files.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-17 17:13:23 +08:00
tanzhenxin
cef0be1b63 test(sdk): simplify integration tests for reliability
- Replace verbose prompts with simple 'Say hello' prompts
- Remove fragile text content assertions that depend on specific model responses
- Simplify test logic to focus on message flow rather than content validation
- Add permissionMode: 'default' and test file setup for read-only tool tests

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-16 11:23:57 +08:00
tanzhenxin
e484dfbbad refactor: remove summarizeToolOutput feature
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Remove the summarizeToolOutput setting and related functionality.

This feature allowed LLM-based summarization of shell tool output but is no longer needed.

This simplifies the codebase by removing unused summarization logic and configuration options.
2026-03-15 13:51:32 +08:00
DennisYu07
aa0f04b60a add doc for hooks and skip integration test 2026-03-12 07:44:26 -07:00
DennisYu07
4b80e4a3b7 reduce some useless case 2026-03-10 19:59:15 -07:00
DennisYu07
ddf2290ccd add integration test for PreToolUse PostToolUse PostToolUseFailure PreCompact 2026-03-10 19:39:55 -07:00