-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Studio: clarify tool permission controls #7181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shimmyshimmer
wants to merge
5
commits into
main
Choose a base branch
from
agent/clarify-permission-mode-controls
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
14f17a7
Clarify tool permission controls
shimmyshimmer 3d7b582
Exercise permission controls across browsers
shimmyshimmer 124ada2
Ignore disabled RAG pill in compact count
shimmyshimmer 29135c0
Keep permission browser CI triggers reliable
shimmyshimmer 7e6eacf
Fix macOS permission browser helper
shimmyshimmer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| #!/usr/bin/env bash | ||
| # SPDX-License-Identifier: AGPL-3.0-only | ||
| # Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| port="${1:?usage: $0 PORT BROWSER [CHANNEL]}" | ||
| browser="${2:?usage: $0 PORT BROWSER [CHANNEL]}" | ||
| channel="${3:-}" | ||
| slug="$browser${channel:+-$channel}" | ||
| artifact_dir="logs/playwright-permissions-$slug" | ||
| server_log="logs/studio-permissions-$slug.log" | ||
| studio_home="${UNSLOTH_STUDIO_HOME:-$HOME/.unsloth/studio}" | ||
| set -- | ||
| if [ -n "${STUDIO_PERMISSION_FRONTEND:-}" ]; then | ||
| set -- -f "$STUDIO_PERMISSION_FRONTEND" | ||
| fi | ||
|
|
||
| mkdir -p "$artifact_dir" | ||
| unsloth studio reset-password | ||
| UNSLOTH_API_ONLY=1 unsloth studio -H 127.0.0.1 -p "$port" "$@" \ | ||
| >"$server_log" 2>&1 & | ||
| studio_pid=$! | ||
|
|
||
| cleanup() { | ||
| kill "$studio_pid" 2>/dev/null || true | ||
| wait "$studio_pid" 2>/dev/null || true | ||
| } | ||
| trap cleanup EXIT | ||
|
|
||
| healthy=0 | ||
| for _ in $(seq 1 180); do | ||
| if curl -fs "http://127.0.0.1:$port/api/health" >/dev/null; then | ||
| healthy=1 | ||
| break | ||
| fi | ||
| if ! kill -0 "$studio_pid" 2>/dev/null; then | ||
| tail -100 "$server_log" || true | ||
| exit 1 | ||
| fi | ||
| sleep 1 | ||
| done | ||
| if [ "$healthy" -ne 1 ]; then | ||
| tail -100 "$server_log" || true | ||
| exit 1 | ||
| fi | ||
|
|
||
| old_password=$(cat "$studio_home/auth/.bootstrap_password") | ||
| new_password="CIPerm-$(python -c 'import secrets; print(secrets.token_urlsafe(16))')" | ||
| if [ "${GITHUB_ACTIONS:-}" = "true" ]; then | ||
| echo "::add-mask::$old_password" | ||
| echo "::add-mask::$new_password" | ||
| fi | ||
|
|
||
| export BASE_URL="http://127.0.0.1:$port" | ||
| export STUDIO_OLD_PW="$old_password" | ||
| export STUDIO_NEW_PW="$new_password" | ||
| export STUDIO_UI_STRICT=1 | ||
| export STUDIO_UI_PERMISSION_ONLY=1 | ||
| export STUDIO_UI_WALL_TIMEOUT_S=240 | ||
| export STUDIO_PLAYWRIGHT_BROWSER="$browser" | ||
| export PW_ART_DIR="$artifact_dir" | ||
| if [ -n "$channel" ]; then | ||
| export STUDIO_PLAYWRIGHT_CHANNEL="$channel" | ||
| else | ||
| unset STUDIO_PLAYWRIGHT_CHANNEL || true | ||
| fi | ||
|
|
||
| python tests/studio/playwright_chat_ui.py |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new step depends on
.github/scripts/run-studio-permission-browser.sh, but the workflow'spull_request.pathslist only includes the app/test directories and this YAML, not the new helper script. A PR that changes only the helper can therefore alter the command these browser runs execute without running Studio UI CI, so regressions in the helper won't be caught until another workflow trigger happens; add the helper path to the trigger list.Useful? React with 👍 / 👎.