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
29 changes: 29 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Tests

on:
push:
pull_request:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: '.python-version'

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Install dependencies
run: uv sync --dev

- name: Run tests
run: uv run pytest tests/ -v
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ RUN chmod +x ./perfecto-mcp && \
USER perfecto-mcp

ENV MCP_DOCKER=true
# Telemetry defaults to the Perforce gRPC collector. Override the destination
# with OTEL_EXPORTER_OTLP_ENDPOINT, or set OTEL_SDK_DISABLED=true to turn it off.

# Command to run the application
ENTRYPOINT ["./perfecto-mcp"]
Expand Down
24 changes: 24 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ def get_icon_file(system: str) -> str:


def run_pyinstaller(name: str, icon: str):
hiddenimports = [
"tools.ai_scriptless",
"tools.ai_scriptless.commands",
"tools.ai_scriptless.elements",
"tools.ai_scriptless.item_key",
"tools.ai_scriptless.persistence",
"tools.ai_scriptless.script",
"tools.ai_scriptless.step_path",
"tools.ai_scriptless.tree",
"tools.ai_scriptless.variables",
]
PyInstaller.__main__.run([
'main.py',
'--onefile',
Expand All @@ -99,6 +110,19 @@ def run_pyinstaller(name: str, icon: str):
f'--icon={icon}',
'--clean',
'--noconfirm',
*[f'--hidden-import={module}' for module in hiddenimports],
'--hidden-import=opentelemetry.sdk.trace',
'--hidden-import=opentelemetry.sdk.trace.export',
'--hidden-import=opentelemetry.sdk.resources',
'--hidden-import=opentelemetry.sdk.metrics',
'--hidden-import=opentelemetry.sdk.metrics.export',
'--hidden-import=opentelemetry.exporter.otlp.proto.grpc.trace_exporter',
'--hidden-import=opentelemetry.exporter.otlp.proto.grpc.metric_exporter',
'--hidden-import=opentelemetry.exporter.otlp.proto.http.trace_exporter',
'--hidden-import=opentelemetry.exporter.otlp.proto.http.metric_exporter',
'--hidden-import=opentelemetry.propagate',
'--collect-submodules=opentelemetry',
'--collect-all=grpc',
])


Expand Down
23 changes: 23 additions & 0 deletions config/perfecto.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
HELP_BASE_CONTENT_URL = "https://help.perfecto.io/perfecto-help/content/"


def get_cloud_app_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com"


def get_ai_scriptless_lab_url(cloud_name: str) -> str:
return f"{get_cloud_app_url(cloud_name)}/lab/scriptless-mobile/"


def get_tenant_management_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/tenant-management-webapp/rest/v1/tenant-management/tenants/current"

Expand Down Expand Up @@ -71,5 +79,20 @@ def get_ai_scriptless_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/native-automation-webapp/rest/v1/native-automation"


def get_ai_scriptless_draft_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/native-automation-webapp/rest/v1/draft-management/draft"


def get_ai_scriptless_execution_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.perfectomobile.com/scriptless-mobile-engine/script-executor/api/executions"


def get_ai_scriptless_command_repository_url(cloud_name: str) -> str:
return f"https://{cloud_name}.perfectomobile.com/scriptless-mobile-engine/command-repository/api"


def get_repository_management_api_url(cloud_name: str) -> str:
return (
f"https://{cloud_name}.app.perfectomobile.com"
"/repository-management-webapp/rest/v2/repository-management"
)
Loading
Loading