Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
CI alerts: send the Alertmanager intake password (CUA-2258) (#5911)
cua-agents[bot]1b447a23b1d2
diff --git a/.github/scripts/workflow_alerts.py b/.github/scripts/workflow_alerts.pyindex 9adf78ea3c..5c63ae2c34 100644--- a/.github/scripts/workflow_alerts.py+++ b/.github/scripts/workflow_alerts.py@@ -25,6 +25,7 @@ conclusions change nothing. Standard library only.from __future__ import annotationsimport argparse+import base64import datetime as dtimport jsonimport os@@ -118,13 +119,14 @@ def build_alert(run: dict, name: str, repo: str, environment: str, now: dt.datetreturn {"labels": labels, "annotations": annotations, "startsAt": starts, "endsAt": ends}-def http_json(url: str, token: str = "", data: object = None, attempts: int = 3):+def http_json(url: str, token: str = "", data: object = None, attempts: int = 3, extra_headers: dict | None = None):body = None if data is None else json.dumps(data).encode()headers = {"Accept": "application/vnd.github+json", "User-Agent": "workflow-alerts"}if body is not None:headers["Content-Type"] = "application/json"if token:headers["Authorization"] = "Bearer " + token+ headers.update(extra_headers or {})for attempt in range(1, attempts + 1):request = urllib.request.Request(url, data=body, headers=headers, method="POST" if body is not None else "GET")try:@@ -185,7 +187,10 @@ def latest_runs(repo: str, watch: dict[str, str], token: str, default_branch: stdef post(alerts: list[dict], url: str) -> None:if alerts:- http_json(url, data=alerts)+ # The alert intake wants basic auth (user "alerts"). No token = no header, so local runs still work.+ secret = os.environ.get("ALERTMANAGER_INTAKE_TOKEN", "")+ auth = {"Authorization": "Basic " + base64.b64encode(("alerts:" + secret).encode()).decode()} if secret else None+ http_json(url, data=alerts, extra_headers=auth)def main(argv: list[str] | None = None) -> int:diff --git a/.github/workflows/release-unreleased-digest.yml b/.github/workflows/release-unreleased-digest.ymlindex ae6120fca6..756fb9cc3a 100644--- a/.github/workflows/release-unreleased-digest.yml+++ b/.github/workflows/release-unreleased-digest.yml@@ -20,6 +20,8 @@ jobs:fetch-tags: true- name: Check for unreleased changes per package+ env:+ ALERTMANAGER_INTAKE_TOKEN: ${{ secrets.ALERTMANAGER_INTAKE_TOKEN }}run: |# Service → tag prefix → directorydeclare -A SERVICE_TAG_DIR@@ -71,7 +73,8 @@ jobs:DESCRIPTION=$(echo -e "$UNRELEASED" | sed 's/$/; /' | tr -d '\n' | sed 's/; $//')# Send alert to AlertManager → Slack- curl -s -X POST https://am.cua.ai/api/v2/alerts \+ # The alert intake needs a password (repository secret ALERTMANAGER_INTAKE_TOKEN).+ curl -s -u "alerts:${ALERTMANAGER_INTAKE_TOKEN}" -X POST https://am.cua.ai/api/v2/alerts \-H "Content-Type: application/json" \-d "[{diff --git a/.github/workflows/workflow-failure-alerts.yml b/.github/workflows/workflow-failure-alerts.ymlindex e9d18516ef..c4c52ec05d 100644--- a/.github/workflows/workflow-failure-alerts.yml+++ b/.github/workflows/workflow-failure-alerts.yml@@ -68,6 +68,7 @@ jobs:Release: installer scripts feed=releaseDEFAULT_BRANCH: ${{ github.event.repository.default_branch }}GH_TOKEN: ${{ github.token }}+ ALERTMANAGER_INTAKE_TOKEN: ${{ secrets.ALERTMANAGER_INTAKE_TOKEN }}steps:- uses: actions/checkout@v4with: