@imenam/mcp-organizer 1.0.38 → 1.0.40

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.
Files changed (35) hide show
  1. package/README.md +6 -5
  2. package/dist/shared/logic/checkboxes.d.ts +32 -0
  3. package/dist/shared/logic/checkboxes.js +58 -0
  4. package/dist/shared/schemas/agent-tools.schema.d.ts +21 -0
  5. package/dist/shared/schemas/agent-tools.schema.js +12 -2
  6. package/dist/shared/schemas/entities.schema.d.ts +2 -2
  7. package/dist/shared/schemas/entities.schema.js +2 -2
  8. package/dist/shared/schemas/tasks-api.schema.d.ts +12 -2
  9. package/dist/shared/schemas/tasks-api.schema.js +13 -5
  10. package/dist/src/agent-api/checklist.d.ts +5 -1
  11. package/dist/src/agent-api/checklist.js +17 -13
  12. package/dist/src/agent-api/questions.js +4 -2
  13. package/dist/src/agent-api/tasks.js +6 -11
  14. package/dist/src/core/agent.d.ts +2 -0
  15. package/dist/src/core/agent.js +8 -2
  16. package/dist/src/core/history.d.ts +14 -1
  17. package/dist/src/core/history.js +123 -1
  18. package/dist/src/core/notes.d.ts +3 -0
  19. package/dist/src/core/notes.js +13 -1
  20. package/dist/src/core/requests.d.ts +14 -4
  21. package/dist/src/core/requests.js +43 -18
  22. package/dist/src/core/store.d.ts +21 -9
  23. package/dist/src/core/store.js +83 -28
  24. package/dist/src/core/tasks.d.ts +5 -0
  25. package/dist/src/core/tasks.js +25 -2
  26. package/dist/src/core/test-tasks.js +7 -14
  27. package/dist/src/gui-api.js +17 -6
  28. package/dist/src/mcp/start.d.ts +1 -1
  29. package/dist/src/mcp/start.js +6 -5
  30. package/dist/src/mcp/tools.js +15 -10
  31. package/gui/dist/assets/{index-CB0X_FZW.css → index-CAbA-qhx.css} +1 -1
  32. package/gui/dist/assets/index-Da_vH9jg.js +144 -0
  33. package/gui/dist/index.html +2 -2
  34. package/package.json +1 -1
  35. package/gui/dist/assets/index-xC5hAFk-.js +0 -122
@@ -5,6 +5,7 @@ import type { Space, Task } from "../../shared/schemas/entities.schema.js";
5
5
  import type { TaskStatus } from "../../shared/schemas/enums.schema.js";
6
6
  import { type AttachmentView, type BoardResponse, type ChangesResponse, type ChecklistItemView, type CommentView, type CreateTaskRequest, type TaskDetailResponse, type TaskFilters, type TaskKeyTarget, type TaskView, type UpdateTaskRequest, type UploadAttachmentRequest } from "../../shared/schemas/tasks-api.schema.js";
7
7
  import type { ApiFile } from "../../shared/schemas/gui-api.schema.js";
8
+ import { type CheckboxTarget } from "../../shared/logic/checkboxes.js";
8
9
  /**
9
10
  * Tâches, checklist, commentaires et pièces jointes, avec les droits de la
10
11
  * GUI : tout membre d'un espace lit et modifie ses tâches ; un non-membre
@@ -38,6 +39,8 @@ export declare function getTaskDetail(store: Store, userId: string, taskId: stri
38
39
  export declare function listChanges(store: Store, userId: string, since: number | null): ChangesResponse;
39
40
  export declare function createTask(store: Store, userId: string, spaceId: string, input: CreateTaskRequest): TaskView;
40
41
  export declare function updateTask(store: Store, userId: string, taskId: string, patch: UpdateTaskRequest): TaskView;
42
+ /** Coche ou décoche une case de la description, comme une modification de la description. */
43
+ export declare function toggleDescriptionCheckbox(store: Store, userId: string, taskId: string, target: CheckboxTarget): TaskView;
41
44
  /** Supprime une tâche, ses sous-tâches et les fichiers de leurs pièces jointes. */
42
45
  export declare function deleteTask(store: Store, storage: AttachmentStorage, userId: string, taskId: string): void;
43
46
  export declare function moveTask(store: Store, userId: string, taskId: string, status: TaskStatus, afterId: string | null): TaskView;
@@ -50,6 +53,8 @@ export declare function updateChecklistItem(store: Store, userId: string, itemId
50
53
  }): ChecklistItemView;
51
54
  export declare function deleteChecklistItem(store: Store, userId: string, itemId: string): void;
52
55
  export declare function moveChecklistItem(store: Store, userId: string, itemId: string, afterId: string | null): ChecklistItemView;
