@imenam/mcp-organizer 1.0.28 → 1.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -230,7 +230,7 @@ Les outils MCP sont destinés à l'agent ; leurs schémas JSON sont écrits à l
230
230
  | `edit_checklist` | `POST tasks/:ref/checklist` | Ajoute (en fin de liste, ou juste après `after_item_id`, `null` : en tête), renomme, coche, déplace (`move`, juste après `after_item_id`) ou supprime des éléments de checklist ; ajoute, renomme, déplace ou supprime des points de vérification d'un test (tout ou rien) ; l'annulation d'un déplacement remet l'élément à sa place |
231
231
  | `edit_questions` | `POST tasks/:ref/questions` | Pose, reformule ou supprime des questions d'une tâche (choix unique ou multiple) et leurs propositions (libellé, détail markdown, recommandation) ; les réponses appartiennent aux membres (tout ou rien) |
232
232
  | `add_comment` | `POST tasks/:ref/comments` | Commentaire de l'agent ; assignés et commentateurs précédents notifiés |
233
- | `add_attachment` | `POST tasks/:ref/attachments` (multipart) | Joint à une tâche de l'espace un fichier local désigné par son chemin absolu (`path`, `name` facultatif) : le mode MCP le lit et l'envoie en multipart, son contenu ne passe jamais par l'agent. `comment` publie un commentaire avec la référence au fichier (miniature pour une image, nom sinon), `append_to_description` l'ajoute en fin de description. Chaque élément est une action annulable du lot |
233
+ | `add_attachment` | `POST tasks/:ref/attachments` (multipart) | Joint à une tâche de l'espace un fichier local désigné par son chemin absolu (`file_path`, `name` facultatif) : le mode MCP le lit et l'envoie en multipart, son contenu ne passe jamais par l'agent. À défaut, `file_content` (base64) et `file_name` portent le fichier lui-même : c'est la paire que remplit le relais de mcp-http-gateway. `comment` publie un commentaire avec la référence au fichier (miniature pour une image, nom sinon), `append_to_description` l'ajoute en fin de description. Chaque élément est une action annulable du lot |
234
234
  | `create_idea` / `update_idea` | `POST ideas`, `PATCH ideas/:id` | Idée dans la boîte à idées ; reformulation, archivage |
235
235
  | `promote_idea` | `POST ideas/:id/promote` | Crée une tâche à partir d'une idée et marque l'idée promue |
236
236
  | `list_views` | `GET views?request_id=…` | Vues du tableau de bord de l'auteur de la demande (sans `request_id` : du propriétaire du jeton) : disposition, regroupements, groupes vides, filtres |
@@ -615,7 +615,7 @@ Les textes libres sont rendus en markdown (GitHub Flavored Markdown, avec `react
615
615
  | **Coquille** | Barre latérale en deux étages. En haut, un cadre réunit ce qui concerne l'espace ouvert : sélecteur d'espace (menu : espaces, « Invitations reçues » quand il y en a, signalées par un point sur le sélecteur, « Nouvel espace commun »), Tableau de bord, Idées, Notes, Documents, Agent avec deux pastilles (le nombre de demandes que l'agent n'a pas encore prises, en gris, puis celui des demandes de l'onglet « En attente », qui attendent l'utilisateur, en orange ; chacune masquée à zéro, à jour dès qu'un point est coché ou décoché, et au polling quand l'agent ou un autre membre le fait), Historique, Membres (modale), Réglages de l'espace. En bas, hors du cadre : « Site › Administration » pour les administrateurs, puis l'utilisateur, « Mon compte » (menu : Mon compte, Déconnexion). En-tête : titre, chrono en cours de l'utilisateur (voir « Chrono des tâches »), loupe de recherche (sur le tableau de bord, les idées, les notes, les documents et la page Agent : elle s'ouvre en champ, filtre la page au fil de la saisie, se referme par Échap ou la croix, et s'efface quand on change de page ou d'espace), cloche, bouton principal « Saisir une idée ». Bulle de l'assistant en bas à droite. |
616
616
  | **Tableau de bord** | Un onglet par vue de l'utilisateur (« Tableau » et « Liste » au départ), « Nouvelle vue », une ligne qui résume la vue affichée (« Kanban · groupé par priorité · Statut : À faire, En cours »), menu « Filtrer » (type, priorité, assigné, tag) et bouton « Affichage », qui ouvre le volet des réglages de la vue (voir « Vues du tableau de bord »). Kanban par statut : glisser-déposer (statut et ordre, souris ou clavier), une carte se déposant n'importe où sur la hauteur d'une colonne, même sous sa dernière carte ; par priorité : glisser une carte dans une autre colonne change sa priorité ; « Ajouter une tâche » en bas de colonne crée la tâche avec le statut ou la priorité de la colonne. Liste : un bandeau repliable par groupe, avec une sous-section repliable par valeur du second regroupement, ou les tâches triées par statut sans regroupement ; une ligne montre les tags à la suite du titre, l'avancement, les questions répondues, l'avancement du test, les assignés (« Non assignée » sinon). Matrice : une colonne par valeur du premier regroupement, un bandeau par valeur du second ; chaque case montre toutes ses cartes, dont les tags suivent l'avancement, les questions répondues et l'avancement du test ; un bandeau se replie sur son nom, son nombre de tâches et la première carte de chaque case ; glisser une carte dans une autre case change son statut et sa priorité. Cartes et lignes portent le numéro de la tâche (« Task 41 »). La recherche de l'en-tête garde les tâches dont le titre, la description ou le numéro correspond (« 12 », « Task 12 » ou « ORG-12 » désignent la tâche 12), sans tenir compte des majuscules ni des accents, ou dont une sous-tâche correspond : le texte trouvé est surligné, un extrait de la description s'affiche quand le titre ne le contient pas, et le résumé de la vue dit combien de tâches correspondent. Une carte montre le titre, ses tags, la priorité si elle est Haute ou Critique (le statut dans un Kanban par priorité), l'avancement d'un test (fiole, barre continue de largeur fixe découpée en portions proportionnelles aux points de vérification — vert OK, rouge KO, orange bloqué, gris à vérifier —, puis points vérifiés sur le total, « 3/5 », et nombre de KO, « 1 KO » ; repris dans les lignes de la liste, la matrice et le mini-Kanban des sous-tâches), l'avancement des sous-tâches, les éléments cochés de la checklist (« 2/5 »), les questions répondues sur le total quand la tâche en porte (« 1/3 », en orange tant qu'une question attend sa réponse, en vert quand toutes sont répondues, infobulle « 1 question répondue sur 3 »), le chrono actif de l'utilisateur sur la tâche (temps écoulé, ou compte à rebours d'un pomodoro, atténué en pause) et les avatars ; dans un Kanban par statut, une tâche terminée se réduit à son titre, à ses tags et à son chrono. |
617
617
  | **Détail d'une tâche** (`#/task/<id>`) | Ouvrir une tâche, par un lien ou depuis un autre espace, fait de son espace l'espace ouvert. Une colonne, étroite (720 px), moyenne (1080 px) ou pleine page, au choix par « Largeur… » du menu ⋯, retenu dans le stockage local du navigateur : fil d'Ariane, titre, ligne statut · priorité · assignés · menu ⋯ (tags, type, tâche testée, historique, largeur, suppression ; l'historique est une modale : segmenté Tout / Membres / Agent, événements groupés par jour avec leur temps relatif, phrases avant → après, lot de l'agent sur une ligne avec ses sous-lignes et sa demande (« Voir la demande »), diff de la description « Description +2 −1 » avec une ligne de contexte et « Afficher la description entière », « Restaurer » ou « Version actuelle ») ; « Modifiée par l'agent il y a … · Annuler » ; description markdown, en lecture (ses liens et numéros de tâche se cliquent), modifiée par son bouton crayon « Modifier la description » (Ctrl+Entrée ou la sortie du champ enregistrent, Échap annule) ; pièces jointes, avec une miniature pour une image, qui l'ouvre en grand ; questions de l'agent, quand il en a posé : propositions en cartes (bouton radio pour un seul choix, cases à cocher pour plusieurs), avec leur détail et la pastille « Recommandée », champ « Autre réponse… » qui grandit avec le texte (Ctrl+Entrée ou la sortie du champ enregistrent, Échap annule), chaque choix enregistré aussitôt ; checklist, dont les éléments s'affichent en markdown et se réordonnent par glisser-déposer depuis leur poignée, toujours visible à gauche ; chaque élément se modifie par son bouton crayon « Modifier », affiché au survol avec le × de suppression (Entrée ou la sortie du champ enregistrent, Échap annule) ; Kanban des sous-tâches, dont les cartes portent les mêmes informations que celles du tableau de bord (tags, priorité si Haute ou Critique, avancement d'un test, des sous-sous-tâches, de la checklist et des questions, chrono, avatars) ; « Temps passé » : total de tous les membres, chrono de l'utilisateur (« Démarrer le chrono », « Pomodoro… » avec ses durées réglables, puis temps ou compte à rebours, phase et cycle, « Pause » / « Reprendre », « Arrêter ») et historique des sessions (membre, mode, début, fin, durée) ; commentaires, écrits dans une zone de texte qui grandit avec le texte (Ctrl+Entrée ou le bouton envoient), et que leur auteur modifie de la même façon (Ctrl+Entrée ou la sortie du champ enregistrent, Échap annule). Un commentaire qui mentionne `@agent` confie une demande à l'agent (voir « Demandes ») : le champ l'annonce, le bouton « @agent » sous le champ insère la mention, et taper « @ » la propose (Entrée ou un clic l'insère). La mention est mise en valeur ; après le nom et l'heure de l'auteur, une pastille donne l'état de la demande (« Agent · File d'attente », « En traitement », « N points à voir », « Traitée », « Échec », « Stoppée », « Annulée ») avec « Annuler » tant qu'elle attend, « Relancer » après un arrêt, « Voir la demande » sinon (la page Agent de l'espace de la tâche, sur la demande) ; la raison d'un échec s'affiche sous le texte. Ce commentaire ne se modifie plus une fois la demande prise, ni ne se supprime pendant son traitement. La réponse de l'agent le suit : « Agent », « en réponse à <auteur> : « … » », son texte, ses points à cocher, puis « N modifications · Tout annuler · Voir la demande ». |
618
- | **Détail d'un test** | Même gabarit avec « Test », la ligne « Teste ORG-41 … », la barre de bilan et « 9/12 vérifiés · 2 KO », un onglet par testeur, puis un onglet en lecture seule par ancien testeur (désassigné ou parti de l'espace), tous les points affichés, sans repli, une carte par point, avec un liseré de la couleur de son résultat : en haut le libellé, modifié par son bouton crayon dans une zone de texte qui grandit avec lui, sur plusieurs lignes comme le commentaire (Ctrl+Entrée ou la sortie du champ enregistrent, Échap annule ; « Enregistrer » sur téléphone), et le commentaire du testeur dans un encart ; en pied, à droite, le bouton discret « Comment », avec un crayon, qui ouvre la saisie du commentaire (écrit en rouge ou en orange après un KO ou un Bloqué sans commentaire) et le résultat, choisi d'un clic sur les boutons OK, KO ou Bloqué (recliquer sur le résultat actif remet le point À vérifier) ; le commentaire se saisit dans une zone de texte qui grandit avec lui, avec un + en bout de champ pour ajouter une image (Ctrl+Entrée ou la sortie du champ enregistrent, Échap annule), « Ma review » avec dictée et « Soumettre la review », reviews des autres testeurs repliées avec l'état de leur demande. |
618
+ | **Détail d'un test** | Même gabarit avec « Test », la ligne « Teste ORG-41 … », la barre de bilan et « 9/12 vérifiés · 2 KO », les filtres « À tester », « OK » et « KO / Bloqué » à côté du titre « Checklist » (ils ne gardent que les points de ce résultat dans l'onglet affiché, un clic sur le filtre actif les réaffiche tous, et le déplacement des points attend qu'aucun filtre ne soit actif), un onglet par testeur, puis un onglet en lecture seule par ancien testeur (désassigné ou parti de l'espace), tous les points affichés, sans repli, une carte par point, avec un liseré de la couleur de son résultat : en haut le libellé, modifié par son bouton crayon dans une zone de texte qui grandit avec lui, sur plusieurs lignes comme le commentaire (Ctrl+Entrée ou la sortie du champ enregistrent, Échap annule ; « Enregistrer » sur téléphone), et le commentaire du testeur dans un encart ; en pied, à droite, le bouton discret « Comment », avec un crayon, qui ouvre la saisie du commentaire (écrit en rouge ou en orange après un KO ou un Bloqué sans commentaire) et le résultat, choisi d'un clic sur les boutons OK, KO ou Bloqué (recliquer sur le résultat actif remet le point À vérifier) ; le commentaire se saisit dans une zone de texte qui grandit avec lui, avec un + en bout de champ pour ajouter une image (Ctrl+Entrée ou la sortie du champ enregistrent, Échap annule), « Ma review » avec dictée et « Soumettre la review », reviews des autres testeurs repliées avec l'état de leur demande. |
619
619
  | **Saisir une idée** | Modale : texte, micro, « Envoyer » ; « L'agent la classera à son prochain passage ». |
