Create a hackbot CLI tool that can interact with Hackbot

Aperta
#7,472 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
10/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
579
Fork
369
Merge medio
3g 5h
PR unite (30g)
139

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mozilla/bugbug

Tutte le issue di mozilla/bugbug

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.