56
+ /** Coche ou décoche une case d'un commentaire ; seul son auteur le peut, comme pour le modifier. */
57
+ export declare function toggleCommentCheckbox(store: Store, userId: string, commentId: string, target: CheckboxTarget): CommentView;
53
58
  /**
54
59
  * Ajoute un commentaire. Un commentaire qui mentionne @agent confie aussi une
55
60
  * demande `message` à l'agent, dans l'espace de la tâche, avec la tâche pour
@@ -5,6 +5,7 @@ import { requireMember } from "./spaces.js";
5
5
  import { downloadRequestAttachment } from "./request-attachments.js";
6
6
  import { MAX_ATTACHMENT_BYTES, } from "../../shared/schemas/tasks-api.schema.js";
7
7
  import { summarizeTest } from "../../shared/logic/test-summary.js";
8
+ import { CHECKBOX_CONFLICT, toggleCheckbox } from "../../shared/logic/checkboxes.js";
8
9
  import { questionViews } from "./questions.js";
9
10
  import { testDetail } from "./test-tasks.js";
10
11
  import { taskTime } from "./timers.js";
@@ -122,7 +123,7 @@ function buildForest(store, space) {
122
123
  subtasks: { done: 0, total: 0 },
123
124
  checklist: checklists.get(task.id) ?? { done: 0, total: 0 },
124
125
  questions: questions.get(task.id) ?? { done: 0, total: 0 },
125
- test: task.type === "test" ? summarizeTest(checkpoints.get(task.id) ?? [], results.get(task.id) ?? [], assignees.get(task.id) ?? []) : null,
126
+ test: task.type === "test" || checkpoints.has(task.id) ? summarizeTest(checkpoints.get(task.id) ?? [], results.get(task.id) ?? [], assignees.get(task.id) ?? []) : null,
126
127
  children: [],
127
128
  });
128
129
  }
@@ -238,7 +239,7 @@ export function getTaskDetail(store, userId, taskId, now = new Date()) {
238
239
  children: byId.get(task.id).children,
239
240
  questions: questionViews(store, task.id),
240
241
  checklist,
241
- test: task.type === "test" ? testDetail(store, task) : null,
242
+ test: testDetail(store, task),
242
243
  comments,
243
244
  attachments: store.listAttachments(task.id).map(attachmentView),
244
245
  members: membersOf(store, space.id),
@@ -294,6 +295,19 @@ export function updateTask(store, userId, taskId, patch) {
294
295
  });
295
296
  return taskView(store, space, store.getTask(taskId));
296
297
  }
298
+ /** Coche ou décoche une case de la description, comme une modification de la description. */
299
+ export function toggleDescriptionCheckbox(store, userId, taskId, target) {
300
+ const space = store.mutate(asUser(userId), (tx) => {
301
+ const { space, task } = requireTask(tx.store, taskId, userId);
302
+ const description = toggleCheckbox(task.description, target);
303
+ if (description === null)
304
+ throw new InvariantError(CHECKBOX_CONFLICT);
305
+ if (description !== task.description)
306
+ tx.updateTask(taskId, { description });
307
+ return space;
308
+ });
309
+ return taskView(store, space, store.getTask(taskId));
310
+ }
297
311
  /** Supprime une tâche, ses sous-tâches et les fichiers de leurs pièces jointes. */