620
620
  | **Assistant** | Panneau latéral, élargi ou rétréci par sa poignée gauche (glisser, ou flèches au clavier), largeur retenue dans le stockage local du navigateur ; mention du nombre d'échanges précédents que voit l'agent, avec un lien « Régler » vers les Paramètres ; contexte « À propos de ORG-41 » (tâche ouverte), fil des demandes de l'utilisateur et des réponses de l'agent, statut, « Modifier · Annuler » en attente, « Stopper » en cours pour son auteur, nom du jeton qui traite ou a traité la demande (son propriétaire en infobulle), « N actions · Annuler ». |
621
621
  | **Agent** (`#/agent`, `#/agent/demande/<id>` ouvre une demande dans son onglet) | Onglets File d'attente (demandes que l'agent n'a pas prises), En traitement, En attente (demandes traitées dont des points restent ouverts, et demandes en échec : l'utilisateur doit agir ; compteur orange), Traitées (plus rien à faire) et Annulées, chacun avec son nombre, suivis du filtre (types, « Mes demandes ») et, pour un administrateur, de « Traiter la file » (voir « Runner »). Sous les onglets, l'état rechargé toutes les 30 s : pastille du runner (« Runner actif », « Runner non activé » avec « Activer le runner » pour un administrateur, ou « Runner désactivé » avec la raison en infobulle), puis chaque jeton actif de l'espace, son propriétaire et son dernier passage (point allumé s'il date de moins de 10 min) ou « à l'écoute » quand son veilleur de notifications est armé, ou « Aucun agent sur cet espace · Ajouter un agent » ; en dessous, l'échec de la dernière session du runner, s'il y en a un (voir « Runner »), vérifié aussi 5 s après « Traiter la file » ; pendant une session du runner, son bandeau avec « Arrêter la session » pour un administrateur. Chaque onglet liste ses demandes sur une même ligne : l'icône du type, le début du texte (avec, pour une suite, la capsule « Suite de « … » » et les points encore ouverts de la demande d'origine), puis selon l'onglet — file d'attente : « Modifier » et « Annuler » au survol ; en traitement : le jeton qui l'a prise ; traitées : l'issue en couleur (vert « Tout traité ») ; annulées : qui l'a annulée — et l'auteur avec l'ancienneté. L'onglet En attente montre une carte par demande, de la plus ancienne à la plus récente : son en-tête ouvre le détail, ses points ouverts se cochent sur place (« Marquer comme traité » au survol), une demande en échec montre sa raison ; « 3 points à traiter sur 2 demandes » les résume, et « Tout l'espace » / « Les miens » choisit les demandes affichées (tout l'espace par défaut). La recherche de l'en-tête filtre les demandes sur leur texte, la réponse, les points à voir et les numéros de tâche cités. Un clic ouvre le détail de la demande dans une modale : « Demande de <auteur> », sa pastille d'état, le texte intégral et le contexte de la demande (lien vers la tâche), puis selon son état — en attente : « Annuler la demande » et « Modifier », qui la modifie dans la modale (clés de tâche lues « Task 41 » et rendues à l'enregistrement sous la forme `ORG-41`, Ctrl+Entrée pour enregistrer, Échap pour abandonner) ; en cours : l'agent qui la traite et « Stopper » pour son auteur ou un administrateur ; annulée : qui l'a annulée et quand ; traitée : la réponse de l'agent rendue en markdown, les points à régler (ou la raison de l'échec, avec « Relancer » pour une demande stoppée), les échanges avec l'agent, et en pied les modifications repliées (« Annuler », « Tout annuler ») avec le jeton qui l'a traitée et la durée du traitement. Les points forment un encadré orange « À faire de ton côté » (« 1 sur 3 traité ») : chacun se coche par tout membre de l'espace et dit qui l'a traité et quand, ou « Traité par l'agent · via une suite » (qui ouvre la suite) ; tous cochés, l'encadré passe au vert « Points traités » et la demande dans Traitées. Les **échanges avec l'agent** se lisent comme des commentaires : chaque suite (auteur, état et « Annuler » ou « Voir la demande », texte), puis la réponse de l'agent (« N modifications · Annuler · Ouvrir la suite traitée ») ; le champ « Répondre à l'agent… » (Ctrl+Entrée ou le bouton) dépose une nouvelle suite. Le détail d'une suite porte sa capsule « Suite de », qui ouvre la demande d'origine. |
@@ -640,7 +640,7 @@ Sous 760 px de large, l'interface suit les maquettes « Mobile » (390 × 844).
640
640
  - **Menus et modales** : les menus s'ouvrent en feuilles qui montent du bas sur un voile ; un appui sur le voile referme la feuille sans atteindre ce qui se trouve dessous. Glisser la poignée (ou le haut de la feuille) vers le bas fait suivre la feuille au doigt et la referme au-delà de 120 px (ou du tiers de sa hauteur), ou lancée d'un coup ; sinon elle revient en place. Le geste ne fait ni défiler ni recharger la page : tant qu'une feuille est ouverte, la page ne se rafraîchit pas par un tirage vers le bas, et le contenu de la feuille défile sans entraîner la page. Les modales deviennent des feuilles, ou des pages pleines avec un retour pour les contenus longs. Les champs passent à 16 px pour que le navigateur ne zoome pas à la saisie.
641
641
  - **Agent** : le titre « Agent » porte la pastille du runner, le filtre (feuille titrée « Filtrer ») et, pour un administrateur, « Traiter la file » ; les cinq onglets forment un contrôle segmenté (File, En cours, En attente, Traitées, Annulées), chacun avec un point de sa couleur et son nombre, suivi de la présence des agents. Chaque demande tient sur deux lignes, la même dans tous les onglets : son texte, puis l'auteur et l'ancienneté (ou qui l'a annulée), avec à droite l'agent qui la traite et son indicateur, ou une pastille seulement pour une exception (« N points à voir », « Échec », « Stoppée ») ; sans action au survol, toute la ligne ouvre le détail. Le détail s'ouvre en page pleine avec un retour : « Annuler la demande » et « Modifier » en pleine largeur, l'édition avec « Annuler » et « Enregistrer » (Ctrl+Entrée et Échap restent valables), « Stopper » sous son effet, « Relancer » sous le motif d'une demande stoppée, puis « Traitée par … » au-dessus des modifications repliables, chacune avec « Annuler », et « Tout annuler ». Le bandeau de la session du runner place « Arrêter la session » sous son titre ; l'arrêt se confirme dans une feuille « Tuer la session ? ».
642
642
  - **Idées et assistant** : chaque idée garde son ⋯ visible ; lui ou un appui long sur la ligne ouvre une feuille d'actions qui rappelle l'idée (Promouvoir, Archiver ou Désarchiver), et « Promouvoir » quitte la ligne. Toucher une idée ouvre « Promouvoir en tâche » en feuille qui monte du bas, à la hauteur de son contenu, et grandit quand on déplie « ou la remplir moi-même » ; un appui sur le voile la referme. « Filtrer » se place à droite du titre et s'ouvre en feuille titrée. « Nouvelle idée » s'ouvre en feuille, avec la dictée, Annuler et Envoyer. L'assistant occupe toute la page, sans poignée de largeur ni barre d'onglets, avec un en-tête « ← Assistant », la tâche ouverte en puce de contexte et le composeur en bas (micro et envoi) ; Entrée y passe à la ligne et l'envoi se fait par le bouton (ou Ctrl+Entrée), alors que sur un grand écran Entrée envoie.
643
- - **Détail d'une tâche** : une colonne pleine largeur, titre à 22 px, ligne de méta qui passe à la ligne avec son ⋯. Statut, priorité, assignés (ou testeurs), menu ⋯ et ses sous-feuilles Tags et Tâche testée (avec recherche) s'ouvrent en feuilles titrées ; la suppression se confirme dans la feuille et l'historique s'ouvre en page pleine. La description et les commentaires en saisie ont leurs boutons Annuler et Enregistrer (Ctrl+Entrée, Échap et la sortie du champ restent valables). Le crayon « Modifier » des éléments de checklist et des points de test reste affiché ; le glisser-déposer laisse place, dans l'élément en saisie, aux boutons ↑, ↓ et supprimer. Les commentaires de l'utilisateur ont un ⋯ (Modifier, Supprimer) ; la zone de commentaire, avec son bouton d'envoi, est fixée au-dessus de la barre d'onglets et la bulle de l'assistant au-dessus d'elle. Pour une tâche de test, les onglets testeurs passent à la ligne, les boutons OK / KO / Bloqué occupent toute la largeur du pied de la carte, au-dessus du bouton du commentaire, et la saisie du commentaire porte « Image » et « Enregistrer » ; « Soumettre la review » occupe la largeur et les reviews soumises se regroupent dans un cadre, une par ligne.
643
+ - **Détail d'une tâche** : une colonne pleine largeur, titre à 22 px, ligne de méta qui passe à la ligne avec son ⋯. Statut, priorité, assignés (ou testeurs), menu ⋯ et ses sous-feuilles Tags et Tâche testée (avec recherche) s'ouvrent en feuilles titrées ; la suppression se confirme dans la feuille et l'historique s'ouvre en page pleine. La description et les commentaires en saisie ont leurs boutons Annuler et Enregistrer (Ctrl+Entrée, Échap et la sortie du champ restent valables). Le crayon « Modifier » des éléments de checklist et des points de test reste affiché ; le glisser-déposer laisse place, dans l'élément en saisie, aux boutons ↑, ↓ et supprimer. Les commentaires de l'utilisateur ont un ⋯ (Modifier, Supprimer) ; la zone de commentaire, avec son bouton d'envoi, est fixée au-dessus de la barre d'onglets et la bulle de l'assistant au-dessus d'elle. Pour une tâche de test, les filtres passent sous le titre sur toute la largeur, les onglets testeurs passent à la ligne, les boutons OK / KO / Bloqué occupent toute la largeur du pied de la carte, au-dessus du bouton du commentaire, et la saisie du commentaire porte « Image » et « Enregistrer » ; « Soumettre la review » occupe la largeur et les reviews soumises se regroupent dans un cadre, une par ligne.
644
644
  - **Réglages, membres, compte et administration** : Réglages de l'espace, Mon compte et Administration occupent la largeur, sous leur en-tête « ← titre ». Les sections sont titrées en petites capitales et leur contenu tient dans des cartes, champs empilés ; le tableau Application / E-mail des notifications devient un bloc par événement, avec ses deux interrupteurs libellés. Membres s'ouvre en page pleine, avec le nom de l'espace en sous-titre ; les suggestions s'ouvrent sous le champ, le lien d'invitation au-dessus des membres, et le rôle d'un membre en feuille (« Retirer de l'espace »). Nouvel espace commun, Invitations reçues, Nouveau jeton et Jeton créé s'ouvrent en feuilles. L'administration remplace ses tableaux par des cartes : un compte et ses espaces sur deux lignes avec l'interrupteur du runner, une carte par jour de consommation, coût en avant, et une ligne double par session, son issue en pastille quand elle n'est pas « Terminée » ; les limites s'empilent, Enregistrer et l'arrêt d'urgence passent en pleine largeur.
645
645
  - **Connexion et activation** : sans carte, la marque et le formulaire directement sur le fond ; les commandes du premier compte passent à la ligne entre deux mots, sans défilement horizontal.
646
646
  - **Tableau de bord** : les onglets des vues défilent, « Filtrer » devient un entonnoir marqué du nombre de filtres actifs et « Affichage » une icône ; le résumé de la vue disparaît, sauf le compte des résultats d'une recherche, qui masque alors le titre et les onglets. Le Kanban montre une colonne à la fois, choisie par un sélecteur segmenté (libellé, point ou drapeau, nombre de cartes) ou par un glissement horizontal, avec des cartes pleine largeur et un × qui annule l'ajout d'une tâche ; le mini-Kanban des sous-tâches fait de même. La liste passe chaque tâche sur deux lignes ; la matrice garde une bande par ligne et y empile ses cases, chacune sous l'en-tête de sa colonne. Les cartes ne se glissent pas au doigt, pour laisser défiler la page : un toucher ouvre la tâche, un appui long ouvre une feuille d'actions (statut, priorité, « Ouvrir la tâche »). « Filtrer » s'ouvre en feuille titrée aux choix en pastilles, les réglages et la création d'une vue en page pleine avec un retour, et toucher la jauge ouvre la feuille « Avancement ».
@@ -678,7 +678,7 @@ Un non-membre reçoit la même réponse qu'un espace ou une tâche inexistants (
678
678
  - **Pièces jointes** : 20 Mo au plus, stockées sous `<données>/attachments/<id>` ; supprimer une pièce jointe, sa tâche ou son espace efface le fichier.
679
679
  - **Images collées** : une image du presse-papiers (Ctrl+V / Cmd+V, ou « Coller » d'un appui long dans un champ sur téléphone) collée dans le détail d'une tâche devient une pièce jointe de la tâche, nommée `capture-AAAA-MM-JJ-HHMMSS.png` (suivi de `-2`, `-3`… pour les images suivantes d'un même collage). Formats acceptés : PNG, JPEG, GIF et WebP, dans la limite des pièces jointes. L'envoi s'affiche dans la liste des pièces jointes, qui signale un format refusé ou une image trop lourde. Dans un champ de saisie, un collage qui porte aussi du texte (cellules d'un tableur) reste un collage de texte.
680
680
  - **Fichiers vus par l'agent** : `get_attachment` (pièces jointes des tâches) et `get_document` (documents de référence) montrent une image à l'agent comme bloc de contenu image MCP, relayé tel quel par le mode MCP. Le site prépare l'image avec sharp pour l'API de Claude : une image PNG, JPEG, GIF ou WebP d'au plus 2000 px de côté et 5 Mo en base64 part telle quelle ; une image plus grande ou plus lourde (photo de téléphone, capture d'un grand écran) est réduite à 2000 px de côté, puis recompressée (PNG, ou JPEG de qualité et de taille décroissantes) jusqu'à tenir dans 5 Mo ; une image animée est réduite à sa première image et un autre format (TIFF…) converti. Une image que le site ne sait pas décoder est une erreur explicite. Le texte d'un PDF est extrait avec unpdf (pdf.js, sans module natif). Le mode MCP ne charge ni sharp ni unpdf.
681
- - **Fichiers envoyés par l'agent** : `add_attachment` prend le chemin absolu d'un fichier sur la machine où tourne le mode MCP (le poste de l'utilisateur pour Claude Code, le serveur pour le runner). Le mode MCP le lit avec les droits de l'utilisateur qui l'a lancé, refuse un chemin relatif, introuvable, un dossier, un fichier spécial et un fichier de plus de 20 Mo, puis l'envoie au site en multipart (champ `file`, comme le navigateur) : le contenu ne passe jamais par la conversation de l'agent. Le type est déduit de l'extension ; tous les formats sont acceptés, comme pour les pièces jointes des membres. La pièce jointe, le commentaire qui la montre et l'ajout à la description sont trois actions du lot de la demande (ou d'une action directe) ; annuler le lot les retire et efface le fichier.
681
+ - **Fichiers envoyés par l'agent** : `add_attachment` prend le chemin absolu d'un fichier (`file_path`) sur la machine où tourne le mode MCP (le poste de l'utilisateur pour Claude Code, le serveur pour le runner). Le mode MCP le lit avec les droits de l'utilisateur qui l'a lancé, refuse un chemin relatif, introuvable, un dossier, un fichier spécial et un fichier de plus de 20 Mo, puis l'envoie au site en multipart (champ `file`, comme le navigateur) : le contenu ne passe jamais par la conversation de l'agent. Le type est déduit de l'extension ; tous les formats sont acceptés, comme pour les pièces jointes des membres. Dans une gateway, le mode MCP tourne sur la machine de la gateway et ne voit pas le disque de l'agent : l'outil déclare donc aussi la paire `file_path` / `file_content` de la convention de mcp-http-gateway. Le relais `--mcp` lit le fichier sur la machine de l'agent (dans les dossiers de `GATEWAY_INLINE_ROOTS`), le transmet en base64 dans `file_content` avec son nom dans `file_name`, et cache ces deux paramètres à l'agent ; le mode MCP décode le contenu (base64 invalide et fichier de plus de 20 Mo refusés) et l'envoie comme un fichier lu sur son disque. La pièce jointe, le commentaire qui la montre et l'ajout à la description sont trois actions du lot de la demande (ou d'une action directe) ; annuler le lot les retire et efface le fichier.
682
682
  - **Images dans les textes** : une image collée dans un commentaire (zone de saisie ou modification), dans le commentaire d'un point de vérification ou dans la description, ou ajoutée par le bouton « Image » de la zone de commentaire ou par le + en bout de champ du commentaire d'un point (sur téléphone, ils ouvrent la galerie ou l'appareil photo), est jointe à la tâche puis référencée dans le texte par `![nom](attachment:<id>)`, sur sa propre ligne au curseur. Avant l'envoi, un aperçu montre la miniature de chaque image avec « Retirer », qui supprime la pièce jointe et sa référence, et les envois en cours, pendant lesquels l'envoi du commentaire attend. Publiée, l'image s'affiche en miniature dans le texte et s'ouvre en grand d'un clic ; une pièce jointe supprimée laisse « Image supprimée ». Supprimer un commentaire laisse ses images dans les pièces jointes de la tâche. Une image choisie par le bouton garde son nom de fichier.
683
683
  - **Questions** : l'agent pose dans une tâche, de tout type, des questions qui tranchent un point avec les membres (`edit_questions`). Chacune propose des réponses, un seul choix ou plusieurs, avec un détail markdown et la recommandation de l'agent, plus une réponse libre. Tout membre de l'espace y répond depuis le détail de la tâche (`PUT /api/questions/:id/answer`) ; pour un choix unique, la réponse est une proposition ou la réponse libre. Une question est répondue dès qu'une réponse y est enregistrée, par n'importe quel membre (une proposition choisie ou une réponse libre) ; une réponse vidée la remet à trancher. Répondre n'envoie rien à l'agent : il lit les réponses avec `get_task` quand il consulte la tâche, et ne les traite que si un membre le lui demande, par un message ou par un commentaire qui mentionne `@agent`. Les questions et propositions écrites par l'agent sont des actions de son lot, annulables tant que personne n'a répondu depuis ; une question supprimée revient avec sa réponse.
684
684
  - **Tâches de test** : des points de vérification à la place d'une checklist ; chaque testeur saisit son propre résultat par point (`ok`, `ko`, `blocked`, `untested`) et un commentaire. Le bilan d'un point est KO si un testeur a trouvé un KO, sinon Bloqué, sinon OK, sinon à vérifier. Un test peut désigner la tâche qu'il vérifie. La review se rédige en brouillon puis se soumet : elle est figée et crée une demande `test_review` qui vise l'espace de la tâche.
@@ -1,6 +1,6 @@
1
1
  import { AgentEnvelopeSchema, AgentErrorSchema, WaitRequestsDataSchema } from "../../shared/schemas/agent-tools.schema.js";
2
2
  import { ToolArgumentError } from "./tools.js";
3
- import { LocalFileError, readLocalUpload } from "./upload.js";
3
+ import { LocalFileError, readUpload } from "./upload.js";
4
4
  /**
5
5
  * Client HTTP de l'API agent du site : seul point de sortie réseau du mode
6
6
  * MCP. Chaque appel porte le jeton dans `Authorization: Bearer`.
@@ -29,13 +29,13 @@ function redirectTarget(response, requestUrl) {
29
29
  }
30
30
  }
31
31
  /**
32
- * Formulaire multipart d'un envoi de fichier : le fichier local dans le champ
32
+ * Formulaire multipart d'un envoi de fichier : le fichier dans le champ
33
33
  * `file`, chaque autre argument dans un champ texte.
34
34
  */
35
35
  async function uploadForm(file, fields) {
36
36
  let upload;
37
37
  try {
38
- upload = await readLocalUpload(file.path, file.name);
38
+ upload = await readUpload(file);
39
39
  }
40
40
  catch (err) {
41
41
  if (err instanceof LocalFileError)
@@ -1,6 +1,6 @@
1
1
  import { type SiteConnection } from "./client.js";
2
2
  /** Présentation du serveur transmise au client MCP : concepts et déroulé. */
3
- export declare const INSTRUCTIONS = "mcp-organizer connects you to an organizer site: a multi-user task manager where people organize tasks in a web app and queue requests for the AI. You, the connected agent, process those requests when the user asks you to. The site never calls an LLM: you are the intelligence.\n\nYour token covers exactly one space, with the rights of the user who created the token. Every tool works on that space.\n\nConcepts:\n- A **space** holds tasks, an idea box, notes and reference documents. A user's **personal space** is private; a **shared space** has one owner and members.\n- A **task** has a title, a markdown description, a status (todo, doing, review, done), a priority (low, medium, high, critical), assignees and tags. Tasks nest on two levels: task > sub-task > sub-sub-task. A task is either standard (with a checklist) or a test (with checkpoints that each tester marks ok, ko, blocked or untested). Any task can also carry **questions** you ask the members to settle a point: options to choose from (one, or several), each with a markdown detail, plus a free answer. The members answer on the site; an answer does not notify you. You read the answers with get_task, and act on them only when a member asks you to, in a message or in a comment mentioning @agent.\n- A task has **attachments** (files the members upload), listed by get_task with their id. Members paste screenshots into descriptions, comments and checkpoint comments: such an image is an attachment of the task, referenced in the text as `![file name](attachment:<id>)`, and get_task flags the comments and checkpoint comments that contain one. Open with get_attachment the images and PDF files that matter for the request \u2014 a screenshot attached to a failed checkpoint, an image cited in a comment mentioning @agent, a PDF specification: you see an image as it is, and read the text of a PDF (a scanned PDF without a text layer is reported as such). You can attach a file yourself with add_attachment \u2014 a screenshot you took during a test, an export or a report you generated: give the absolute path of the file on your machine; this server reads and uploads it, so its content never goes through you. Pass comment to post it in a comment (an image shows as a thumbnail) or append_to_description to reference it in the description.\n- A **note** is a markdown draft a member writes in the space to mature a thought over several sessions. Notes never reach your queue and writing one does not notify you: read them only when a member asks you to, with get_note and search_notes (read-only). A text refers to a note by a link ending in `#/notes/<id>`; when a request links notes, claim_request shows them in full. \"Envoyer \u00E0 l'agent\" on a note queues a message that links it: process the note as that message asks (create or update tasks, ideas\u2026).\n- A **document** is a reference file a member uploads to the space (a report on the project, a specification, a data export\u2026) so that your decisions match the real state of the project. claim_request and get_context list the documents with their description; read the ones that help the request with get_document (read-only, in parts for long files). You read text files (txt, md, csv, json, yaml, xml\u2026) and the text of Word files (.docx) and PDF files; an image comes as the image itself, which you see.\n- A **request** is something a member of your space asked the AI: an idea, a remark, a test review, a message or an idea promotion. It is pending, then processing once you claim it (only your token can then act for it), then done (with your reply and the points left to its author) or failed (with the reason). The points left to the author are checkboxes the members tick off. A **follow-up** is a message a member sends from a handled request: claim_request shows that original request, your reply and its points with their ids, and check_follow_ups ticks off the points the follow-up settles. A member can also hand a request to you by mentioning @agent in a comment of a task: claim_request then shows the task's thread, and complete_request posts your reply as a comment right after theirs.\n- A **batch** is the set of actions you perform for one request. Every action is logged with its before and after state and with your token, and users can undo one action or the whole batch.\n- The **history** of the space records every event, by the members and by you: tasks created, changed (with before and after values) or deleted, checklist items, ideas, members, notes and documents (comments keep their own thread). Members read it on the site and restore an old version of a task, or a deleted task, from there. Read it with get_history when a member asks who changed something or what happened to a task.\n- A **direct action** is a write you make without request_id, when your user asks you directly (in their editor, for example) rather than through a request: it is done in the name of your token's owner and forms its own batch, listed among the requests of the space as a direct action and undoable like any other. The site runner never acts directly: it always passes the request_id of the request it processes.\n- A **view** is a tab of a member's dashboard: a layout (kanban, list, matrix), groupings by status or priority, and filters on status, priority, assignees, tags and task type (standard or test). Each member has their own views in each space.\n- A **timer** measures the time a member spends on a task: a free timer, or a pomodoro that alternates work phases and breaks (default 25 / 5 / 15 min, long break after 4 cycles). Each member has their own timer on a task, only one runs at a time, and the site's clock counts it; only the work phases of a pomodoro count. The time spent on a task is the sum of the sessions of all members: read it with get_task_time. When a member asks you to measure their time, call start_timer (and stop_timer to end it): you act on the timers of the author of the request, like their views.\n- The **scope** of your work is the space of your token: you see and process the requests of all its members, and you never act outside it. You change the views and timers of the author of the request you process, and nobody else's: only when the author owns your token, or when you are the site runner. A direct action on views or timers changes those of your token's owner.\n\nWork loop, when the user asks you to process the queue:\n1. list_requests to see the pending requests of your space.\n2. claim_request on the oldest one: it becomes processing for you and you get its context (text, author, context task, for a message the previous exchanges of its author, task tree, members, recent ideas, reference documents), along with the custom instructions of the site and of the space, which you follow. get_context shows the space at any time.\n3. Read what you need with get_task and search_tasks, with get_attachment for an image or a file attached to a task, with get_history to know who changed what, with get_note for a note the request or a task links, and with get_document for a reference document that helps the request.\n4. Act with create_task, update_task, set_assignees, set_tags, edit_checklist, edit_questions, add_comment, add_attachment, create_idea, update_idea, promote_idea, with list_views, create_view, update_view, delete_view when the author asks how their board should look, with start_timer and stop_timer when the author asks to measure their time on a task, and with check_follow_ups for a follow-up \u2014 always passing the request_id. Each write is one undoable action of the batch.\n5. complete_request with a short reply in the author's language and, in follow_ups, every point the author still has to handle (or fail_request with the reason), then go back to step 1 until no request is pending.\nWhen the queue is empty, tell the user.\n\nDirect work, when the user asks you to change the space outside any request: read with get_context, get_task and search_tasks, then call the write tools without request_id. Do not claim, complete or fail anything: there is no request to close. When your user still has points to handle afterwards, leave them with report_direct.\n\nNotifications: call enable_notifications once at the start of the session and arm the watcher it hands you with Monitor, whatever the command (behind mcp-http-gateway, the gateway relay answers in place of this server and gives its own watcher command). Each request that becomes pending in your space then arrives on its own as one line (kind, author, excerpt, request id), even while you are idle: process it with the work loop above, starting with claim_request. The host stops that watcher after 30 minutes at most: each time it tells you the watcher expired, re-arm it at once with the same Monitor call; otherwise notifications stop for good. A line \"notifications stopped\" means the site refused the token, and a line \"[gateway-watch] \u2026 la veille \u00E9choue\" means the gateway watcher keeps failing: tell the user. wait_for_requests is the waiting tool of the watcher: you do not need to call it.\n\nHow to handle each kind of request:\n- **idea**: classify it. If it belongs to an existing task or sub-task, attach it there (sub-task, checklist item or comment). If it is actionable and important enough, create a task (or sub-task) with a fitting priority. Otherwise, put it in the idea box with create_idea. Prefer existing tasks over duplicates.\n- **test_review**: feed the tester's findings back into the existing tasks (status, checklist, comments, priority of the affected tasks), or create a task for each problem that has none.\n- **remark** and **message**: do whatever is useful \u2014 answer, update or create tasks, comment \u2014 and say what you did in the reply.\n- **idea_promotion**: turn the context idea into a well-formed task with promote_idea.\n\nRules: write titles, descriptions and replies in the language of the users; keep the reply short and factual (markdown is rendered); put anything the members are meant to copy and paste (a command, code, a prompt, an identifier, a URL to reuse) in a fenced markdown code block, which the site shows with a Copy button; never bury in the reply something the author must act on: it belongs in follow_ups. Errors tell you what to do next; an error about the token (missing, revoked, expired, owner no longer a member) cannot be fixed by retrying: tell the user.";
3
+ export declare const INSTRUCTIONS = "mcp-organizer connects you to an organizer site: a multi-user task manager where people organize tasks in a web app and queue requests for the AI. You, the connected agent, process those requests when the user asks you to. The site never calls an LLM: you are the intelligence.\n\nYour token covers exactly one space, with the rights of the user who created the token. Every tool works on that space.\n\nConcepts:\n- A **space** holds tasks, an idea box, notes and reference documents. A user's **personal space** is private; a **shared space** has one owner and members.\n- A **task** has a title, a markdown description, a status (todo, doing, review, done), a priority (low, medium, high, critical), assignees and tags. Tasks nest on two levels: task > sub-task > sub-sub-task. A task is either standard (with a checklist) or a test (with checkpoints that each tester marks ok, ko, blocked or untested). Any task can also carry **questions** you ask the members to settle a point: options to choose from (one, or several), each with a markdown detail, plus a free answer. The members answer on the site; an answer does not notify you. You read the answers with get_task, and act on them only when a member asks you to, in a message or in a comment mentioning @agent.\n- A task has **attachments** (files the members upload), listed by get_task with their id. Members paste screenshots into descriptions, comments and checkpoint comments: such an image is an attachment of the task, referenced in the text as `![file name](attachment:<id>)`, and get_task flags the comments and checkpoint comments that contain one. Open with get_attachment the images and PDF files that matter for the request \u2014 a screenshot attached to a failed checkpoint, an image cited in a comment mentioning @agent, a PDF specification: you see an image as it is, and read the text of a PDF (a scanned PDF without a text layer is reported as such). You can attach a file yourself with add_attachment \u2014 a screenshot you took during a test, an export or a report you generated: give the absolute path of the file on your machine in file_path; it is read and uploaded for you, so its content never goes through you. Pass comment to post it in a comment (an image shows as a thumbnail) or append_to_description to reference it in the description.\n- A **note** is a markdown draft a member writes in the space to mature a thought over several sessions. Notes never reach your queue and writing one does not notify you: read them only when a member asks you to, with get_note and search_notes (read-only). A text refers to a note by a link ending in `#/notes/<id>`; when a request links notes, claim_request shows them in full. \"Envoyer \u00E0 l'agent\" on a note queues a message that links it: process the note as that message asks (create or update tasks, ideas\u2026).\n- A **document** is a reference file a member uploads to the space (a report on the project, a specification, a data export\u2026) so that your decisions match the real state of the project. claim_request and get_context list the documents with their description; read the ones that help the request with get_document (read-only, in parts for long files). You read text files (txt, md, csv, json, yaml, xml\u2026) and the text of Word files (.docx) and PDF files; an image comes as the image itself, which you see.\n- A **request** is something a member of your space asked the AI: an idea, a remark, a test review, a message or an idea promotion. It is pending, then processing once you claim it (only your token can then act for it), then done (with your reply and the points left to its author) or failed (with the reason). The points left to the author are checkboxes the members tick off. A **follow-up** is a message a member sends from a handled request: claim_request shows that original request, your reply and its points with their ids, and check_follow_ups ticks off the points the follow-up settles. A member can also hand a request to you by mentioning @agent in a comment of a task: claim_request then shows the task's thread, and complete_request posts your reply as a comment right after theirs.\n- A **batch** is the set of actions you perform for one request. Every action is logged with its before and after state and with your token, and users can undo one action or the whole batch.\n- The **history** of the space records every event, by the members and by you: tasks created, changed (with before and after values) or deleted, checklist items, ideas, members, notes and documents (comments keep their own thread). Members read it on the site and restore an old version of a task, or a deleted task, from there. Read it with get_history when a member asks who changed something or what happened to a task.\n- A **direct action** is a write you make without request_id, when your user asks you directly (in their editor, for example) rather than through a request: it is done in the name of your token's owner and forms its own batch, listed among the requests of the space as a direct action and undoable like any other. The site runner never acts directly: it always passes the request_id of the request it processes.\n- A **view** is a tab of a member's dashboard: a layout (kanban, list, matrix), groupings by status or priority, and filters on status, priority, assignees, tags and task type (standard or test). Each member has their own views in each space.\n- A **timer** measures the time a member spends on a task: a free timer, or a pomodoro that alternates work phases and breaks (default 25 / 5 / 15 min, long break after 4 cycles). Each member has their own timer on a task, only one runs at a time, and the site's clock counts it; only the work phases of a pomodoro count. The time spent on a task is the sum of the sessions of all members: read it with get_task_time. When a member asks you to measure their time, call start_timer (and stop_timer to end it): you act on the timers of the author of the request, like their views.\n- The **scope** of your work is the space of your token: you see and process the requests of all its members, and you never act outside it. You change the views and timers of the author of the request you process, and nobody else's: only when the author owns your token, or when you are the site runner. A direct action on views or timers changes those of your token's owner.\n\nWork loop, when the user asks you to process the queue:\n1. list_requests to see the pending requests of your space.\n2. claim_request on the oldest one: it becomes processing for you and you get its context (text, author, context task, for a message the previous exchanges of its author, task tree, members, recent ideas, reference documents), along with the custom instructions of the site and of the space, which you follow. get_context shows the space at any time.\n3. Read what you need with get_task and search_tasks, with get_attachment for an image or a file attached to a task, with get_history to know who changed what, with get_note for a note the request or a task links, and with get_document for a reference document that helps the request.\n4. Act with create_task, update_task, set_assignees, set_tags, edit_checklist, edit_questions, add_comment, add_attachment, create_idea, update_idea, promote_idea, with list_views, create_view, update_view, delete_view when the author asks how their board should look, with start_timer and stop_timer when the author asks to measure their time on a task, and with check_follow_ups for a follow-up \u2014 always passing the request_id. Each write is one undoable action of the batch.\n5. complete_request with a short reply in the author's language and, in follow_ups, every point the author still has to handle (or fail_request with the reason), then go back to step 1 until no request is pending.\nWhen the queue is empty, tell the user.\n\nDirect work, when the user asks you to change the space outside any request: read with get_context, get_task and search_tasks, then call the write tools without request_id. Do not claim, complete or fail anything: there is no request to close. When your user still has points to handle afterwards, leave them with report_direct.\n\nNotifications: call enable_notifications once at the start of the session and arm the watcher it hands you with Monitor, whatever the command (behind mcp-http-gateway, the gateway relay answers in place of this server and gives its own watcher command). Each request that becomes pending in your space then arrives on its own as one line (kind, author, excerpt, request id), even while you are idle: process it with the work loop above, starting with claim_request. The host stops that watcher after 30 minutes at most: each time it tells you the watcher expired, re-arm it at once with the same Monitor call; otherwise notifications stop for good. A line \"notifications stopped\" means the site refused the token, and a line \"[gateway-watch] \u2026 la veille \u00E9choue\" means the gateway watcher keeps failing: tell the user. wait_for_requests is the waiting tool of the watcher: you do not need to call it.\n\nHow to handle each kind of request:\n- **idea**: classify it. If it belongs to an existing task or sub-task, attach it there (sub-task, checklist item or comment). If it is actionable and important enough, create a task (or sub-task) with a fitting priority. Otherwise, put it in the idea box with create_idea. Prefer existing tasks over duplicates.\n- **test_review**: feed the tester's findings back into the existing tasks (status, checklist, comments, priority of the affected tasks), or create a task for each problem that has none.\n- **remark** and **message**: do whatever is useful \u2014 answer, update or create tasks, comment \u2014 and say what you did in the reply.\n- **idea_promotion**: turn the context idea into a well-formed task with promote_idea.\n\nRules: write titles, descriptions and replies in the language of the users; keep the reply short and factual (markdown is rendered); put anything the members are meant to copy and paste (a command, code, a prompt, an identifier, a URL to reuse) in a fenced markdown code block, which the site shows with a Copy button; never bury in the reply something the author must act on: it belongs in follow_ups. Errors tell you what to do next; an error about the token (missing, revoked, expired, owner no longer a member) cannot be fixed by retrying: tell the user.";
4
4
  /**
5
5
  * Connexion au site d'après `ORGANIZER_URL` et `ORGANIZER_TOKEN` ; une valeur
6
6
  * absente ou invalide, ou une URL http vers une autre machine, est une `ConfigError`.
@@ -16,7 +16,7 @@ Your token covers exactly one space, with the rights of the user who created the
16
16
  Concepts:
17
17
  - A **space** holds tasks, an idea box, notes and reference documents. A user's **personal space** is private; a **shared space** has one owner and members.
18
18
  - A **task** has a title, a markdown description, a status (todo, doing, review, done), a priority (low, medium, high, critical), assignees and tags. Tasks nest on two levels: task > sub-task > sub-sub-task. A task is either standard (with a checklist) or a test (with checkpoints that each tester marks ok, ko, blocked or untested). Any task can also carry **questions** you ask the members to settle a point: options to choose from (one, or several), each with a markdown detail, plus a free answer. The members answer on the site; an answer does not notify you. You read the answers with get_task, and act on them only when a member asks you to, in a message or in a comment mentioning @agent.
19
- - A task has **attachments** (files the members upload), listed by get_task with their id. Members paste screenshots into descriptions, comments and checkpoint comments: such an image is an attachment of the task, referenced in the text as \`![file name](attachment:<id>)\`, and get_task flags the comments and checkpoint comments that contain one. Open with get_attachment the images and PDF files that matter for the request — a screenshot attached to a failed checkpoint, an image cited in a comment mentioning @agent, a PDF specification: you see an image as it is, and read the text of a PDF (a scanned PDF without a text layer is reported as such). You can attach a file yourself with add_attachment — a screenshot you took during a test, an export or a report you generated: give the absolute path of the file on your machine; this server reads and uploads it, so its content never goes through you. Pass comment to post it in a comment (an image shows as a thumbnail) or append_to_description to reference it in the description.
19
+ - A task has **attachments** (files the members upload), listed by get_task with their id. Members paste screenshots into descriptions, comments and checkpoint comments: such an image is an attachment of the task, referenced in the text as \`![file name](attachment:<id>)\`, and get_task flags the comments and checkpoint comments that contain one. Open with get_attachment the images and PDF files that matter for the request — a screenshot attached to a failed checkpoint, an image cited in a comment mentioning @agent, a PDF specification: you see an image as it is, and read the text of a PDF (a scanned PDF without a text layer is reported as such). You can attach a file yourself with add_attachment — a screenshot you took during a test, an export or a report you generated: give the absolute path of the file on your machine in file_path; it is read and uploaded for you, so its content never goes through you. Pass comment to post it in a comment (an image shows as a thumbnail) or append_to_description to reference it in the description.
20
20
  - A **note** is a markdown draft a member writes in the space to mature a thought over several sessions. Notes never reach your queue and writing one does not notify you: read them only when a member asks you to, with get_note and search_notes (read-only). A text refers to a note by a link ending in \`#/notes/<id>\`; when a request links notes, claim_request shows them in full. "Envoyer à l'agent" on a note queues a message that links it: process the note as that message asks (create or update tasks, ideas…).
21
21
  - A **document** is a reference file a member uploads to the space (a report on the project, a specification, a data export…) so that your decisions match the real state of the project. claim_request and get_context list the documents with their description; read the ones that help the request with get_document (read-only, in parts for long files). You read text files (txt, md, csv, json, yaml, xml…) and the text of Word files (.docx) and PDF files; an image comes as the image itself, which you see.
22
22
  - A **request** is something a member of your space asked the AI: an idea, a remark, a test review, a message or an idea promotion. It is pending, then processing once you claim it (only your token can then act for it), then done (with your reply and the points left to its author) or failed (with the reason). The points left to the author are checkboxes the members tick off. A **follow-up** is a message a member sends from a handled request: claim_request shows that original request, your reply and its points with their ids, and check_follow_ups ticks off the points the follow-up settles. A member can also hand a request to you by mentioning @agent in a comment of a task: claim_request then shows the task's thread, and complete_request posts your reply as a comment right after theirs.
@@ -1,3 +1,4 @@
1
+ import type { UploadSource } from "./upload.js";
1
2
  /**
2
3
  * Outils de l'agent : définition (schéma JSON écrit à la main, description
3
4
  * en anglais) et route de l'API agent du site qui l'exécute. Le mode MCP ne
@@ -36,11 +37,8 @@ export interface ToolHttpRequest {
36
37
  path: string;
37
38
  query: Record<string, string>;
38
39
  body: Record<string, unknown> | undefined;
39
- /** Fichier local à envoyer en multipart (champ `file`), pour un outil d'envoi. */
40
- file?: {
41
- path: string;
42
- name?: string;
43
- };
40
+ /** Fichier à envoyer en multipart (champ `file`), pour un outil d'envoi. */
41
+ file?: UploadSource;
44
42
  }
45
43
  /** Argument d'appel d'outil inutilisable pour former la requête. */
46
44
  export declare class ToolArgumentError extends Error {
@@ -422,13 +422,18 @@ export const AGENT_TOOLS = [
422
422
  upload: true,
423
423
  definition: {
424
424
  name: "add_attachment",
425
- description: "Attach a local file to a task of your space: a screenshot you took during a test, an export or a report you generated. Give the absolute path of the file on the machine where you run: this MCP server reads it and uploads it to the site itself, so its content never goes through you. Any format, up to 20 MB. To show it to the members, pass comment (a comment posted with the file shown in it: an image as a thumbnail, another file by its name) or append_to_description (the same reference added at the end of the description). Members see the file among the attachments of the task and can undo the upload with the rest of the batch.",
425
+ description: "Attach a local file to a task of your space: a screenshot you took during a test, an export or a report you generated. Give the absolute path of the file on your machine in file_path: it is read and uploaded to the site for you, so its content never goes through you. Any format, up to 20 MB. To show it to the members, pass comment (a comment posted with the file shown in it: an image as a thumbnail, another file by its name) or append_to_description (the same reference added at the end of the description). Members see the file among the attachments of the task and can undo the upload with the rest of the batch.",
426
426
  inputSchema: {
427
427
  type: "object",
428
428
  properties: {
429
429
  request_id: REQUEST_ID,
430
430
  task: TASK_REF,
431
- path: { type: "string", description: "Absolute path of a regular file on the machine where you run (e.g. C:\\Users\\me\\capture.png or /tmp/report.pdf)." },
431
+ file_path: { type: "string", description: "Absolute path of a regular file on your machine (e.g. C:\\Users\\me\\capture.png or /tmp/report.pdf)." },
432
+ file_content: {
433
+ type: "string",
434
+ description: "Content of the file encoded in base64, with file_name, in place of file_path. Only when this server cannot read your disk (it runs on another machine and no relay reads the file for you); otherwise use file_path.",
435
+ },
436
+ file_name: { type: "string", maxLength: 255, description: "Name of the file given in file_content, with its extension, which sets its type (e.g. capture.png)." },
432
437
  name: { type: "string", maxLength: 255, description: "File name shown to the members. Default: the name of the file." },
433
438
  comment: {
434
439
  type: "string",
@@ -437,7 +442,7 @@ export const AGENT_TOOLS = [
437
442
  },
438
443
  append_to_description: { type: "boolean", description: "Add the reference to the file at the end of the task description. Default: false." },
439
444
  },
440
- required: ["task", "path"],
445
+ required: ["task"],
441
446
  additionalProperties: false,
442
447
  },
443
448
  },
@@ -670,6 +675,40 @@ export const AGENT_TOOLS = [
670
675
  export function findAgentTool(name) {
671
676
  return AGENT_TOOLS.find((tool) => tool.definition.name === name);
672
677
  }
678
+ /** Chaîne non vide, ou undefined pour un argument absent ; toute autre valeur est refusée. */
679
+ function optionalText(args, name, expected) {
680
+ const value = args[name];
681
+ if (value === undefined || value === null)
682
+ return undefined;
683
+ if (typeof value !== "string" || value.trim() === "")
684
+ throw new ToolArgumentError(`Invalid arguments — ${name}: expected ${expected}. Check the tool's input schema.`);
685
+ return value;
686
+ }
687
+ /**
688
+ * Fichier d'un outil d'envoi et champs de son formulaire. Le fichier vient de
689
+ * `file_path` ou de `file_content` (base64) avec `file_name` : la paire
690
+ * `file_path` / `file_content` est celle que le relais de mcp-http-gateway
691
+ * reconnaît pour lire le fichier sur la machine de l'agent et en transmettre
692
+ * le contenu.
693
+ */
694
+ function uploadArguments(args) {
695
+ const { file_path: _path, file_content: _content, file_name: _fileName, name: _name, ...body } = args;
696
+ const filePath = optionalText(args, "file_path", "the absolute path of a file");
697
+ const content = optionalText(args, "file_content", "the content of the file encoded in base64");
698
+ const fileName = optionalText(args, "file_name", "the name of the file, with its extension");
699
+ const name = optionalText(args, "name", "a non-empty string");
700
+ const shown = name === undefined ? {} : { name };
701
+ if (filePath !== undefined && content !== undefined)
702
+ throw new ToolArgumentError("Invalid arguments — pass file_path or file_content, not both.");
703
+ if (content !== undefined) {
704
+ if (fileName === undefined)
705
+ throw new ToolArgumentError("Invalid arguments — file_name: expected the name of the file given in file_content, with its extension.");
706
+ return { body, file: { content, filename: fileName.trim(), ...shown } };
707
+ }
708
+ if (filePath === undefined)
709
+ throw new ToolArgumentError("Invalid arguments — file_path: expected the absolute path of a file. Check the tool's input schema.");
710
+ return { body, file: { path: filePath.trim(), ...shown } };
711
+ }
673
712
  /**
674
713
  * Requête HTTP d'un appel d'outil : les arguments nommés dans le chemin y
675
714
  * sont placés (ils sont alors obligatoires et textuels), les autres vont
@@ -686,12 +725,7 @@ export function toolHttpRequest(tool, args) {
686
725
  return encodeURIComponent(value.trim());
687
726
  });
688
727
  if (tool.upload) {
689
- const { path: filePath, name, ...fields } = rest;
690
- if (typeof filePath !== "string" || filePath.trim() === "")
691
- throw new ToolArgumentError("Invalid arguments — path: expected the absolute path of a file. Check the tool's input schema.");
692
- if (name !== undefined && (typeof name !== "string" || name.trim() === ""))
693
- throw new ToolArgumentError("Invalid arguments — name: expected a non-empty string. Check the tool's input schema.");
694
- return { method: tool.method, path, query: {}, body: fields, file: { path: filePath.trim(), ...(name === undefined ? {} : { name: name }) } };
728
+ return { method: tool.method, path, query: {}, ...uploadArguments(rest) };
695
729
  }
696
730
  if (tool.method !== "GET")
697
731
  return { method: tool.method, path, query: {}, body: rest };
@@ -1,8 +1,20 @@
1
1
  /**
2
- * Fichier local envoyé par l'agent comme pièce jointe : le mode MCP le lit
3
- * sur la machine où il tourne, avec les droits de l'utilisateur qui l'a
4
- * lancé, et l'envoie au site. Son contenu ne passe jamais par l'agent.
2
+ * Fichier envoyé par l'agent comme pièce jointe. Désigné par son chemin, le
3
+ * mode MCP le lit sur la machine où il tourne, avec les droits de
4
+ * l'utilisateur qui l'a lancé. Fourni en base64, il est décodé tel quel :
5
+ * c'est la forme que remplit le relais de mcp-http-gateway, qui lit le
6
+ * fichier sur la machine de l'agent quand le mode MCP tourne sur celle de
7
+ * la gateway.
5
8
  */
9
+ /** Source d'un envoi : chemin absolu d'un fichier local, ou contenu en base64 avec son nom de fichier. */
10
+ export type UploadSource = {
11
+ path: string;
12
+ name?: string;
13
+ } | {
14
+ content: string;
15
+ filename: string;
16
+ name?: string;
17
+ };
6
18
  /** Fichier local lu pour l'envoi. */
7
19
  export interface LocalUpload {
8
20
  filename: string;
@@ -20,3 +32,10 @@ export declare function mimeOfFilename(filename: string): string;
20
32
  * remplace son nom. Un lien symbolique est suivi jusqu'au fichier qu'il désigne.
21
33
  */
22
34
  export declare function readLocalUpload(filePath: string, name?: string): Promise<LocalUpload>;
35
+ /**
36
+ * Décode le contenu base64 `content` d'un fichier nommé `filename`, qui
37
+ * donne son type ; `name` remplace ce nom. Les blancs du base64 sont ignorés.
38
+ */
39
+ export declare function decodeInlineUpload(content: string, filename: string, name?: string): LocalUpload;
40
+ /** Fichier d'un envoi, lu sur le disque ou décodé du base64 selon sa source. */
41
+ export declare function readUpload(source: UploadSource): Promise<LocalUpload>;
@@ -49,8 +49,9 @@ export async function readLocalUpload(filePath, name) {
49
49
  stat = await fs.stat(filePath);
50
50
  }
51
51
  catch (err) {
52
- if (err?.code === "ENOENT" || err?.code === "ENOTDIR")
53
- throw new LocalFileError(`No file at ${filePath}: check the path.`);
52
+ if (err?.code === "ENOENT" || err?.code === "ENOTDIR") {
53
+ throw new LocalFileError(`No file at ${filePath}: check the path. This server reads the path on the machine where it runs; if that is not your machine, pass the file in file_content (base64) with file_name instead.`);
54
+ }
54
55
  if (err?.code === "EACCES" || err?.code === "EPERM")
55
56
  throw new LocalFileError(`The file ${filePath} cannot be read: permission denied.`);
56
57
  throw new LocalFileError(`The file ${filePath} cannot be read (${err?.message ?? err}).`);
@@ -77,3 +78,31 @@ export async function readLocalUpload(filePath, name) {
77
78
  throw new LocalFileError("name must not be empty.");
78
79
  return { filename, mime: mimeOfFilename(path.basename(filePath)), content };
79
80
  }
81
+ /** Base64 standard : alphabet, longueur multiple de 4, au plus deux `=` en fin. */
82
+ function isBase64(text) {
83
+ return text.length % 4 === 0 && /^[A-Za-z0-9+/]*={0,2}$/.test(text);
84
+ }
85
+ /**
86
+ * Décode le contenu base64 `content` d'un fichier nommé `filename`, qui
87
+ * donne son type ; `name` remplace ce nom. Les blancs du base64 sont ignorés.
88
+ */
89
+ export function decodeInlineUpload(content, filename, name) {
90
+ const compact = content.replace(/\s+/g, "");
91
+ if ((compact.length / 4) * 3 > MAX_ATTACHMENT_BYTES + 2) {
92
+ throw new LocalFileError(`The file ${filename} is too large: an attachment cannot exceed ${megabytes(MAX_ATTACHMENT_BYTES)}.`);
93
+ }
94
+ if (!isBase64(compact))
95
+ throw new LocalFileError("file_content must be the content of the file encoded in base64.");
96
+ const decoded = Buffer.from(compact, "base64");
97
+ if (decoded.length > MAX_ATTACHMENT_BYTES) {
98
+ throw new LocalFileError(`The file ${filename} is too large (${megabytes(decoded.length)}): an attachment cannot exceed ${megabytes(MAX_ATTACHMENT_BYTES)}.`);
99
+ }
100
+ const shown = (name ?? path.basename(filename)).trim();
101
+ if (shown === "")
102
+ throw new LocalFileError("name must not be empty.");
103
+ return { filename: shown, mime: mimeOfFilename(path.basename(filename)), content: decoded };
104
+ }
105
+ /** Fichier d'un envoi, lu sur le disque ou décodé du base64 selon sa source. */
106
+ export async function readUpload(source) {
107
+ return "content" in source ? decodeInlineUpload(source.content, source.filename, source.name) : readLocalUpload(source.path, source.name);
108
+ }