boondmanager-mcp-server 2.16.0 → 2.18.0

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 (285) hide show
  1. package/README.md +57 -4
  2. package/dist/config/access-policy.d.ts.map +1 -1
  3. package/dist/config/access-policy.js +6 -18
  4. package/dist/config/access-policy.js.map +1 -1
  5. package/dist/config/dictionary-overrides.d.ts.map +1 -1
  6. package/dist/config/dictionary-overrides.js +2 -12
  7. package/dist/config/dictionary-overrides.js.map +1 -1
  8. package/dist/config/env.d.ts +63 -0
  9. package/dist/config/env.d.ts.map +1 -0
  10. package/dist/config/env.js +116 -0
  11. package/dist/config/env.js.map +1 -0
  12. package/dist/config/profiles.d.ts +22 -8
  13. package/dist/config/profiles.d.ts.map +1 -1
  14. package/dist/config/profiles.js +48 -4
  15. package/dist/config/profiles.js.map +1 -1
  16. package/dist/config/transport-kind.d.ts +8 -0
  17. package/dist/config/transport-kind.d.ts.map +1 -0
  18. package/dist/config/transport-kind.js +13 -0
  19. package/dist/config/transport-kind.js.map +1 -0
  20. package/dist/constants.d.ts +20 -2
  21. package/dist/constants.d.ts.map +1 -1
  22. package/dist/constants.js +32 -1
  23. package/dist/constants.js.map +1 -1
  24. package/dist/icons.d.ts.map +1 -1
  25. package/dist/icons.js +6 -1
  26. package/dist/icons.js.map +1 -1
  27. package/dist/index.js +32 -20
  28. package/dist/index.js.map +1 -1
  29. package/dist/instructions.d.ts +1 -1
  30. package/dist/instructions.d.ts.map +1 -1
  31. package/dist/instructions.js +6 -6
  32. package/dist/instructions.js.map +1 -1
  33. package/dist/prompts/index.d.ts +19 -1
  34. package/dist/prompts/index.d.ts.map +1 -1
  35. package/dist/prompts/index.js +495 -25
  36. package/dist/prompts/index.js.map +1 -1
  37. package/dist/prompts/periods.d.ts +45 -0
  38. package/dist/prompts/periods.d.ts.map +1 -0
  39. package/dist/prompts/periods.js +154 -0
  40. package/dist/prompts/periods.js.map +1 -0
  41. package/dist/resources/index.d.ts +14 -0
  42. package/dist/resources/index.d.ts.map +1 -1
  43. package/dist/resources/index.js +285 -0
  44. package/dist/resources/index.js.map +1 -1
  45. package/dist/resources/templates.d.ts +1 -1
  46. package/dist/resources/templates.d.ts.map +1 -1
  47. package/dist/resources/templates.js +2 -0
  48. package/dist/resources/templates.js.map +1 -1
  49. package/dist/schema-dialect.js.map +1 -1
  50. package/dist/schemas/filter-aliases.d.ts +1 -1
  51. package/dist/schemas/filter-aliases.d.ts.map +1 -1
  52. package/dist/schemas/filter-aliases.js +101 -2
  53. package/dist/schemas/filter-aliases.js.map +1 -1
  54. package/dist/schemas/index.d.ts +1045 -163
  55. package/dist/schemas/index.d.ts.map +1 -1
  56. package/dist/schemas/index.js +979 -330
  57. package/dist/schemas/index.js.map +1 -1
  58. package/dist/server.d.ts.map +1 -1
  59. package/dist/server.js +10 -3
  60. package/dist/server.js.map +1 -1
  61. package/dist/services/boond-client.d.ts +29 -213
  62. package/dist/services/boond-client.d.ts.map +1 -1
  63. package/dist/services/boond-client.js +29 -1168
  64. package/dist/services/boond-client.js.map +1 -1
  65. package/dist/services/dictionary.d.ts +27 -3
  66. package/dist/services/dictionary.d.ts.map +1 -1
  67. package/dist/services/dictionary.js +60 -23
  68. package/dist/services/dictionary.js.map +1 -1
  69. package/dist/services/document-text.d.ts +32 -0
  70. package/dist/services/document-text.d.ts.map +1 -0
  71. package/dist/services/document-text.js +120 -0
  72. package/dist/services/document-text.js.map +1 -0
  73. package/dist/services/format/detail.d.ts +16 -0
  74. package/dist/services/format/detail.d.ts.map +1 -0
  75. package/dist/services/format/detail.js +36 -0
  76. package/dist/services/format/detail.js.map +1 -0
  77. package/dist/services/format/html.d.ts +19 -0
  78. package/dist/services/format/html.d.ts.map +1 -0
  79. package/dist/services/format/html.js +87 -0
  80. package/dist/services/format/html.js.map +1 -0
  81. package/dist/services/format/list.d.ts +3 -0
  82. package/dist/services/format/list.d.ts.map +1 -0
  83. package/dist/services/format/list.js +44 -0
  84. package/dist/services/format/list.js.map +1 -0
  85. package/dist/services/format/summary.d.ts +23 -0
  86. package/dist/services/format/summary.d.ts.map +1 -0
  87. package/dist/services/format/summary.js +194 -0
  88. package/dist/services/format/summary.js.map +1 -0
  89. package/dist/services/format/tab.d.ts +9 -0
  90. package/dist/services/format/tab.d.ts.map +1 -0
  91. package/dist/services/format/tab.js +32 -0
  92. package/dist/services/format/tab.js.map +1 -0
  93. package/dist/services/http/auth.d.ts +44 -0
  94. package/dist/services/http/auth.d.ts.map +1 -0
  95. package/dist/services/http/auth.js +146 -0
  96. package/dist/services/http/auth.js.map +1 -0
  97. package/dist/services/http/download.d.ts +60 -0
  98. package/dist/services/http/download.d.ts.map +1 -0
  99. package/dist/services/http/download.js +160 -0
  100. package/dist/services/http/download.js.map +1 -0
  101. package/dist/services/http/errors.d.ts +45 -0
  102. package/dist/services/http/errors.d.ts.map +1 -0
  103. package/dist/services/http/errors.js +188 -0
  104. package/dist/services/http/errors.js.map +1 -0
  105. package/dist/services/http/rate-limit.d.ts +40 -0
  106. package/dist/services/http/rate-limit.d.ts.map +1 -0
  107. package/dist/services/http/rate-limit.js +92 -0
  108. package/dist/services/http/rate-limit.js.map +1 -0
  109. package/dist/services/http/retry.d.ts +46 -0
  110. package/dist/services/http/retry.d.ts.map +1 -0
  111. package/dist/services/http/retry.js +101 -0
  112. package/dist/services/http/retry.js.map +1 -0
  113. package/dist/services/http/transport.d.ts +85 -0
  114. package/dist/services/http/transport.d.ts.map +1 -0
  115. package/dist/services/http/transport.js +283 -0
  116. package/dist/services/http/transport.js.map +1 -0
  117. package/dist/services/logger.d.ts +53 -2
  118. package/dist/services/logger.d.ts.map +1 -1
  119. package/dist/services/logger.js +82 -21
  120. package/dist/services/logger.js.map +1 -1
  121. package/dist/services/oauth.d.ts +12 -0
  122. package/dist/services/oauth.d.ts.map +1 -1
  123. package/dist/services/oauth.js +21 -8
  124. package/dist/services/oauth.js.map +1 -1
  125. package/dist/services/rate-limiter.d.ts +9 -2
  126. package/dist/services/rate-limiter.d.ts.map +1 -1
  127. package/dist/services/rate-limiter.js +18 -6
  128. package/dist/services/rate-limiter.js.map +1 -1
  129. package/dist/services/request-context.d.ts +47 -0
  130. package/dist/services/request-context.d.ts.map +1 -0
  131. package/dist/services/request-context.js +112 -0
  132. package/dist/services/request-context.js.map +1 -0
  133. package/dist/services/search.d.ts +26 -0
  134. package/dist/services/search.d.ts.map +1 -0
  135. package/dist/services/search.js +98 -0
  136. package/dist/services/search.js.map +1 -0
  137. package/dist/services/update-checker.d.ts.map +1 -1
  138. package/dist/services/update-checker.js +15 -8
  139. package/dist/services/update-checker.js.map +1 -1
  140. package/dist/services/upload-source.d.ts +31 -0
  141. package/dist/services/upload-source.d.ts.map +1 -0
  142. package/dist/services/upload-source.js +180 -0
  143. package/dist/services/upload-source.js.map +1 -0
  144. package/dist/tools/absences.d.ts +9 -0
  145. package/dist/tools/absences.d.ts.map +1 -1
  146. package/dist/tools/absences.js +65 -20
  147. package/dist/tools/absences.js.map +1 -1
  148. package/dist/tools/actions.d.ts.map +1 -1
  149. package/dist/tools/actions.js +11 -27
  150. package/dist/tools/actions.js.map +1 -1
  151. package/dist/tools/advantages.d.ts +2 -0
  152. package/dist/tools/advantages.d.ts.map +1 -1
  153. package/dist/tools/advantages.js +66 -13
  154. package/dist/tools/advantages.js.map +1 -1
  155. package/dist/tools/alerts.d.ts +18 -0
  156. package/dist/tools/alerts.d.ts.map +1 -0
  157. package/dist/tools/alerts.js +82 -0
  158. package/dist/tools/alerts.js.map +1 -0
  159. package/dist/tools/application.d.ts +2 -1
  160. package/dist/tools/application.d.ts.map +1 -1
  161. package/dist/tools/application.js +9 -3
  162. package/dist/tools/application.js.map +1 -1
  163. package/dist/tools/candidates.d.ts +7 -0
  164. package/dist/tools/candidates.d.ts.map +1 -1
  165. package/dist/tools/candidates.js +96 -1
  166. package/dist/tools/candidates.js.map +1 -1
  167. package/dist/tools/contacts.d.ts.map +1 -1
  168. package/dist/tools/contacts.js +3 -7
  169. package/dist/tools/contacts.js.map +1 -1
  170. package/dist/tools/contracts.d.ts +22 -0
  171. package/dist/tools/contracts.d.ts.map +1 -1
  172. package/dist/tools/contracts.js +185 -52
  173. package/dist/tools/contracts.js.map +1 -1
  174. package/dist/tools/crud-factory.d.ts +33 -2
  175. package/dist/tools/crud-factory.d.ts.map +1 -1
  176. package/dist/tools/crud-factory.js +45 -17
  177. package/dist/tools/crud-factory.js.map +1 -1
  178. package/dist/tools/deliveries.d.ts +3 -0
  179. package/dist/tools/deliveries.d.ts.map +1 -1
  180. package/dist/tools/deliveries.js +50 -94
  181. package/dist/tools/deliveries.js.map +1 -1
  182. package/dist/tools/description-builders.d.ts +0 -1
  183. package/dist/tools/description-builders.d.ts.map +1 -1
  184. package/dist/tools/description-builders.js +47 -4
  185. package/dist/tools/description-builders.js.map +1 -1
  186. package/dist/tools/documents.d.ts.map +1 -1
  187. package/dist/tools/documents.js +113 -27
  188. package/dist/tools/documents.js.map +1 -1
  189. package/dist/tools/expenses.d.ts.map +1 -1
  190. package/dist/tools/expenses.js +2 -11
  191. package/dist/tools/expenses.js.map +1 -1
  192. package/dist/tools/find.d.ts +61 -0
  193. package/dist/tools/find.d.ts.map +1 -0
  194. package/dist/tools/find.js +221 -0
  195. package/dist/tools/find.js.map +1 -0
  196. package/dist/tools/flags.d.ts +5 -0
  197. package/dist/tools/flags.d.ts.map +1 -1
  198. package/dist/tools/flags.js +116 -1
  199. package/dist/tools/flags.js.map +1 -1
  200. package/dist/tools/forms.d.ts +5 -0
  201. package/dist/tools/forms.d.ts.map +1 -0
  202. package/dist/tools/forms.js +64 -0
  203. package/dist/tools/forms.js.map +1 -0
  204. package/dist/tools/groupments.d.ts +5 -0
  205. package/dist/tools/groupments.d.ts.map +1 -0
  206. package/dist/tools/groupments.js +68 -0
  207. package/dist/tools/groupments.js.map +1 -0
  208. package/dist/tools/inactivities.d.ts +5 -0
  209. package/dist/tools/inactivities.d.ts.map +1 -0
  210. package/dist/tools/inactivities.js +59 -0
  211. package/dist/tools/inactivities.js.map +1 -0
  212. package/dist/tools/index.d.ts +4 -0
  213. package/dist/tools/index.d.ts.map +1 -1
  214. package/dist/tools/index.js +4 -0
  215. package/dist/tools/index.js.map +1 -1
  216. package/dist/tools/invoices.d.ts.map +1 -1
  217. package/dist/tools/invoices.js +27 -2
  218. package/dist/tools/invoices.js.map +1 -1
  219. package/dist/tools/linked-entity-filters.d.ts +48 -0
  220. package/dist/tools/linked-entity-filters.d.ts.map +1 -0
  221. package/dist/tools/linked-entity-filters.js +64 -0
  222. package/dist/tools/linked-entity-filters.js.map +1 -0
  223. package/dist/tools/notifications.d.ts.map +1 -1
  224. package/dist/tools/notifications.js +0 -5
  225. package/dist/tools/notifications.js.map +1 -1
  226. package/dist/tools/orders.d.ts.map +1 -1
  227. package/dist/tools/orders.js +33 -4
  228. package/dist/tools/orders.js.map +1 -1
  229. package/dist/tools/parameter-disclosure.js.map +1 -1
  230. package/dist/tools/payments.d.ts +3 -0
  231. package/dist/tools/payments.d.ts.map +1 -1
  232. package/dist/tools/payments.js +43 -109
  233. package/dist/tools/payments.js.map +1 -1
  234. package/dist/tools/positionings.d.ts.map +1 -1
  235. package/dist/tools/positionings.js +9 -39
  236. package/dist/tools/positionings.js.map +1 -1
  237. package/dist/tools/projects.d.ts.map +1 -1
  238. package/dist/tools/projects.js +5 -12
  239. package/dist/tools/projects.js.map +1 -1
  240. package/dist/tools/provider-invoices.d.ts +2 -0
  241. package/dist/tools/provider-invoices.d.ts.map +1 -1
  242. package/dist/tools/provider-invoices.js +30 -111
  243. package/dist/tools/provider-invoices.js.map +1 -1
  244. package/dist/tools/purchases.d.ts +2 -0
  245. package/dist/tools/purchases.d.ts.map +1 -1
  246. package/dist/tools/purchases.js +50 -104
  247. package/dist/tools/purchases.js.map +1 -1
  248. package/dist/tools/registration-decorators.d.ts +28 -0
  249. package/dist/tools/registration-decorators.d.ts.map +1 -1
  250. package/dist/tools/registration-decorators.js +107 -0
  251. package/dist/tools/registration-decorators.js.map +1 -1
  252. package/dist/tools/resources.d.ts.map +1 -1
  253. package/dist/tools/resources.js +27 -5
  254. package/dist/tools/resources.js.map +1 -1
  255. package/dist/tools/rights.d.ts +101 -0
  256. package/dist/tools/rights.d.ts.map +1 -0
  257. package/dist/tools/rights.js +75 -0
  258. package/dist/tools/rights.js.map +1 -0
  259. package/dist/tools/tab-tools.js +3 -3
  260. package/dist/tools/tab-tools.js.map +1 -1
  261. package/dist/tools/timesheets.d.ts +29 -0
  262. package/dist/tools/timesheets.d.ts.map +1 -1
  263. package/dist/tools/timesheets.js +196 -126
  264. package/dist/tools/timesheets.js.map +1 -1
  265. package/dist/tools/todolists.d.ts +2 -0
  266. package/dist/tools/todolists.d.ts.map +1 -1
  267. package/dist/tools/todolists.js +64 -1
  268. package/dist/tools/todolists.js.map +1 -1
  269. package/dist/tools/usage-guidance.d.ts.map +1 -1
  270. package/dist/tools/usage-guidance.js +12 -3
  271. package/dist/tools/usage-guidance.js.map +1 -1
  272. package/dist/tools/validations.d.ts +9 -0
  273. package/dist/tools/validations.d.ts.map +1 -1
  274. package/dist/tools/validations.js +86 -9
  275. package/dist/tools/validations.js.map +1 -1
  276. package/dist/tools/workflows.js +1 -1
  277. package/dist/tools/workflows.js.map +1 -1
  278. package/dist/transports/http.d.ts +116 -0
  279. package/dist/transports/http.d.ts.map +1 -1
  280. package/dist/transports/http.js +422 -92
  281. package/dist/transports/http.js.map +1 -1
  282. package/dist/types.d.ts +3 -3
  283. package/dist/types.d.ts.map +1 -1
  284. package/manifest.json +2 -2
  285. package/package.json +6 -5
