Repository navigation
feat(qwencode): author skills kill-switches and accept numeric-string hook timeouts - #3370
Merged
Merged
Conversation
… hook timeouts Add a skills group to the qwencode permissions override so skills.disabled, defaultDisabled, enabled and disabledLevels in .qwen/settings.json can be authored and round-trip on import. Accept a numeric-string hook timeout on import instead of silently dropping its whole matcher group. Refs #2668 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
# Conflicts: # src/generated/docs-content.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two follow-ups for the Qwen Code target from #2668.
1. Skills kill-switches (
skills.*in.qwen/settings.json)Qwen Code reads
skills.disabled,skills.defaultDisabled,skills.enabledandskills.disabledLevelsfrom both the project and the usersettings.json(settings reference, QwenLM/qwen-code#4533, #7357, #8057). Until now rulesync had no way to author them. It is also the only way to turn off a bundled or extension skill that rulesync does not generate.QwencodePermissionsOverrideSchemagains askillsloose object, next totoolsandsecurity.qwencode-permissions.tsadds a third override group,skills, with the curated import listQWEN_OVERRIDE_SKILLS_KEYSand the scope rulesQWEN_SCOPED_SKILLS_KEYS. Each group is shallow-merged into the existingskillsobject, so an unrelated sibling such asskills.directoriesis preserved. On import the four keys are lifted back intoqwencode.skills."skills"is added to the.qwen/settings.jsonpermissionsownedKeysin the shared-config gateway. When the override has noskillsblock, an existingskillsblock in the file is left unchanged (covered by a test).qwencodepermissions blockquote indocs/reference/file-formats.md, the TSDoc on the schema, and the research reference (.rulesync/skills/rulesync-feature-research/references/qwencode.md).2. Numeric-string hook
timeouton importUpstream
hook-timeout.ts(v0.25.0) coerces a numeric-stringtimeoutsuch as"60000"withNumber(). rulesync'sQwencodeHookEntrySchemaaccepted only numbers. Because of that, an imported.qwen/settings.jsonwith a string timeout failedsafeParse, and the entire matcher group, including every sibling hook, was silently dropped. Import now:"60000"becomes 60 s);Generate is unchanged, because the canonical
timeoutis always a number.Design decisions (made autonomously)
disabledSkillspermissions override and reuses the existing scope gate and import machinery.disabled,defaultDisabled,enabledanddisabledLevels.skills.directoriesis a discovery path, not a kill-switch, so it stays insettings.jsonand is not lifted on import. It can still be authored through the loose object, and is then announced as an unmodeled key.global-machine-widefor all four. None of them is onWORKSPACE_RESTRICTED_SETTINGS,WORKSPACE_NON_OVERRIDING_SETTINGSorWORKSPACE_TIGHTEN_ONLY_SETTINGSat v0.25.0. Their notes are specific to each key, not the autonomy wording. Qwen Code unions each list across scopes (mergeStrategy: UNIONinsettingsSchema.ts), but the override replaces the list in the file it writes. The notes say so, andskills.enabledis described as the granting direction.Number()s http, prompt and function timeouts. Only command hooks then go through the legacy millisecond threshold, as before.Not done here (still open on #2668)
general.outputStyle/.qwen/output-styles/: this needs ageneralsettings group in the override (a wide UI and behaviour bag) plus a trust-affecting warning path. That is a larger design change than this PR..qwen/workflows/: the file contract is still documented only in the bundledworkflow-creatorskill..qwen/fork-profiles/*.md): these are frontmatter-only and Qwen Code rejects a body, so they do not map onto rulesync subagents (see the feat: add Qwen Code checks, MCP allow/deny lists and by-product gitignore entries #3275 note).tools.codeModeOnly: still undocumented upstream.No
rules-processor.tsconvention or gitignore change is needed. No new output paths are added.Refs #2668
🤖 Generated with Claude Code
https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj