Repository navigation
fix(approvals) : « Toujours permettre » devient une règle du bot ; la barrière entre coéquipiers attend si la revue est éteinte - #447
Closed
jencryzthers wants to merge 8 commits into
Closed
jencryzthers wants to merge 8 commits into
jencryzthers wants to merge 8 commits into
Conversation
…eammate tools pass the Grok gate JC report 2026-10-13 (Cryptic on Grok, GOX): during a voice call the approval gate asked before agents__coordinate_bots although the bot talks to its teammates without confirmation, and "Always allow" said "Added to your Allow rules" while Access > Always allowed stayed empty and the call asked again in other conversations. Root causes: - The Grok approval gate (Approve for me, per-bot flag) held every agents tool that is not a reviewed read, the teammate tools included. Those are the bot's own "Ask me before contacting other bots" setting's to decide on the server, with its own card and the server's depth, queue and room budgets. They now pass the gate (PEER_REVIEWED_AGENT_TOOL_NAMES). - POST /api/bots/:id/always-allow saved the rule on the one thread only. It now also saves it on the bot (for whoever may edit the bot), the gate reads the bot's list as well as the thread's, and removing a rule in Access strips it from every conversation (store.revokeAlwaysAllow). - A gate card and a safety hold said "The provider requires your approval"; they now say why in plain words (approval.held.gate, approval.held.safety), in every locale. Test: server/gate-allow-rule.e2e.test.ts (red before, green after). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…answered
JC (2026-10-13): "visuellement c'est affreux". The agents__coordinate_bots
card read as the tool id, three UUIDs and raw JSON under an amber
"The provider requires your approval", and every answered card stayed
full size in the chat.
- A teammate tool (coordinate_bots, ask_bot, delegate_bot, send_to_bot)
reads as "Cryptic wants to write to 3 bots": the teammates by name and
avatar, the message quoted and cut at a few lines (Show all).
- The gate's "<tool> {json}" subtitle is the arguments, never the line:
it stays behind "View the full request".
- A routine note (provider or gate) is no longer shown; the notes that
change the decision (sends on your behalf, sandbox, safety review,
undelivered) are one quiet line instead of an amber box.
- Buttons: Deny (neutral, danger on hover), Always allow, Allow (primary).
- An answered or expired tool approval is a one-line receipt
("Always allowed · Write to 3 bots"), in history too, that opens on the
request, the saved rule as a small success line, a working Edit rule for
the asking bot (ChatView passes its id), and the full request.
- The agents server is the bot itself: no "in Agents" in action phrases.
- approval-preview.html?scene=coordinate shows the cases (expand=1 opens
the receipts).
All locales via i18n. Tests: ApprovalCard.peer.test.ts (happy-dom for the
receipt and Edit rule clicks), existing card tests updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pt once answered" This reverts commit 68077ef.
…ew is on PEER_REVIEWED_AGENT_TOOL_NAMES (coordinate_bots, ask_bot, delegate_bot, send_to_bot, post_to_room) pass the gate only while peerReviewRequired is true, so the server's own card decides them. With the revue off they wait. A live turn token cannot POST /always-allow (403 turn_cannot_self_approve). The bot's Always allow remains the standing rule for every conversation and every speaker. An MCP allowKey is the tool of one server, any arguments; revoke of that key drops it everywhere and leaves other thread keys.
Keep main's locale catalogs: the approval.held.gate and approval.held.safety copy belongs on the card PR.
…o_bot has its own peer card A connectors, computer or data capability, an originless owner-trust POST while the bot is working, and PATCH alwaysAllow with a turn Bearer were still treated as the operator. send_to_bot now raises its own peer card (post_to_room already did). Gate and safety card wording leave this branch for the plain-language card.
…ve turn The create_bot card still refuses a standing grant with 409. Without Origin, owner-trust loopback during a live turn is 403 self-approve.
…épondue (#455) * feat(approvals): plain-language approval card, one-line receipt once answered JC (2026-10-13): "visuellement c'est affreux". The agents__coordinate_bots card read as the tool id, three UUIDs and raw JSON under an amber "The provider requires your approval", and every answered card stayed full size in the chat. - A teammate tool (coordinate_bots, ask_bot, delegate_bot, send_to_bot) reads as "Cryptic wants to write to 3 bots": the teammates by name and avatar, the message quoted and cut at a few lines (Show all). - The gate's "<tool> {json}" subtitle is the arguments, never the line: it stays behind "View the full request". - A routine note (provider or gate) is no longer shown; the notes that change the decision (sends on your behalf, sandbox, safety review, undelivered) are one quiet line instead of an amber box. - Buttons: Deny (neutral, danger on hover), Always allow, Allow (primary). - An answered or expired tool approval is a one-line receipt ("Always allowed · Write to 3 bots"), in history too, that opens on the request, the saved rule as a small success line, a working Edit rule for the asking bot (ChatView passes its id), and the full request. - The agents server is the bot itself: no "in Agents" in action phrases. - approval-preview.html?scene=coordinate shows the cases (expand=1 opens the receipts). All locales via i18n. Tests: ApprovalCard.peer.test.ts (happy-dom for the receipt and Edit rule clicks), existing card tests updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(approvals): cover send_to_bot and post_to_room on the plain-language card Harness-native peer-review cards (bare tool name + allowKey) and Grok-gate MCP cards both read as who the bot writes to or which room it posts in. --------- Co-authored-by: Jean-Christophe Proulx <jencryzthers@Jean-Christophes-Macbook-Pro.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Cursor Agent <199161495+cursoragent@users.noreply.github.com>
Member
Author
jencryzthers
added a commit
that referenced
this pull request
Oct 15, 2026
…rte d'autorisation (#566) Retours desktop de JC du 2026-10-15 (`DESKTOP-FEEDBACK-2026-10-15.md`), pour la 0.5.5. Aucun changement de version, de notes de version ni d'`ios/`. ## 1. « Nouveau fil » depuis la barre latérale **Cause** : la simplification des menus (#518) avait retiré toute façon de démarrer un fil depuis la barre latérale (le menu d'un bot n'avait plus « Nouveau fil », la ligne n'avait pas de bouton). **Correctif** (`src/components/Sidebar.tsx`) : - « Nouveau fil » / « New thread » (clé existante `task.newShort`) est la **première entrée** du menu d'un bot, au premier niveau (pas sous « Plus »), aussi dans le menu du client distant. - Bouton « + » sur la ligne du bot, à côté du « … » : visible au survol et au focus clavier, visible en tactile (`touch:`), comme le « + » des salons. - Les deux envoient `newTask` pour ce bot (qui sélectionne aussi le bot). Fils désactivés dans les réglages : rien, comme avant. ## 2. Demande d'autorisation affichée deux fois **Cause** : pour une demande d'outil, `ApprovalCard` dessinait une carte complète dans le fil (titre, risque, détail, « En attente de votre réponse ci-dessous ») en plus de la boîte au-dessus du composer (`PendingApprovalBox`) qui porte les boutons. Le reçu d'une ligne de #455 n'était jamais arrivé sur main (fusionné dans `fix/approvals-always-allowed`, PR #447 fermée). **Correctif** (`src/components/ApprovalCard.tsx`) : - En attente : le fil n'a plus qu'une ligne d'étape discrète (`StepRow`) « En attente de votre autorisation » (ou l'attente d'un admin). La seule carte est celle au-dessus du composer. - Répondue ou expirée : reçu d'une ligne (« Toujours autorisé · Consulter… », « Autorisé une fois », « Refusé », « Expiré ») qui s'ouvre sur la demande, la règle enregistrée (avec Modifier la règle) et les détails techniques. - Les propositions (routine, compétence, profil, équipe) gardent leur carte : ce qui change, et pour quel bot, se relit là. **« Toujours autoriser » (#517)** : vérifié dans le code serveur (`saveOwnerRuleFromCard` puis `ownerDecision`). La règle est enregistrée pour le propriétaire du bot, ce bot et la portée de la carte ; la même demande passe ensuite sans carte. Nouveau test sur le cas de JC (lecture Twilio Accounts) : règle par personne et par portée, relue après redémarrage, même demande sans carte, autre ressource / autre bot / autre personne redemandent. ## i18n Nouvelle clé `approval.status.waitingApproval` en/fr (vouvoiement), `node scripts/generate-locale.mjs fr --accept`, `pnpm i18n:check` vert. ## Tests - `pnpm exec vitest run` sur ApprovalCard*, PendingApproval*, Sidebar*, SidebarBot*, BotContextMenu*, PrimaryBot, `touch-actions`, OptionsCardRow, `server/owner-approval.test.ts` : 46 fichiers, 461 tests, exit 0 - Nouveau `ApprovalCard.single-card.test.ts` (happy-dom) : ligne d'attente seule, reçu qui s'ouvre sur la règle - `Sidebar.simple-mode.test.ts` : le menu et le bouton « + » démarrent un fil (`newTask`) - `pnpm lint`, `pnpm typecheck`, `pnpm i18n:check` : exit 0 (hook pre-push vert) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Jean-Christophe Proulx <jencryzthers@Jean-Christophes-Macbook-Pro.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Corps proposé (remplace la description actuelle). L’outil d’agent ne peut pas écraser une description écrite à la main ; le titre est déjà à jour. À coller dans la description de la PR.
Résumé
Deux correctifs de sécurité sur les approbations. La refonte de la carte (langage clair, reçu d’une ligne) est sortie de cette PR : PR brouillon #455.
« Toujours permettre » devient une règle du bot. Sur un appel MCP retenu par la barrière d’approbation, la règle était enregistrée seulement dans la conversation courante : l’écran Accès > Toujours permis restait vide et l’appel redemandait ailleurs. La règle est maintenant aussi enregistrée sur le bot, la barrière lit la liste du bot en plus de celle du fil, et retirer une règle dans Accès l’enlève de toutes les conversations.
Les outils entre coéquipiers passent la barrière Grok seulement si la revue entre bots est ACTIVE (
coordinate_bots,ask_bot,delegate_bot,send_to_bot,post_to_room). C’est le réglage « Me demander avant de contacter d’autres bots » du serveur qui décide alors, avec sa propre carte et ses limites (profondeur, file, budget de salon). Si la revue est éteinte, l’appel est retenu à la barrière (on ferme par défaut).post_to_roomest dans le même ensemble : ce n’est pas une lecture.Un jeton interne de tour ne peut pas enregistrer une règle.
POST /api/bots/:id/always-allowavec le Bearer d’une capacité interne répond403 turn_cannot_self_approve. Le bot ne s’auto-approuve pas.Pourquoi
Sur un appel vocal,
coordinate_botspassait la barrière Grok sans condition. La revue entre bots éteinte, l’appel partait tout seul. Un jeton de tour pouvait aussi enregistrer « Toujours permettre ». Les deux trous sont fermés.Granularité et portée (documentées, tests)
allowKeyMCP (mcpAllowKey) : l’outil d’un serveur, n’importe quels arguments.mcp:agents__workspace_writerépond à chaque appel suivant de cet outil, peu importe ce qu’on lui demande d’écrire. Les clés entre coéquipiers (ask_bot,delegate_bot,post_to_room) nomment l’action et l’id de la cible, pas le message (peerAllowKey).revokeAlwaysAllow) l’enlève du bot et de chaque conversation. Les autres clés d’un fil restent. Une règle du fil seulement qui a la même clé disparaît aussi : Accès a dit que cet outil n’est plus toujours permis, nulle part.Détail :
docs/grok-approval-gate.md.Preuve
Rouge d’abord (tests écrits, implémentation pas encore là), puis vert.
1. Revue éteinte : l’appel est retenu (unité)
Après le correctif (
gateReadOnlyToolsne jointPEER_REVIEWED_AGENT_TOOL_NAMESque sipeerReviewActive === true) :(les 166 :
grok-approval-gate.test.ts,store.test.ts,approval-describe.test.ts)2. Jeton interne de tour + revue éteinte (e2e, serveur réel, faux moteur ACP)
Rouge — le jeton enregistrait la règle (
200au lieu de403) etcoordinate_botspartait sans carte :Vert —
403 turn_cannot_self_approve, etcoordinate_botsest retenu :3. Règle du bot pour tous les membres, granularité, révocation
pnpm lint,pnpm typechecketpnpm i18n:checkont passé au pre-push.