Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions kits/mario/plugin/bin/mario-env
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,22 @@
# the System One base's own Python (the venv the image installs for that base, which carries
# browser-use and the MCP SDK) and on the Chromium installed beside it; outside the image, any
# python3 with `systemone-harness[browser]` and a Chrome on the machine will do.
#
# An MCP stdio server gets a restricted environment from the SDK, so nothing the image exported
# reaches this script, and a hosted sandbox's HOME is made per session, so a home-relative venv
# never matches one the image installed. The interpreter and the browsers are therefore found
# here, by name: SYSTEMONE_PYTHON if the host set it for the server, then the known venv paths;
# PLAYWRIGHT_BROWSERS_PATH if set, then the known browser roots that hold a chromium-* directory.
here="$(cd "$(dirname "$0")/.." && pwd)"
py=python3
for cand in /data/agent-tools/systemone-venv/bin/python "$HOME/.systemone-venv/bin/python"; do
if [ -x "$cand" ]; then py="$cand"; break; fi
for cand in "$SYSTEMONE_PYTHON" /data/agent-tools/systemone-venv/bin/python /opt/systemone-venv/bin/python "$HOME/.systemone-venv/bin/python"; do
if [ -n "$cand" ] && [ -x "$cand" ]; then py="$cand"; break; fi
done
if [ -z "$PLAYWRIGHT_BROWSERS_PATH" ] && [ -d /data/agent-tools/ms-playwright ]; then
export PLAYWRIGHT_BROWSERS_PATH=/data/agent-tools/ms-playwright
if [ -z "$PLAYWRIGHT_BROWSERS_PATH" ]; then
for root in /data/agent-tools/ms-playwright /opt/ms-playwright /ms-playwright "$HOME/.cache/ms-playwright"; do
if [ -d "$root" ] && ls -d "$root"/chromium-* >/dev/null 2>&1; then
export PLAYWRIGHT_BROWSERS_PATH="$root"; break
fi
done
fi
exec "$py" "$here/server/mario_env.py"
2 changes: 1 addition & 1 deletion kits/mario/plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "mario-env",
"version": "0.3.1",
"version": "0.3.2",
"description": "Full Screen Mario as an environment for the System One base: the game's state as literal text each step, the keys it listens to as actions, and the browser's frame for the page to show.",
"homepage": "https://github.com/HarnessRouter/starter-kit",
"license": "SEE LICENSE IN ../LICENSE.md"
Expand Down
Loading