@@ -0,0 +1,75 @@
1
+ import { z } from "zod";
2
+ import { apiRequest, formatDetailResponse } from "../services/boond-client.js";
3
+ import { EntityIdSchema } from "../schemas/index.js";
4
+ import { isDomainAllowed } from "../config/access-policy.js";
5
+ import { composeDescription } from "./description-builders.js";
6
+ /**
7
+ * `boond_rights_get` (issue #257): what the authenticated user may do on one
8
+ * record, from `GET /{collection}/{id}/rights` — a route the RAML documents on
9
+ * every entity below and that no tool exposed. A 403 avoided is cheaper than a
10
+ * 403 explained: the model can tell the user "vous n'avez pas le droit de
11
+ * supprimer cette facture" before trying.
12
+ *
13
+ * One tool parameterised by entity rather than 25 `*_rights` tabs: the route
14
+ * shape is identical everywhere and the payload is rendered as-is.
15
+ */
16
+ export const RIGHTS_ENTITIES = {
17
+ candidate: { path: "/candidates", domain: "candidates" },
18
+ resource: { path: "/resources", domain: "resources" },
19
+ contact: { path: "/contacts", domain: "contacts" },
20
+ company: { path: "/companies", domain: "companies" },
21
+ opportunity: { path: "/opportunities", domain: "opportunities" },
22
+ project: { path: "/projects", domain: "projects" },
23
+ action: { path: "/actions", domain: "actions" },
24
+ positioning: { path: "/positionings", domain: "positionings" },
25
+ invoice: { path: "/invoices", domain: "invoices" },
26
+ order: { path: "/orders", domain: "orders" },
27
+ delivery: { path: "/deliveries", domain: "deliveries" },
28
+ purchase: { path: "/purchases", domain: "purchases" },
29
+ payment: { path: "/payments", domain: "payments" },
30
+ providerInvoice: { path: "/provider-invoices", domain: "provider-invoices" },
31
+ product: { path: "/products", domain: "products" },
32
+ contract: { path: "/contracts", domain: "contracts" },
33
+ advantage: { path: "/advantages", domain: "advantages" },
34
+ timesReport: { path: "/times-reports", domain: "timesheets" },
35
+ expensesReport: { path: "/expenses-reports", domain: "expenses" },
36
+ absencesReport: { path: "/absences-reports", domain: "absences" },
37
+ agency: { path: "/agencies", domain: "agencies" },
38
+ };
39
+ const ALL_RIGHTS_ENTITIES = Object.keys(RIGHTS_ENTITIES);
40
+ export function registerRightsTool(server, policy) {
41
+ const entities = ALL_RIGHTS_ENTITIES.filter((e) => !policy || isDomainAllowed(policy, RIGHTS_ENTITIES[e].domain));
42
+ const [first, ...rest] = entities;
43
+ if (first === undefined)
44
+ return;
45
+ const RightsSchema = z
46
+ .object({
47
+ entity: z.enum([first, ...rest]).describe("Type de l'enregistrement."),
48
+ id: EntityIdSchema.describe("ID numérique de l'enregistrement."),
49
+ })
50
+ .strict();
51
+ server.registerTool("boond_rights_get", {
52
+ title: "Droits de l'utilisateur sur un enregistrement",
53
+ description: composeDescription({
54
+ purpose: "Renvoie les droits de l'utilisateur authentifié sur un enregistrement précis (lecture, écriture, suppression, actions du workflow…), tels que BoondManager les publie sur `GET /{entité}/{id}/rights`.",
55
+ when: "avant un `*_update` ou un `*_delete` dont l'issue est incertaine (fiche d'une autre agence, document validé, facture clôturée) — un 403 évité coûte moins qu'un 403 expliqué.",
56
+ instead: "`boond://application/current-user/rights` pour les droits *globaux* par entité (création, périmètre) ; cet outil est le droit sur **un** enregistrement.",
57
+ behaviour: [
58
+ "Lecture seule ; le payload est rendu tel quel — les clés varient selon l'entité (`canWrite`, `canDelete`, `canValidate`…) et n'ont pas été normalisées, la RAML ne les documente pas.",
59
+ "Les entités proposées suivent la politique d'accès du serveur.",
60
+ ],
61
+ returns: "JSON des droits sur l'enregistrement.",
62
+ }),
63
+ inputSchema: RightsSchema,
64
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
65
+ }, async (params) => {
66
+ const { entity, id } = params;
67
+ const response = await apiRequest(`${RIGHTS_ENTITIES[entity].path}/${id}/rights`);
68
+ return {
69
+ content: [
70
+ { type: "text", text: `Droits sur ${entity} #${id} :\n\n${formatDetailResponse(response)}` },
71
+ ],
72
+ };
73
+ });
74
+ }
75
+ //# sourceMappingURL=rights.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rights.js","sourceRoot":"","sources":["../../src/tools/rights.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAEhF,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;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J,SAAS,EAAE;gBACT,uLAAuL;gBACvL,gEAAgE;aACjE;YACD,OAAO,EAAE,uCAAuC;SACjD,CAAC;QACF,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;KACxG,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACf,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;QAC9B,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,IAAI,IAAI,EAAE,SAAS,CAAC,CAAC;QAClF,OAAO;YACL,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,cAAc,MAAM,KAAK,EAAE,SAAS,oBAAoB,CAAC,QAAQ,CAAC,EAAE,EAAE;aACtG;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -2,7 +2,7 @@ import { apiRequest, formatTabResponse } from "../services/boond-client.js";
2
2
  import { IdSchema } from "../schemas/index.js";
