feat(cli): Allow SEATBELT profiles in user settings directory#26
Open
BingqingLyu wants to merge 1 commit into
Open
feat(cli): Allow SEATBELT profiles in user settings directory#26BingqingLyu wants to merge 1 commit into
BingqingLyu wants to merge 1 commit into
Conversation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This was referenced Apr 28, 2026
Owner
Author
Conflict Group 1This PR shares modified functions with 8 other PR(s): #10, #112, #113, #114, #117, #7, #88, #94. These PRs should be reviewed as a batch — merging one may affect the others.
graph LR
PR26["PR #26"]
Fstart_sandbox_9815["start_sandbox<br>sandbox.ts"]
PR26 -->|modifies| Fstart_sandbox_9815
PR10["PR #10"]
PR10 -->|modifies| Fstart_sandbox_9815
PR112["PR #112"]
PR112 -->|modifies| Fstart_sandbox_9815
PR113["PR #113"]
PR113 -->|modifies| Fstart_sandbox_9815
PR114["PR #114"]
PR114 -->|modifies| Fstart_sandbox_9815
PR117["PR #117"]
PR117 -->|modifies| Fstart_sandbox_9815
PR7["PR #7"]
PR7 -->|modifies| Fstart_sandbox_9815
PR88["PR #88"]
PR88 -->|modifies| Fstart_sandbox_9815
PR94["PR #94"]
PR94 -->|modifies| Fstart_sandbox_9815
Posted by codegraph-ai conflict detection. |
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.
Description:
This PR enhances the SEATBELT profile resolution logic to support both project-local and global user profiles. Specifically, the resolver now:
This change enables users to define and reuse global SEATBELT sandbox profiles across multiple projects — eliminating the need to duplicate profile files in every project directory.
Background:
Currently, SEATBELT supports the following predefined profiles:
As documented in
docs/sandbox.md, users may also define custom profiles via theSEATBELT_PROFILEenvironment variable. However, the system previously only looked for custom profile files (e.g.,sandbox-macos-<profile>.sb) within<project>/.qwen/name.sb. If the file was absent, resolution would fail — even if a valid profile existed in the user’s global settings directory.Impact:
With this change, users can now place commonly used sandbox profiles in their global
~/.qwen/directory and reference them from any project — streamlining setup and reducing redundancy.Reviewer Test Plan
This only applies to macOS (because Seatbelt).
~/.qwen. You may copy and modify one e.g.packages/cli/src/utils/sandbox-macos-permissive-open.sbinto~/.qwen/sandbox-macos-custom.sb,SEATBELT_PROFILE=custom qwen -s,macOS Seatbelt (custom)in the status.Fixes QwenLM#559