Create a hackbot CLI tool that can interact with Hackbot

Offen
#7,472 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 3 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
10/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
python

Rechercherichtung

This spans three parts: token verification in hackbot-api, the client in libs/hackbot-client, and a new CLI. Start by reading how hackbot-api currently accepts allow-listed service accounts and how libs/hackbot-client authenticates, then settle the two open questions (action permissions and whether to create libs/hackbot-cli). Done means the design is agreed and the work is split into smaller issues, one per part.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

hackbot

Add a hackbot command-line tool, built on libs/hackbot-client, that lets Mozilla staff trigger and manage Hackbot runs from the terminal. Users sign in through their browser with their @mozilla.com Google account.

Scope

  • hackbot-api: accept individual Google ID tokens alongside the allow-listed service accounts:
    • Use a dedicated Desktop OAuth client ID as the token audience.
    • Require a verified email and hd == "mozilla.com".
    • Attribute user-initiated runs to the token's email (requested_by) and reject a mismatched X-On-Behalf-Of, so users can't create runs in someone else's name.
  • hackbot-client:
    • Add support for user credentials.
    • Add the missing methods: list_agents, list_runs, get_run, list_actions, get_artifact_url.
  • CLI:
    • login / logout / whoami: browser OAuth flow with a cached refresh token, plus a fallback for headless machines.
    • agents
    • run (with --wait)
    • runs (--mine, --agent, --status)
    • show / watch
    • actions / apply
    • artifact

Open questions

  • Should users be able to apply actions on any run (as they can in the UI today), or only on runs they requested?
  • Should the CLI live in its own package (libs/hackbot-cli) so the services that use hackbot-client don't pull in its dependencies?

With this, we could also create a plugin so that local CLI agents can trigger hackbot.

Vorherrschende Sprache
Python
Sterne
579
Forks
369
Ø Merge
3 T. 5 Std.
Gemergte PRs (30 T.)
139

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus mozilla/bugbug

Alle Issues in mozilla/bugbug

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.