3
3
  import { tabDescription } from "./description-builders.js";
4
4
  /**
5
- * The 42 entity-tab tools (`boond_candidates_technical_data`,
5
+ * The 48 entity-tab tools (`boond_candidates_technical_data`,
6
6
  * `boond_companies_invoices`, …) were six byte-identical registration loops in
7
7
  * six domain files, each with its own copy of the `TabDefinition` interface and
8
8
  * its own hand-typed description ending in a redundant `Args: - id (string)`
@@ -30,9 +30,9 @@ export function registerTabTools(server, opts, tabs) {
30
30
  entityNamePlural: opts.entityNamePlural,
31
31
  prefix: opts.prefix,
32
32
  subject: tab.subject,
33
- content: tab.content,
33
+ ...(tab.content !== undefined ? { content: tab.content } : {}),
34
34
  returns: tab.returns,
35
- behaviour: tab.behaviour,
35
+ ...(tab.behaviour !== undefined ? { behaviour: tab.behaviour } : {}),
36
36
  }),
37
37
  inputSch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;gBACpB,GAAG,CAAC,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACrE,CAAC;YACF,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,oBAAoB;SAClC,EACD,KAAK,EAAE,MAAe,EAAE,EAAE;YACxB,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,GAAG,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC,EAAE,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;YAC7E,MAAM,IAAI,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;YACzC,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC;aAC3C,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,3 +1,32 @@
1
1
  import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { TimesheetLineInput } from "../schemas/index.js";
3
+ import type { JsonApiResource, JsonApiResponse } from "../types.js";
4
+ /**
5
+ * One CRA line, as the API stores it: nested `workUnitType`, `project`,
6
+ * `delivery`, `batch` objects around the flat ids the schema takes. A missing
7
+ * project / delivery / batch is sent as `null`, which is how the API itself
8
+ * represents an absence line (`GET /times-reports/{id}` → `"project": null`).
9
+ */
10
+ export declare function buildTimeLine(line: TimesheetLineInput): Record<string, unknown>;
11
+ /** Build the `/times-reports` payload: convenience ids → relationships, lines → nested objects. */
12
+ export declare function buildTimesheetBody(params: Record<string, unknown>): unknown;
13
+ /**
14
+ * Render `/times-reports/default` down to what a caller needs to write lines.
15
+ *
16
+ * The response is the only place the work-unit-type codes are published — on
17
+ * the included **resource** (`workUnitTypesAllowed`), not on the agency and not
18
+ * in `/application/dictionary` — together with the (project, delivery) pairs
19
+ * chargeable that month and the `plannedTimes` derived from the deliveries'
20
+ * planning, which are the lines a filled CRA usually repeats.
21
+ */
22
+ export declare function formatTimesheetDefaults(response: JsonApiResponse): string;
23
+ /**
24
+ * One line per times report. The rows carry no name / title, so the generic
25
+ * summary would print a bare `[timesreport #id]`; this names the window, the
26
+ * state and the totals instead. Truncation, the `shown/total` banner and the
27
+ * `fields` projection come from `formatListResponse` (#243) — this file used
28
+ * to carry its own formatter that cut mid-line and crashed on `data: null`.
29
+ */
30
+ export declare function timesheetSummary(item: JsonApiResource): string;
2
31
  export declare function registerTimesheetTools(server: McpServer): void;
