- Showcase UI Reorganization: * Move web UI dashboard from root directory into apps/showcase_ui/ for cleaner project structure * Add 'artemis ui' CLI command (artemis/interfaces/cli/commands/ui.py) and launcher scripts for the interactive showcase console - Standalone MCP Server & Notifiers (mcp_server/): * Implement dedicated MCP server package with mobile automation tools (device_state, inspect_trace, task_manager, task_runner) * Add multi-channel notifiers (AgentAPI, Desktop notifications, Webhooks, File output, and Composite routing) * Introduce background task runner and trace store for autonomous mobile execution monitoring - Cross-Platform Runtime & Toolchain Support: * Add artemis/platform/ with OS-specific implementations for Linux, macOS (Darwin), and Windows * Add artemis/runtime/supervisor.py for resilient process and agent runtime supervision * Add artemis/toolchain/ with dependency resolution and SDK descriptors * Add cross-platform launcher scripts (start.sh, start.bat) and installer scripts (scripts/install_deps.*) - Core Enhancements & Diagnostics: * Enhance coordinate normalization, OCR API fallback, and perception pipeline * Add credential validation (credentials_validator.py) and system diagnostics * Update bilingual documentation (README.md, README_CN.md) and architecture diagrams - Test Suite Expansion: * Add integration tests for cloud gateway, remote ADB, and Artemis login * Add unit tests covering core diagnostics, platform detection, toolchain, credentials validator, optional OCR, and MCP tools
107 lines
4.1 KiB
PowerShell
107 lines
4.1 KiB
PowerShell
# Copyright 2026 Google LLC
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
[CmdletBinding()]
|
|
param(
|
|
[int]$Port = 8000,
|
|
[switch]$NoOpen = $false
|
|
)
|
|
|
|
$ErrorActionPreference = "Continue"
|
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
|
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
|
$RootDir = Split-Path -Parent $ScriptDir
|
|
Set-Location $RootDir
|
|
|
|
Write-Host "======================================================" -ForegroundColor Cyan
|
|
Write-Host " β¨ Artemis Autonomous Mobile Agent UI " -ForegroundColor Cyan
|
|
Write-Host "======================================================" -ForegroundColor Cyan
|
|
Write-Host ""
|
|
|
|
function Update-EnvironmentPath {
|
|
$standardDirs = @(
|
|
"$env:LOCALAPPDATA\Microsoft\WinGet\Links",
|
|
"$env:LOCALAPPDATA\Android\Sdk\platform-tools",
|
|
"$env:ProgramFiles\Android\platform-tools",
|
|
"C:\ProgramData\chocolatey\bin",
|
|
"$env:USERPROFILE\scoop\shims",
|
|
"$env:USERPROFILE\.local\bin",
|
|
"$env:USERPROFILE\.cargo\bin"
|
|
)
|
|
$regPath = [Environment]::GetEnvironmentVariable("Path", "User") + ";" + [Environment]::GetEnvironmentVariable("Path", "Machine")
|
|
$currentPaths = ($env:PATH -split ";") + ($regPath -split ";") + $standardDirs | Where-Object { [string]::IsNullOrWhiteSpace($_) -eq $false -and (Test-Path $_) } | Select-Object -Unique
|
|
$env:PATH = $currentPaths -join ";"
|
|
}
|
|
|
|
function Test-CommandExists {
|
|
param([string]$Command)
|
|
$res = Get-Command $Command -ErrorAction SilentlyContinue
|
|
return ($null -ne $res)
|
|
}
|
|
|
|
# 1. Refresh PATH with standard toolchain paths
|
|
Update-EnvironmentPath
|
|
|
|
# 2. Check or install uv
|
|
if (-not (Test-CommandExists "uv")) {
|
|
Write-Host "β‘ uv not found. Installing Astral uv..." -ForegroundColor Yellow
|
|
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
|
Update-EnvironmentPath
|
|
}
|
|
|
|
# 3. Check and try installing missing system toolchains (ADB, FFmpeg, scrcpy)
|
|
$missingCore = @()
|
|
if (-not (Test-CommandExists "adb")) { $missingCore += "adb" }
|
|
if (-not (Test-CommandExists "ffmpeg")) { $missingCore += "ffmpeg" }
|
|
if (-not (Test-CommandExists "scrcpy")) { $missingCore += "scrcpy" }
|
|
|
|
if ($missingCore.Count -gt 0) {
|
|
if (Test-CommandExists "winget") {
|
|
Write-Host "β‘ Auto-installing missing components ($($missingCore -join ', '))..." -ForegroundColor DarkYellow
|
|
if ($missingCore -contains "adb") {
|
|
winget install --id Google.PlatformTools -e --accept-source-agreements --accept-package-agreements --silent 2>$null | Out-Null
|
|
}
|
|
if ($missingCore -contains "ffmpeg") {
|
|
winget install --id Gyan.FFmpeg -e --accept-source-agreements --accept-package-agreements --silent 2>$null | Out-Null
|
|
}
|
|
if ($missingCore -contains "scrcpy") {
|
|
winget install --id Genymobile.scrcpy -e --accept-source-agreements --accept-package-agreements --silent 2>$null | Out-Null
|
|
}
|
|
Update-EnvironmentPath
|
|
}
|
|
}
|
|
|
|
# 4. Check or initialize .env
|
|
if (-not (Test-Path ".env")) {
|
|
if (Test-Path ".env.example") {
|
|
Copy-Item ".env.example" ".env"
|
|
Write-Host " β Initialized .env configuration file." -ForegroundColor Green
|
|
} else {
|
|
New-Item -ItemType File -Path ".env" | Out-Null
|
|
}
|
|
}
|
|
|
|
# 5. Synchronize dependencies
|
|
Write-Host " π¦ Synchronizing Python runtime and project dependencies..." -ForegroundColor Cyan
|
|
uv sync --quiet
|
|
|
|
# 6. Launch unified Showcase UI & open browser
|
|
Write-Host " π Launching Artemis Showcase UI & Admin Console..." -ForegroundColor Green
|
|
if ($NoOpen) {
|
|
uv run artemis ui --port $Port --no-open
|
|
} else {
|
|
uv run artemis ui --port $Port --open
|
|
}
|