Create a hackbot CLI tool that can interact with Hackbot

Ouverte
#7,472 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 3 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
10/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
python

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Python
Étoiles
579
Forks
369
Merge moyen
3 j 5 h
PR mergées (30 j)
139

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de mozilla/bugbug

Toutes les issues de mozilla/bugbug

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.