3
32
  //# sourceMappingURL=timesheets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"timesheets.d.ts","sourceRoot":"","sources":["../../src/tools/timesheets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA8DzE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA4I9D"}
1
+ {"version":3,"file":"timesheets.d.ts","sourceRoot":"","sources":["../../src/tools/timesheets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAQzE,OAAO,KAAK,EAAiD,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAS7G,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGpE;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAS/E;AAED,mGAAmG;AACnG,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAW3E;AAgBD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAqFzE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAY9D;AASD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAiH9D"}
@@ -1,105 +1,209 @@
1
- import { ResourceTimesheetSchema, TimesheetSearchSchema, TimesheetGetSchema } from "../schemas/index.js";
2
- import { apiRequest, apiSearch, buildSearchQuery, formatDetailResponse } from "../services/boond-client.js";
3
- import { progressReporterFrom } from "../services/progress.js";
4
- import { buildJsonApiBody } from "./crud-factory.js";
5
- import { CHARACTER_LIMIT } from "../constants.js";
6
- import { z } from "zod";
1
+ import { ResourceTimesheetSchema, TimesheetCreateSchema, TimesheetDefaultSchema, TimesheetSearchSchema, TimesheetUpdateSchema, } from "../schemas/index.js";
2
+ import { apiRequest, formatListResponse } from "../services/boond-client.js";
3
+ import { buildJsonApiBody, registerCreateTool, registerGetTool, registerSearchTool, registerUpdateTool, } from "./crud-factory.js";
7
4
  import { composeDescription } from "./description-builders.js";
8
- const TimesheetCreateSchema = z
9
- .object({
10
- resourceId: z.string().min(1).describe("ID de la ressource"),
11
- projectId: z.string().optional().describe("ID du projet"),
12
- term: z
13
- .string()
14
- .regex(/^\d{4}-\d{2}$/)
15
- .describe("Mois au format YYYY-MM"),
16
- startDate: z.string().optional().describe("Date de début (YYYY-MM-DD)"),
17
- endDate: z.string().optional().describe("Date de fin (YYYY-MM-DD)"),
18
- totalDays: z.number().optional().describe("Total jours"),
19
- totalHours: z.number().optional().describe("Total heures"),
20
- state: z.string().optional().describe("État de la feuille de temps"),
21
- note: z.string().optional().describe("Notes"),
22
- })
23
- .strict();
24
- function formatTimesheetSummary(response) {
25
- const data = Array.isArray(response.data) ? response.data : [response.data];
26
- if (data.length === 0) {
27
- return "Aucune feuille de temps trouvée.";
5
+ /**
6
+ * One CRA line, as the API stores it: nested `workUnitType`, `project`,
7
+ * `delivery`, `batch` objects around the flat ids the schema takes. A missing
8
+ * project / delivery / batch is sent as `null`, which is how the API itself
9
+ * represents an absence line (`GET /times-reports/{id}` → `"project": null`).
10
+ */
11
+ export function buildTimeLine(line) {
12
+ const { workUnitTypeReference, projectId, deliveryId, batchId, ...rest } = line;
13
+ return {
14
+ ...Object.fromEntries(Object.entries(rest).filter(([, v]) => v !== undefined)),
15
+ workUnitType: { reference: workUnitTypeReference },
16
+ project: projectId === undefined ? null : { id: projectId },
17
+ delivery: deliveryId === undefined ? null : { id: deliveryId },
18
+ batch: batchId === undefined ? null : { id: batchId },
19
+ };
20
+ }
21
+ /** Build the `/times-reports` payload: convenience ids → relationships, lines → nested objects. */
22
+ export function buildTimesheetBody(params) {
23
+ const { id, resourceId, agencyId, regularTimes, exceptionalTimes, ...attrs } = params;
24
+ const attributes = { ...attrs };
25
+ if (regularTimes !== undefined)
26
+ attributes.regularTimes = regularTimes.map(buildTimeLine);
27
+ if (exceptionalTimes !== undefined) {
28
+ attributes.exceptionalTimes = exceptionalTimes.map(buildTimeLine);
28
29
  }
29
- const lines = data.map((item) => {
30
- const attrs = item.attributes;
31
- const parts = [`[timesreport #${item.id}]`];
32
- if (attrs.startDate)
33
- parts.push(`Du: ${attrs.startDate}`);
34
- if (attrs.endDate)
35
- parts.push(`Au: ${attrs.endDate}`);
36
- if (attrs.state !== undefined)
37
- parts.push(`Statut: ${attrs.state}`);
38
- if (attrs.totalDays !== undefined)
39
- parts.push(`Jours: ${attrs.totalDays}`);
40
- if (attrs.totalHours !== undefined)
41
- parts.push(`Heures: ${attrs.totalHours}`);
42
- return parts.join(" | ");
30
+ return buildJsonApiBody("timesreport", attributes, id, {
31
+ resource: resourceId ? { id: String(resourceId), type: "resource" } : undefined,
32
+ agency: agencyId ? { id: String(agencyId), type: "agency" } : undefined,
43
33
  });
44
- const total = response.meta?.totals?.rows;
45
- let result = lines.join("\n");
46
- if (total !== undefined) {
47
- result = `Total: ${total} feuille(s) de temps\n\n${result}`;
34
+ }
35
+ /**
36
+ * Render `/times-reports/default` down to what a caller needs to write lines.
37
+ *
38
+ * The response is the only place the work-unit-type codes are published — on
39
+ * the included **resource** (`workUnitTypesAllowed`), not on the agency and not
40
+ * in `/application/dictionary` — together with the (project, delivery) pairs
41
+ * chargeable that month and the `plannedTimes` derived from the deliveries'
42
+ * planning, which are the lines a filled CRA usually repeats.
43
+ */
44
+ export function formatTimesheetDefaults(response) {
45
+ const entity = Array.isArray(response.data) ? response.data[0] : response.data;
46
+ if (!entity)
47
+ return "Aucune donnée par défaut retournée pour cette ressource / ce mois.";
48
+ const attrs = entity.attributes ?? {};
49
+ const included = response.included ?? [];
50
+ const byType = (type) => included.filter((i) => i.type === type);
51
+ const resourceRef = entity.relationships?.resource?.data;
52
+ const agencyRef = entity.relationships?.agency?.data;
53
+ const resource = byType("resource").find((r) => r.id === resourceRef?.id) ?? byType("resource")[0];
54
+ const agency = byType("agency").find((a) => a.id === agencyRef?.id) ?? byType("agency")[0];
55
+ const resourceAttrs = resource?.attributes ?? {};
56
+ const agencyAttrs = agency?.attributes ?? {};
57
+ const lines = [
58
+ `CRA — ressource #${resource?.id ?? resourceRef?.id ?? "?"}${resourceAttrs.firstName || resourceAttrs.lastName ? ` (${[resourceAttrs.firstName, resourceAttrs.lastName].filter(Boolean).join(" ")})` : ""}, mois ${String(attrs.term ?? "?")}`,
59
+ `Agence: #${agency?.id ?? "?"}${agencyAttrs.name ? ` (${String(agencyAttrs.name)})` : ""} | Unité d'œuvre: ${String(attrs.workUnitRate ?? agencyAttrs.workUnitRate ?? "?")} | Calendrier: ${String(agencyAttrs.calendar ?? "?")}`,
60
+ ];
61
+ const types = resourceAttrs.workUnitTypesAllowed ?? [];
62
+ lines.push("", `Types d'unité d'œuvre autorisés (${types.length}) — utiliser \`reference\` comme \`workUnitTypeReference\` :`);
63
+ lines.push(...(types.length
64
+ ? types.map((t) => ` reference=${t.reference} | ${t.name ?? ""} | ${t.activityType ?? ""}`)
65
+ : [" (aucun type publié pour cette ressource)"]));
66
+ const projects = byType("project");
67
+ lines.push("", `Imputations possibles (${projects.length}) — \`projectId\` / \`deliveryId\` :`);
68
+ if (projects.length === 0) {
69
+ lines.push(" (aucune imputation disponible pour cette ressource sur ce mois — seules des absences peuvent être saisies)");
70
+ }
71
+ else {
72
+ for (const p of projects) {
73
+ const ref = p.attributes?.reference ?? p.attributes?.title ?? "";
74
+ const refs = (name) => (p.relationships?.[name]?.data ?? []).map((d) => `#${d.id}`);
75
+ const deliveryIds = refs("deliveries");
76
+ const batchIds = refs("batches");
77
+ const parts = [
78
+ ` projectId=${p.id}`,
79
+ String(ref),
80
+ `deliveryId ∈ ${deliveryIds.length ? deliveryIds.join(", ") : "(aucune prestation — imputation impossible)"}`,
81
+ ];
82
+ if (batchIds.length)
83
+ parts.push(`batchId ∈ ${batchIds.join(", ")}`);
84
+ lines.push(parts.join(" | "));
85
+ }
86
+ }
87
+ const planned = attrs.plannedTimes ?? [];
88
+ const totalPlanned = planned.reduce((n, t) => n + (Number(t.duration) || 0), 0);
89
+ lines.push("", `Planning prévu (${planned.length} ligne(s), ${totalPlanned} unité(s)) — base de saisie à confirmer jour par jour :`);
90
+ if (planned.length === 0) {
91
+ lines.push(" (aucune ligne planifiée)");
92
+ }
93
+ else {
94
+ const byKey = new Map();
95
+ for (const t of planned) {
96
+ const key = `projectId=${t.project?.id ?? "-"} | deliveryId=${t.delivery?.id ?? "-"} | workUnitTypeReference=${t.workUnitType?.reference ?? "-"} (${t.workUnitType?.name ?? ""})`;
97
+ const day = t.startDate ?? "";
98
+ const cur = byKey.get(key) ?? { count: 0, duration: 0, first: day, last: day };
99
+ cur.count += 1;
100
+ cur.duration += Number(t.duration) || 0;
101
+ if (day && (cur.first === "" || day < cur.first))
102
+ cur.first = day;
103
+ if (day && day > cur.last)
104
+ cur.last = day;
105
+ byKey.set(key, cur);
106
+ }
107
+ for (const [key, v] of byKey)
108
+ lines.push(` ${key} : ${v.count} jour(s), ${v.duration} unité(s), du ${v.first} au ${v.last}`);
48
109
  }
49
- if (result.length > CHARACTER_LIMIT) {
50
- result = result.substring(0, CHARACTER_LIMIT) + "\n\n[Résultats tronqués...]";
110
+ const absences = attrs.absencesTimes ?? [];
111
+ if (absences.length) {
112
+ lines.push("", `Absences déjà posées sur le mois (${absences.length}) — ne pas les ressaisir :`);
113
+ for (const t of absences)
114
+ lines.push(` ${t.startDate ?? "?"} | ${t.duration ?? "?"} | ${t.workUnitType?.name ?? ""} (reference=${t.workUnitType?.reference ?? "?"})`);
51
115
  }
52
- return result;
116
+ return lines.join("\n");
117
+ }
118
+ /**
119
+ * One line per times report. The rows carry no name / title, so the generic
120
+ * summary would print a bare `[timesreport #id]`; this names the window, the
121
+ * state and the totals instead. Truncation, the `shown/total` banner and the
122
+ * `fields` projection come from `formatListResponse` (#243) — this file used
123
+ * to carry its own formatter that cut mid-line and crashed on `data: null`.
124
+ */
125
+ export function timesheetSummary(item) {
126
+ const attrs = item.attributes ?? {};
127
+ const parts = [`[timesreport #${item.id}]`];
128
+ if (attrs.term)
129
+ parts.push(`Mois: ${attrs.term}`);
130
+ if (attrs.startDate)
131
+ parts.push(`Du: ${attrs.startDate}`);
132
+ if (attrs.endDate)
133
+ parts.push(`Au: ${attrs.endDate}`);
134
+ if (attrs.state !== undefined)
135
+ parts.push(`Statut: ${attrs.state}`);
136
+ if (attrs.totalDays !== undefined)
137
+ parts.push(`Jours: ${attrs.totalDays}`);
138
+ if (attrs.totalHours !== undefined)
139
+ parts.push(`Heures: ${attrs.totalHours}`);
140
+ return parts.join(" | ");
53
141
  }
142
+ const OPTS = {
143
+ entityName: "feuille de temps",
144
+ entityNamePlural: "feuilles de temps",
145
+ apiPath: "/times-reports",
146
+ prefix: "boond_timesheets",
147
+ };
54
148
  export function registerTimesheetTools(server) {
55
- server.registerTool("boond_timesheets_create", {
56
- title: "Créer une feuille de temps",
149
+ server.registerTool("boond_timesheets_default", {
150
+ title: "Référentiels de saisie d'un CRA",
57
151
  description: composeDescription({
58
- purpose: "Crée la feuille de temps (CRA) d'un mois pour une ressource.",
59
- when: "pour ouvrir le CRA d'un couple (ressource, mois) qui n'existe pas encore.",
60
- instead: "`boond_timesheets_search` d'abord : l'API ne déduplique pas, et deux CRA peuvent coexister sur le même mois.",
152
+ purpose: "Renvoie ce qu'il faut savoir avant d'écrire le CRA d'une ressource sur un mois : types d'unité d'œuvre autorisés, couples projet/prestation imputables, planning prévu et absences déjà posées.",
153
+ when: "AVANT `boond_timesheets_create` / `boond_timesheets_update` — les codes `workUnitTypeReference` ne sont publiés nulle part ailleurs (ni dans `boond_application_dictionary`, ni sur `boond_agencies_get`).",
154
+ instead: "aucun autre outil ne donne ces codes ; `boond_timesheets_get` pour relire un CRA existant.",
61
155
  behaviour: [
62
- "`term` est le mois au format `YYYY-MM` — un CRA couvre un mois entier, pas une journée.",
63
- "Écriture non idempotente.",
156
+ "Lecture seule (`GET /times-reports/default`). La réponse brute est réduite : les types viennent de la ressource incluse (`workUnitTypesAllowed`), les imputations des projets inclus, le planning de `plannedTimes`.",
157
+ "Une ressource sans imputation ce mois-là ne peut saisir que des absences.",
64
158
  ],
65
- returns: "confirmation et fiche du CRA créé.",
159
+ returns: "texte : agence, types d'unité d'œuvre (reference | libellé | activityType), imputations `projectId` / `deliveryId` (et `batchId`), planning prévu agrégé par imputation, absences déjà posées.",
66
160
  }),
67
- inputSchema: TimesheetCreateSchema,
161
+ inputSchema: TimesheetDefaultSchema,
68
162
  annotations: {
69
- readOnlyHint: false,
163
+ readOnlyHint: true,
70
164
  destructiveHint: false,
71
- idempotentHint: false,
165
+ idempotentHint: true,
72
166
  openWorldHint: false,
73
167
  },
74
168
  }, async (params) => {
75
- const { resourceId, projectId, ...attrs } = params;
76
- const body = buildJsonApiBody("timesreport", attrs);
77
- const relationships = {};
78
- if (resourceId)
79
- relationships.resource = { data: { id: resourceId, type: "resource" } };
80
- if (projectId)
81
- relationships.project = { data: { id: projectId, type: "project" } };
82
- if (Object.keys(relationships).length > 0) {
83
- body.data.relationships = relationships;
84
- }
85
- const response = await apiRequest("/times-reports", "POST", body);
86
- const text = formatDetailResponse(response);
87
- const entity = Array.isArray(response.data) ? response.data[0] : response.data;
88
- return {
89
- content: [
90
- { type: "text", text: `✅ Feuille de temps créée avec succès.\nID: ${entity?.id}\n\n${text}` },
169
+ const query = { resource: params.resourceId, term: params.term };
170
+ if (params.agencyId)
171
+ query.agency = params.agencyId;
172
+ const response = await apiRequest("/times-reports/default", "GET", undefined, query);
173
+ return { content: [{ type: "text", text: formatTimesheetDefaults(response) }] };
174
+ });
175
+ registerCreateTool(server, OPTS, TimesheetCreateSchema, buildTimesheetBody, {
176
+ title: "Créer une feuille de temps",
177
+ description: composeDescription({
178
+ purpose: "Crée la feuille de temps (CRA) d'un mois pour une ressource, avec ses lignes jour par jour.",
179
+ when: "pour ouvrir le CRA d'un couple (ressource, mois) qui n'existe pas encore, après `boond_timesheets_default`.",
180
+ instead: "`boond_timesheets_search` (`startMonth`/`endMonth` + `resourceId`) d'abord : l'API ne déduplique pas, deux CRA peuvent coexister sur le même mois ; `boond_timesheets_update` si le CRA existe déjà.",
181
+ behaviour: [
182
+ "Un CRA est un conteneur mensuel (`term` + `resource`) ; les lignes vont dans `regularTimes[]` (production et absences) et `exceptionalTimes[]` — chaque ligne = un jour, une durée, un type d'unité d'œuvre, et pour la production un couple `projectId` / `deliveryId` imputable.",
183
+ "`state` n'est pas un champ d'écriture : il est piloté par le workflow de validation (`boond_validations_search`).",
184
+ "Écriture non idempotente. Modèle d'écriture établi en lecture depuis l'API (forme des CRA existants et de `/times-reports/default`), pas encore éprouvé en écriture sur un tenant de test — voir CLAUDE.md.",
91
185
  ],
92
- };
186
+ returns: "confirmation, ID créé (`structuredContent.id`) et fiche du CRA.",
187
+ }),
188
+ });
189
+ registerUpdateTool(server, OPTS, TimesheetUpdateSchema, buildTimesheetBody, {
190
+ method: "PUT",
191
+ title: "Modifier une feuille de temps",
192
+ description: composeDescription({
193
+ purpose: "Met à jour un CRA existant : commentaires, clôture, ou remplacement complet de ses lignes.",
194
+ when: "pour compléter ou corriger le CRA d'un mois déjà ouvert (trouvé via `boond_timesheets_search`).",
195
+ instead: "`boond_timesheets_create` si aucun CRA n'existe encore pour ce couple (ressource, mois).",
196
+ behaviour: [
197
+ "Mise à jour partielle sur les champs simples, MAIS `regularTimes` / `exceptionalTimes` **remplacent le tableau entier** : relire le CRA (`boond_timesheets_get`), fusionner, renvoyer la liste complète — envoyer une seule ligne efface le mois.",
198
+ "`state` n'est pas un champ d'écriture (workflow de validation).",
199
+ ],
200
+ returns: "confirmation et fiche du CRA mis à jour.",
201
+ }),
93
202
  });
94
203
  // Get timesheets for a specific resource
95
204
  server.registerTool("boond_resources_timesheets", {
96
205
  title: "Feuilles de temps d'une ressource",
97
- description: `Récupère les feuilles de temps (times reports) d'une ressource par son ID, avec filtre optionnel par mois/année.
98
-
99
- Args:
100
- - resourceId (string): ID de la ressource
101
- - month (number, optional): Mois (1-12), défaut: mois courant
102
- - year (number, optional): Année (ex: 2025), défaut: année courante
206
+ description: `Récupère les feuilles de temps (times reports) d'une ressource par son ID, avec filtre optionnel par mois/année (défaut : mois courant).
103
207
 
104
208
  Returns: Liste des feuilles de temps de la ressource avec jours/heures et statut.`,
105
209
  inputSchema: ResourceTimesheetSchema,
@@ -116,63 +220,29 @@ Returns: Liste des feuilles de temps de la ressource avec jours/heures et statut
116
220
  if (params.year !== undefined)
117
221
  queryParams["year"] = params.year;
118
222
  const response = await apiRequest(`/resources/${params.resourceId}/times-reports`, "GET", undefined, queryParams);
119
- const text = formatTimesheetSummary(response);
223
+ const text = formatListResponse(response, "feuille de temps", undefined, timesheetSummary);
120
224
  return {
121
225
  content: [{ type: "text", text }],
122
226
  };
123
227
  });
124
- // Search all timesheets
125
- server.registerTool("boond_timesheets_search", {
228
+ // Search all timesheets — the factory hands `timesheetSummary` to the list
229
+ // formatter and to `structuredContent` alike (#243).
230
+ registerSearchTool(server, OPTS, {
231
+ schema: TimesheetSearchSchema,
232
+ summaryFn: timesheetSummary,
126
233
  title: "Rechercher des feuilles de temps",
127
- description: `Recherche des feuilles de temps (CRA mensuels) dans BoondManager.
234
+ description: `Recherche des feuilles de temps (CRA mensuels) dans BoondManager, par mois, ressource, état de validation (\`validationStates\` : waitingForValidation / validated / rejected) et périmètre (\`perimeter*\`).
128
235
 
129
236
  ⚠️ \`startMonth\` et \`endMonth\` (format YYYY-MM) sont requis par l'API — passer YYYY-MM-DD ou les omettre renvoie un 422.
130
237
 
131
- Args:
132
- - startMonth (string, requis): Mois de début YYYY-MM (ex: '2025-01')
133
- - endMonth (string, requis): Mois de fin YYYY-MM (ex: '2025-03')
134
- - keywords (string, optional): Mots-clés
135
- - page (number): Numéro de page (défaut: 1)
136
- - pageSize (number): Résultats par page (défaut: 30)
137
-
138
- Returns: Liste des feuilles de temps correspondantes.`,
139
- inputSchema: TimesheetSearchSchema,
140
- annotations: {
141
- readOnlyHint: true,
142
- destructiveHint: false,
143
- idempotentHint: true,
144
- openWorldHint: true,
145
- },
146
- }, async (params, extra) => {
147
- const query = buildSearchQuery(params);
148
- const response = await apiSearch("/times-reports", query, progressReporterFrom(extra));
149
- const text = formatTimesheetSummary(response);
150
- return {
151
- content: [{ type: "text", text }],
152
- };
238
+ Returns: Liste des feuilles de temps correspondantes (une ligne par CRA : mois, période, statut, totaux).`,
153
239
  });
154
- // Get a specific timesheet by ID
155
- server.registerTool("boond_timesheets_get", {
240
+ registerGetTool(server, OPTS, {
241
+ withTab: false,
156
242
  title: "Détails d'une feuille de temps",
157
- description: `Récupère les informations détaillées d'une feuille de temps par son ID.
158
-
159
- Args:
160
- - id (string): Identifiant unique de la feuille de temps
243
+ description: `Récupère les informations détaillées d'une feuille de temps (CRA mensuel) par son ID.
161
244
 
162
245
  Returns: Données JSON complètes de la feuille de temps (jours, heures, statut, détails).`,
163
- inputSchema: TimesheetGetSchema,
164
- annotations: {
165
- readOnlyHint: true,
166
- destructiveHint: false,
167
- idempotentHint: true,
168
- openWorldHint: false,
169
- },
170
- }, async (params) => {
171
- const response = await apiRequest(`/times-reports/${params.id}`);
172
- const text = formatDetailResponse(response);
173
- return {
174
- content: [{ type: "text", text }],
175
- };
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W,EAAE;;yFAEwE;KACtF,CAAC,CAAC;AACL,CAAC"}
@@ -1,3 +1,5 @@
1
1
  import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ /** `/todolists` payload (issue #254): `agencyIds` → `agencies` relationship, the rest as attributes (`models.todolist`). */
3
+ export declare function buildTodolistBody(params: Record<string, unknown>): unknown;
2
4
  export declare function registerTodolistTools(server: McpServer): void;
3
5
  //# sourceMappingURL=todolists.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"todolists.d.ts","sourceRoot":"","sources":["../../src/tools/todolists.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAUzE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAG7D"}
1
+ {"version":3,"file":"todolists.d.ts","sourceRoot":"","sources":["../../src/tools/todolists.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiCzE,4HAA4H;AAC5H,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAO1E;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA6C7D"}