298
312
  export function deleteTask(store, storage, userId, taskId) {
299
313
  const removed = store.mutate(asUser(userId), (tx) => {
@@ -416,6 +430,7 @@ function commentView(store, userId, comment) {
416
430
  requestId: answered.id,
417
431
  followUps: store.listFollowUps(answered.id).map((point) => followUpView(store, point)),
418
432
  liveActions: store.listAgentActions(answered.id).filter((action) => action.undoneAt === null).length,
433
+ undoneActions: store.listAgentActions(answered.id).filter((action) => action.undoneAt !== null).length,
419
434
  canUndo: answered.status === "done" || answered.status === "failed",
420
435
  }
421
436
  : null,
@@ -428,6 +443,14 @@ function requireComment(store, commentId, userId) {
428
443
  requireTask(store, comment.taskId, userId);
429
444
  return comment;
430
445
  }
446
+ /** Coche ou décoche une case d'un commentaire ; seul son auteur le peut, comme pour le modifier. */
447
+ export function toggleCommentCheckbox(store, userId, commentId, target) {
448
+ const current = requireComment(store, commentId, userId);
449
+ const body = toggleCheckbox(current.body, target);
450
+ if (body === null)
451
+ throw new InvariantError(CHECKBOX_CONFLICT);
452
+ return body === current.body ? commentView(store, userId, current) : updateComment(store, userId, commentId, body);
453
+ }
431
454
  /**
432
455
  * Ajoute un commentaire. Un commentaire qui mentionne @agent confie aussi une
433
456
  * demande `message` à l'agent, dans l'espace de la tâche, avec la tâche pour
@@ -1,8 +1,8 @@
1
- import { ForbiddenError, InvariantError } from "./errors.js";
1
+ import { ForbiddenError } from "./errors.js";
2
2
  import { notFound, requireTask } from "./tasks.js";
3
3
  import { summarizeTest } from "../../shared/logic/test-summary.js";
4
4
  /**
5
- * Tâches de test, avec les droits de la GUI : tout membre de l'espace gère
5
+ * Tests d'une tâche, avec les droits de la GUI : tout membre de l'espace gère
6
6
  * les points de vérification ; seul un testeur (assigné de la tâche) saisit
7
7
  * ses propres résultats, son brouillon de review et la soumet. Les résultats
8
8
  * et reviews d'un ancien testeur restent affichés, en lecture seule. Les
@@ -56,33 +56,26 @@ export function testDetail(store, task) {
56
56
  };
57
57
  }
58
58
  // --- Droits ---------------------------------------------------------------------
59
- /** Tâche de test d'un espace dont `userId` est membre. */
60
- function requireTestTask(store, taskId, userId) {
61
- const { task } = requireTask(store, taskId, userId);
62
- if (task.type !== "test")
63
- throw new InvariantError("Cette tâche n'est pas une tâche de test : elle a une checklist, pas de points de vérification.");
64
- return task;
65
- }
66
- /** Tâche de test dont `userId` est testeur. */
59
+ /** Tâche dont `userId` est testeur. */
67
60
  function requireTester(store, taskId, userId) {
68
- const task = requireTestTask(store, taskId, userId);
61
+ const { task } = requireTask(store, taskId, userId);
69
62
  if (!store.listAssigneeIds(taskId).includes(userId)) {
70
63
  throw new ForbiddenError("Seuls les testeurs de la tâche saisissent des résultats et une review : assignez-vous d'abord la tâche.");
71
64
  }
72
65
  return task;
73
66
  }
74
- /** Point de vérification d'une tâche de test dont `userId` est membre de l'espace. */
67
+ /** Point de vérification d'une tâche dont `userId` est membre de l'espace. */
75
68
  function requireCheckpoint(store, checkpointId, userId) {
76
69
  const checkpoint = store.findCheckpoint(checkpointId);
77
70
  if (!checkpoint)
78
71
  throw notFound();
79
- requireTestTask(store, checkpoint.taskId, userId);
72
+ requireTask(store, checkpoint.taskId, userId);
80
73
  return checkpoint;
81
74
  }
82
75
  // --- Points de vérification -----------------------------------------------------
83
76
  export function addCheckpoint(store, userId, taskId, text) {
84
77
  const { id, text: saved, position } = store.mutate(asUser(userId), (tx) => {
85
- requireTestTask(tx.store, taskId, userId);
78
+ requireTask(tx.store, taskId, userId);
86
79
  return tx.addCheckpoint(taskId, text);
87
80
  });
88
81
  return { id, text: saved, position };
@@ -2,15 +2,15 @@ import { ActivateRequestSchema, ChangePasswordRequestSchema, CreateSpaceRequestS
2
2
  import { ForbiddenError, InvariantError, NotFoundError, OrganizerError, UnauthorizedError } from "./core/errors.js";
3
3
  import { authenticate, changePassword, login, logout, redeemAccessLink, resolveAccessLink, updateDisplayName } from "./core/accounts.js";
4
4
  import { acceptReceivedInvitation, createSharedSpace, declineReceivedInvitation, deleteSpace, inviteToSpace, leaveSpace, listMembers, listMemberSuggestions, listReceivedInvitations, listSpaces, removeMember, updateSpace, resendInvitation, revokeInvitation, } from "./core/spaces.js";
5
- import { addChecklistItem, addComment, createTask, deleteAttachment, deleteChecklistItem, deleteComment, deleteTask, downloadAttachment, getBoard, getTaskDetail, listChanges, moveChecklistItem, moveTask, resolveTaskKey, setAssignees, setTags, updateChecklistItem, updateComment, updateTask, uploadAttachment, } from "./core/tasks.js";
5
+ import { addChecklistItem, addComment, createTask, deleteAttachment, deleteChecklistItem, deleteComment, deleteTask, downloadAttachment, getBoard, getTaskDetail, listChanges, moveChecklistItem, moveTask, resolveTaskKey, setAssignees, setTags, updateChecklistItem, updateComment, updateTask, toggleCommentCheckbox, toggleDescriptionCheckbox, uploadAttachment, } from "./core/tasks.js";
6
6
  import { answerQuestion } from "./core/questions.js";
7
7
  import { listTimers, pauseTimer, resumeTimer, startTimer, stopTimer } from "./core/timers.js";
8
8
  import { StartTimerRequestSchema } from "../shared/schemas/timers-api.schema.js";
9
9
  import { addCheckpoint, deleteCheckpoint, moveCheckpoint, saveReviewDraft, setTestResult, submitReview, updateCheckpoint } from "./core/test-tasks.js";
10
- import { AddChecklistItemRequestSchema, AnswerQuestionRequestSchema, CheckpointTextRequestSchema, CommentRequestSchema, CreateTaskRequestSchema, MoveAfterRequestSchema, MoveTaskRequestSchema, ReviewDraftRequestSchema, SetAssigneesRequestSchema, SetTagsRequestSchema, SetTestResultRequestSchema, SubmitReviewRequestSchema, TaskFiltersSchema, TaskKeyQuerySchema, UpdateChecklistItemRequestSchema, UpdateTaskRequestSchema, UploadAttachmentRequestSchema, } from "../shared/schemas/tasks-api.schema.js";
10
+ import { AddChecklistItemRequestSchema, AnswerQuestionRequestSchema, CheckpointTextRequestSchema, CommentRequestSchema, ToggleCheckboxRequestSchema, CreateTaskRequestSchema, MoveAfterRequestSchema, MoveTaskRequestSchema, ReviewDraftRequestSchema, SetAssigneesRequestSchema, SetTagsRequestSchema, SetTestResultRequestSchema, SubmitReviewRequestSchema, TaskFiltersSchema, TaskKeyQuerySchema, UpdateChecklistItemRequestSchema, UpdateTaskRequestSchema, UploadAttachmentRequestSchema, } from "../shared/schemas/tasks-api.schema.js";
11
11
  import { getSettings, getSpaceNotificationSettings, listNotifications, markAllNotificationsRead, markNotificationRead, unreadCount, updateSettings, updateSpaceNotificationSettings } from "./core/notifications.js";
12
12
  import { NotificationListQuerySchema, UpdateSettingsRequestSchema, UpdateSpaceNotificationSettingsRequestSchema } from "../shared/schemas/notifications-api.schema.js";
13
- import { cancelRequest, createRequest, createSuite, getRequest, listRequests, relaunchRequest, resendRequest, setFollowUpDone, setRequestDismissed, stopRequest, undoAction, undoRequest, updateRequest, } from "./core/requests.js";
13
+ import { cancelRequest, createRequest, createSuite, getRequest, listRequests, relaunchRequest, resendRequest, setFollowUpDone, setRequestDismissed, stopRequest, redoAction, redoRequest, undoAction, undoRequest, updateRequest, } from "./core/requests.js";
14
14
  import { listTaskHistory, restoreTaskVersion } from "./core/task-history.js";
15
15
  import { deleteRequestAttachment, uploadRequestAttachment } from "./core/request-attachments.js";
16
16
  import { listSpaceHistory, restoreDeletedTask } from "./core/space-history.js";
@@ -20,7 +20,7 @@ import { createBoardView, deleteBoardView, listBoardViews, moveBoardView, update
20
20
  import { CreateBoardViewRequestSchema, MoveBoardViewRequestSchema, UpdateBoardViewRequestSchema } from "../shared/schemas/views-api.schema.js";
21
21
  import { createIdea, delegatePromotion, listIdeas, promoteIdea, setIdeaArchived } from "./core/ideas.js";
22
22
  import { CreateIdeaRequestSchema, PromoteIdeaRequestSchema, UpdateIdeaRequestSchema } from "../shared/schemas/ideas-api.schema.js";
23
- import { createNote, deleteNote, getNote, listNotes, sendNoteToAgent, updateNote } from "./core/notes.js";
23
+ import { createNote, deleteNote, getNote, listNotes, sendNoteToAgent, toggleNoteCheckbox, updateNote } from "./core/notes.js";
24
24
  import { CreateNoteRequestSchema, SendNoteRequestSchema, UpdateNoteRequestSchema } from "../shared/schemas/notes-api.schema.js";
25
25
  import { deleteDocument, downloadDocument, listDocuments, replaceDocument, updateDocument, uploadDocument } from "./core/documents.js";
26
26
  import { UpdateDocumentRequestSchema } from "../shared/schemas/documents-api.schema.js";
@@ -258,6 +258,9 @@ route("GET", "/task-keys/:key", (ctx, { user, request, params }) => {
258
258
  route("PATCH", "/tasks/:taskId", (ctx, { user, request, params }) => ({
259
259
  body: updateTask(ctx.store, user.id, params.taskId, parseBody(UpdateTaskRequestSchema, request.body)),
260
260
  }));
261
+ route("POST", "/tasks/:taskId/description/checkbox", (ctx, { user, request, params }) => ({
262
+ body: toggleDescriptionCheckbox(ctx.store, user.id, params.taskId, parseBody(ToggleCheckboxRequestSchema, request.body)),
263
+ }));
261
264
  route("DELETE", "/tasks/:taskId", (ctx, { user, params }) => {
262
265
  deleteTask(ctx.store, ctx.attachments, user.id, params.taskId);
263
266
  return { body: ok };
@@ -327,6 +330,9 @@ route("POST", "/tasks/:taskId/comments", (ctx, { user, request, params }) => ({
327
330
  route("PATCH", "/comments/:commentId", (ctx, { user, request, params }) => ({
328
331
  body: updateComment(ctx.store, user.id, params.commentId, parseBody(CommentRequestSchema, request.body).body),
329
332
  }));
333
+ route("POST", "/comments/:commentId/checkbox", (ctx, { user, request, params }) => ({
334
+ body: toggleCommentCheckbox(ctx.store, user.id, params.commentId, parseBody(ToggleCheckboxRequestSchema, request.body)),
335
+ }));
330
336
  route("DELETE", "/comments/:commentId", (ctx, { user, params }) => {
331
337
  deleteComment(ctx.store, user.id, params.commentId);
332
338
  return { body: ok };
@@ -370,6 +376,9 @@ route("GET", "/notes/:noteId", (ctx, { user, params }) => ({ body: getNote(ctx.s
370
376
  route("PATCH", "/notes/:noteId", (ctx, { user, request, params }) => ({
371
377
  body: updateNote(ctx.store, user.id, params.noteId, parseBody(UpdateNoteRequestSchema, request.body)),
372
378
  }));
379
+ route("POST", "/notes/:noteId/checkbox", (ctx, { user, request, params }) => ({
380
+ body: toggleNoteCheckbox(ctx.store, user.id, params.noteId, parseBody(ToggleCheckboxRequestSchema, request.body)),
381
+ }));
373
382
  route("DELETE", "/notes/:noteId", (ctx, { user, params }) => {
374
383
  deleteNote(ctx.store, user.id, params.noteId);
375
384
  return { body: ok };
@@ -414,14 +423,16 @@ route("PUT", "/requests/:requestId/dismissed", (ctx, { user, request, params })
414
423
  route("POST", "/requests/:requestId/resend", (ctx, { user, request, params }) => ({
415
424
  body: resendRequest(ctx.store, user.id, params.requestId, parseBody(ResendRequestSchema, request.body).text),
416
425
  }));
417
- route("POST", "/requests/:requestId/undo", (ctx, { user, params }) => ({ body: undoRequest(ctx.store, ctx.attachments, user.id, params.requestId) }));
426
+ route("POST", "/requests/:requestId/undo", (ctx, { user, params }) => ({ body: undoRequest(ctx.store, user.id, params.requestId) }));
427
+ route("POST", "/requests/:requestId/redo", (ctx, { user, params }) => ({ body: redoRequest(ctx.store, ctx.attachments, user.id, params.requestId) }));
418
428
  route("POST", "/requests/:requestId/suites", (ctx, { user, request, params }) => ({
419
429
  body: createSuite(ctx.store, user.id, params.requestId, parseBody(CreateSuiteSchema, request.body).text),
420
430
  }));
421
431
  route("PUT", "/follow-ups/:followUpId", (ctx, { user, request, params }) => ({
422
432
  body: setFollowUpDone(ctx.store, user.id, params.followUpId, parseBody(SetFollowUpDoneSchema, request.body).done),
423
433
  }));
424
- route("POST", "/agent-actions/:actionId/undo", (ctx, { user, params }) => ({ body: undoAction(ctx.store, ctx.attachments, user.id, params.actionId) }));
434
+ route("POST", "/agent-actions/:actionId/undo", (ctx, { user, params }) => ({ body: undoAction(ctx.store, user.id, params.actionId) }));
435
+ route("POST", "/agent-actions/:actionId/redo", (ctx, { user, params }) => ({ body: redoAction(ctx.store, ctx.attachments, user.id, params.actionId) }));
425
436
  route("GET", "/tasks/:taskId/history", (ctx, { user, params }) => ({ body: listTaskHistory(ctx.store, user.id, params.taskId) }));
426
437
  route("POST", "/tasks/:taskId/restore", (ctx, { user, params }) => ({ body: restoreDeletedTask(ctx.store, user.id, params.taskId) }));
427
438
  route("GET", "/spaces/:spaceId/history", (ctx, { user, request, params }) => {
@@ -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 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 request can carry **images** its author pasted in its text (`![file name](attachment:<id>)`): claim_request lists them with their id. Open them with get_attachment, and attach the ones that explain a task you create or change with copy_attachment, which copies the file on the site: the task then reads without the request.\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- **Mentions**: a text mentions a task by its key (`ORG-30`), which the site shows as a button with the task's status and its key or current title, and a page of the space by a markdown link to its address, which the site shows as a pill named after the current name of its target (the link text is only a fallback): `[Tableau de bord](#/tableau-de-bord)`. An address without a space designates the space of the text; members' mentions carry it (`#/espaces/<space id>/\u2026`). Addresses: dashboard `#/tableau-de-bord`, one of the reader's views `#/tableau-de-bord/vue/<view id>`, ideas `#/idees`, notes `#/notes`, a note `#/notes/<note id>`, documents `#/documents`, a document `#/documents/<document id>`, the agent page `#/agent` and its tabs `#/agent/file`, `#/agent/en-traitement`, `#/agent/en-attente`, `#/agent/traitees`, `#/agent/annulees`, history `#/historique`, space settings `#/espace`. Write mentions the same way in your descriptions, comments and replies.\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 of the request 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, copy_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 can carry a checklist and test checkpoints that each tester (assignee) marks ok, ko, blocked or untested. Its type, standard or test, is only an indicator of what it is about: it restricts neither. 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, checkpoint comments and free answers to questions: such an image is an attachment of the task, referenced in the text as `![file name](attachment:<id>)`, and get_task flags the comments, checkpoint comments and free answers 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 request can carry **images** its author pasted in its text (`![file name](attachment:<id>)`): claim_request lists them with their id. Open them with get_attachment, and attach the ones that explain a task you create or change with copy_attachment, which copies the file on the site: the task then reads without the request.\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- **Mentions**: a text mentions a task by its key (`ORG-30`), which the site shows as a button with the task's status and its key or current title, and a page of the space by a markdown link to its address, which the site shows as a pill named after the current name of its target (the link text is only a fallback): `[Tableau de bord](#/tableau-de-bord)`. An address without a space designates the space of the text; members' mentions carry it (`#/espaces/<space id>/\u2026`). Addresses: dashboard `#/tableau-de-bord`, one of the reader's views `#/tableau-de-bord/vue/<view id>`, ideas `#/idees`, notes `#/notes`, a note `#/notes/<note id>`, documents `#/documents`, a document `#/documents/<document id>`, the agent page `#/agent` and its tabs `#/agent/file`, `#/agent/en-traitement`, `#/agent/en-attente`, `#/agent/traitees`, `#/agent/annulees`, history `#/historique`, space settings `#/espace`. Write mentions the same way in your descriptions, comments and replies.\n- **Folded blocks**: in a description, a comment or a note, `<details>` on its own line, then `<summary>Title</summary>` on its own line, the markdown content, and `</details>` on its own line show the content folded behind its title until a member clicks it; blocks can nest. Other HTML is shown as text. You can fold secondary content this way (technical details, logs, long excerpts).\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 of the request 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, copy_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, only what blocks the request and prevents you from completing it, never a point already carried by a task, a checklist item or a question (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 something blocks the work and prevents you from completing it, leave it to your user 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 that blocks the request: 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`.
@@ -15,11 +15,12 @@ Your token covers exactly one space, with the rights of the user who created the
15
15
 
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
- - 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 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.
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 can carry a checklist and test checkpoints that each tester (assignee) marks ok, ko, blocked or untested. Its type, standard or test, is only an indicator of what it is about: it restricts neither. 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, checkpoint comments and free answers to questions: such an image is an attachment of the task, referenced in the text as \`![file name](attachment:<id>)\`, and get_task flags the comments, checkpoint comments and free answers 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 request can carry **images** its author pasted in its text (\`![file name](attachment:<id>)\`): claim_request lists them with their id. Open them with get_attachment, and attach the ones that explain a task you create or change with copy_attachment, which copies the file on the site: the task then reads without the request.
21
21
  - 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…).
22
22
  - **Mentions**: a text mentions a task by its key (\`ORG-30\`), which the site shows as a button with the task's status and its key or current title, and a page of the space by a markdown link to its address, which the site shows as a pill named after the current name of its target (the link text is only a fallback): \`[Tableau de bord](#/tableau-de-bord)\`. An address without a space designates the space of the text; members' mentions carry it (\`#/espaces/<space id>/…\`). Addresses: dashboard \`#/tableau-de-bord\`, one of the reader's views \`#/tableau-de-bord/vue/<view id>\`, ideas \`#/idees\`, notes \`#/notes\`, a note \`#/notes/<note id>\`, documents \`#/documents\`, a document \`#/documents/<document id>\`, the agent page \`#/agent\` and its tabs \`#/agent/file\`, \`#/agent/en-traitement\`, \`#/agent/en-attente\`, \`#/agent/traitees\`, \`#/agent/annulees\`, history \`#/historique\`, space settings \`#/espace\`. Write mentions the same way in your descriptions, comments and replies.
23
+ - **Folded blocks**: in a description, a comment or a note, \`<details>\` on its own line, then \`<summary>Title</summary>\` on its own line, the markdown content, and \`</details>\` on its own line show the content folded behind its title until a member clicks it; blocks can nest. Other HTML is shown as text. You can fold secondary content this way (technical details, logs, long excerpts).
23
24
  - 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.
24
25
  - 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.
25
26
  - 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.
@@ -34,10 +35,10 @@ Work loop, when the user asks you to process the queue:
34
35
  2. 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.
35
36
  3. Read what you need with get_task and search_tasks, with get_attachment for an image of the request 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.
36
37
  4. Act with create_task, update_task, set_assignees, set_tags, edit_checklist, edit_questions, add_comment, add_attachment, copy_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 — always passing the request_id. Each write is one undoable action of the batch.
37
- 5. 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.
38
+ 5. complete_request with a short reply in the author's language and, in follow_ups, only what blocks the request and prevents you from completing it, never a point already carried by a task, a checklist item or a question (or fail_request with the reason), then go back to step 1 until no request is pending.
38
39
  When the queue is empty, tell the user.
39
40
 
40
- Direct 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.
41
+ Direct 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 something blocks the work and prevents you from completing it, leave it to your user with report_direct.
41
42
 
42
43
  Notifications: 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] … la veille échoue" 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.
43
44
 
@@ -47,7 +48,7 @@ How to handle each kind of request:
47
48
  - **remark** and **message**: do whatever is useful — answer, update or create tasks, comment — and say what you did in the reply.
48
49
  - **idea_promotion**: turn the context idea into a well-formed task with promote_idea.
49
50
 
50
- Rules: 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.`;
51
+ Rules: 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 that blocks the request: 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.`;
51
52
  /** Hôtes de la machine locale, seuls admis en http. */
52
53
  const LOCAL_HOSTNAMES = new Set(["localhost", "127.0.0.1", "[::1]"]);
53
54
  /** Variable d'environnement non vide, ou null. */
@@ -3,7 +3,7 @@ import { POMODORO_LIMITS } from "../../shared/logic/timer.js";
3
3
  import { HISTORY_CATEGORIES, MAX_HISTORY_PAGE } from "../../shared/schemas/history-api.schema.js";
4
4
  import { MAX_BOARD_VIEW_NAME_LENGTH, MAX_QUESTION_LENGTH, MAX_QUESTION_OPTION_DETAIL_LENGTH, MAX_QUESTION_OPTION_LABEL_LENGTH, MAX_QUESTION_OPTIONS, } from "../../shared/schemas/entities.schema.js";
5
5
  import { MAX_TAG_LENGTH, MAX_TASK_TITLE_LENGTH } from "../../shared/schemas/tasks-api.schema.js";
6
- import { MAX_CHECKLIST_ITEM_LENGTH, MAX_CHECKLIST_OPERATIONS, MAX_COMMENT_LENGTH, MAX_FOLLOW_UP_LENGTH, MAX_FOLLOW_UPS, MAX_IDEA_LENGTH, MAX_QUESTION_OPERATIONS, MAX_REASON_LENGTH, MAX_REPLY_LENGTH, MAX_REQUEST_LIST_LIMIT, MAX_SEARCH_LIMIT, } from "../../shared/schemas/agent-tools.schema.js";
6
+ import { CHECKLIST_LISTS, MAX_CHECKLIST_ITEM_LENGTH, MAX_CHECKLIST_OPERATIONS, MAX_COMMENT_LENGTH, MAX_FOLLOW_UP_LENGTH, MAX_FOLLOW_UPS, MAX_IDEA_LENGTH, MAX_QUESTION_OPERATIONS, MAX_REASON_LENGTH, MAX_REPLY_LENGTH, MAX_REQUEST_LIST_LIMIT, MAX_SEARCH_LIMIT, } from "../../shared/schemas/agent-tools.schema.js";
7
7
  /** Argument d'appel d'outil inutilisable pour former la requête. */
8
8
  export class ToolArgumentError extends Error {
9
9
  constructor(message) {
@@ -108,7 +108,7 @@ export const AGENT_TOOLS = [
108
108
  path: "tasks/{task}",
109
109
  definition: {
110
110
  name: "get_task",
111
- description: "Read one task of your space in detail: fields, parents, assignees, tags, description, questions with their options and the members' answers (ids needed by edit_questions), checklist items or test checkpoints (with their ids, needed by edit_checklist), sub-tasks, recent comments and attachments with their id (open them with get_attachment). Use it before modifying a task.",
111
+ description: "Read one task of your space in detail: fields, parents, assignees, tags, description, questions with their options and the members' answers (ids needed by edit_questions), checklist items and test checkpoints (with their ids, needed by edit_checklist), sub-tasks, recent comments and attachments with their id (open them with get_attachment). Use it before modifying a task.",
112
112
  inputSchema: { type: "object", properties: { task: TASK_REF }, required: ["task"], additionalProperties: false },
113
113
  },
114
114
  },
@@ -229,7 +229,7 @@ export const AGENT_TOOLS = [
229
229
  path: "tasks",
230
230
  definition: {
231
231
  name: "create_task",
232
- description: "Create a task in your space: a top-level task, or a sub-task / sub-sub-task with parent (two levels at most). Use type test for a task whose checkpoints testers verify. Search first with search_tasks to avoid duplicates. It goes at the bottom of its column.",
232
+ description: "Create a task in your space: a top-level task, or a sub-task / sub-sub-task with parent (two levels at most). Use type test for a task whose main purpose is to be verified by testers; the type is only an indicator: any task can carry a checklist and test checkpoints (edit_checklist). Search first with search_tasks to avoid duplicates. It goes at the bottom of its column.",
233
233
  inputSchema: {
234
234
  type: "object",
235
235
  properties: {
@@ -318,12 +318,17 @@ export const AGENT_TOOLS = [
318
318
  path: "tasks/{task}/checklist",
319
319
  definition: {
320
320
  name: "edit_checklist",
321
- description: "Edit the checklist of a standard task (add, rename, check or uncheck, move, delete items) or the checkpoints of a test task (add, rename, move, delete; testers record the results themselves). An item is added at the end, or right after after_item_id (null: first); move places an item right after after_item_id (null: first). Operations apply in order, all or nothing. Item ids come from get_task.",
321
+ description: "Edit the checklist of a task (add, rename, check or uncheck, move, delete items) or its test checkpoints (add, rename, move, delete; testers record the results themselves). Any task can carry both, whatever its type: list chooses which one you edit. An item is added at the end, or right after after_item_id (null: first); move places an item right after after_item_id (null: first). Operations apply in order, all or nothing. Item ids come from get_task.",
322
322
  inputSchema: {
323
323
  type: "object",
324
324
  properties: {
325
325
  request_id: REQUEST_ID,
326
326
  task: TASK_REF,
327
+ list: {
328
+ type: "string",
329
+ enum: [...CHECKLIST_LISTS],
330
+ description: "checklist: items members check off; checkpoints: test checkpoints testers mark ok, ko, blocked or untested. Omitted: the checklist of a standard task, the checkpoints of a test task.",
331
+ },
327
332
  operations: {
328
333
  type: "array",
329
334
  minItems: 1,
@@ -338,7 +343,7 @@ export const AGENT_TOOLS = [
338
343
  type: ["string", "null"],
339
344
  description: "add (optional) / move (required): id of the item to place it right after; null places it first. Omitted on add: at the end.",
340
345
  },
341
- done: { type: "boolean", description: "update, standard task only: check (true) or uncheck (false) the item." },
346
+ done: { type: "boolean", description: "update, checklist only: check (true) or uncheck (false) the item." },
342
347
  },
343
348
  required: ["action"],
344
349
  additionalProperties: false,
@@ -370,7 +375,7 @@ export const AGENT_TOOLS = [
370
375
  properties: {
371
376
  action: { type: "string", enum: ["add_question", "update_question", "delete_question", "add_option", "update_option", "delete_option"] },
372
377
  text: { type: "string", maxLength: MAX_QUESTION_LENGTH, description: "add_question: the question; update_question: its new wording." },
373
- multiple: { type: "boolean", description: "add_question / update_question: true lets the members pick several options. Default: false (a single option, or a free answer)." },
378
+ multiple: { type: "boolean", description: "add_question / update_question: true lets the members pick several options. Default: false (a single option, which a free answer may complete)." },
374
379
  options: {
375
380
  type: "array",
376
381
  maxItems: MAX_QUESTION_OPTIONS,
@@ -632,7 +637,7 @@ export const AGENT_TOOLS = [
632
637
  path: "requests/{request_id}/complete",
633
638
  definition: {
634
639
  name: "complete_request",
635
- description: "Finish a processing request with your reply to its author: a short markdown report in the author's language saying what you did (tasks created or changed, where the idea went) or answering their message. Put in follow_ups every point the author still has to handle themselves (a decision to make, a person to assign, something you could not do or understand); leave it empty when everything is done. Each point becomes a checkbox that the members of the space tick off; the author is notified, and the request stays in their waiting list, in orange, until every point is checked. Call it last.",
640
+ description: "Finish a processing request with your reply to its author: a short markdown report in the author's language saying what you did (tasks created or changed, where the idea went) or answering their message. Put in follow_ups only what blocks this request and prevents you from completing it: information you lack, a decision without which you could not act, an action you have no right to perform. Never put there a point already carried by a task, a checklist item or a question you created or updated: the members see it on the task, and a checkbox repeating it is noise. Leave follow_ups empty in most cases. Each point becomes a checkbox that the members of the space tick off; the author is notified, and the request stays in their waiting list, in orange, until every point is checked. Call it last.",
636
641
  inputSchema: {
637
642
  type: "object",
638
643
  properties: {
@@ -646,7 +651,7 @@ export const AGENT_TOOLS = [
646
651
  type: "array",
647
652
  maxItems: MAX_FOLLOW_UPS,
648
653
  items: { type: "string", maxLength: MAX_FOLLOW_UP_LENGTH },
649
- description: "What the author still has to do, one short actionable sentence each. Empty or omitted when everything is handled.",
654
+ description: "Only what blocks this request and prevents you from completing it, one short actionable sentence each. Never a point already carried by a task, a checklist item or a question. Empty or omitted in most cases.",
650
655
  },
651
656
  },
652
657
  required: ["request_id", "reply"],
@@ -659,7 +664,7 @@ export const AGENT_TOOLS = [
659
664
  path: "requests",
660
665
  definition: {
661
666
  name: "report_direct",
662
- description: "After direct work (writes without request_id), leave your token's owner the points they still have to handle: a decision to make, something to check or finish. It adds to the requests of the space a done direct request with your reply and the points as checkboxes; the owner is notified, and the request stays in their waiting list, in orange, until every point is checked. Do not use it while processing a request: complete_request carries its points. The site runner cannot use it.",
667
+ description: "After direct work (writes without request_id), leave your token's owner only what blocks the work they asked for and prevents you from completing it: information you lack, a decision without which you could not act, an action you have no right to perform. Never a point already carried by a task, a checklist item or a question you created or updated: the members see it on the task. When nothing blocks, do not call it. It adds to the requests of the space a done direct request with your reply and the points as checkboxes; the owner is notified, and the request stays in their waiting list, in orange, until every point is checked. Do not use it while processing a request: complete_request carries its points. The site runner cannot use it.",
663
668
  inputSchema: {
664
669
  type: "object",
665
670
  properties: {
@@ -673,7 +678,7 @@ export const AGENT_TOOLS = [
673
678
  minItems: 1,
674
679
  maxItems: MAX_FOLLOW_UPS,
675
680
  items: { type: "string", maxLength: MAX_FOLLOW_UP_LENGTH },
676
- description: "What the owner still has to do, one short actionable sentence each.",
681
+ description: "Only what blocks the work and prevents you from completing it, one short actionable sentence each. Never a point already carried by a task, a checklist item or a question.",
677
682
  },
678
683
  },
679
684
  required: ["reply", "follow_ups"],