boondmanager-mcp-server 2.14.0 → 2.15.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 (106) hide show
  1. package/dist/constants.d.ts +1 -0
  2. package/dist/constants.d.ts.map +1 -1
  3. package/dist/constants.js +33 -0
  4. package/dist/constants.js.map +1 -1
  5. package/dist/schemas/index.d.ts +11 -11
  6. package/dist/schemas/index.d.ts.map +1 -1
  7. package/dist/tools/absences.d.ts.map +1 -1
  8. package/dist/tools/absences.js +31 -4
  9. package/dist/tools/absences.js.map +1 -1
  10. package/dist/tools/actions.d.ts.map +1 -1
  11. package/dist/tools/actions.js +10 -2
  12. package/dist/tools/actions.js.map +1 -1
  13. package/dist/tools/advantages.d.ts.map +1 -1
  14. package/dist/tools/advantages.js +5 -1
  15. package/dist/tools/advantages.js.map +1 -1
  16. package/dist/tools/application.js +1 -1
  17. package/dist/tools/application.js.map +1 -1
  18. package/dist/tools/candidates.d.ts.map +1 -1
  19. package/dist/tools/candidates.js +18 -53
  20. package/dist/tools/candidates.js.map +1 -1
  21. package/dist/tools/companies.d.ts.map +1 -1
  22. package/dist/tools/companies.js +26 -78
  23. package/dist/tools/companies.js.map +1 -1
  24. package/dist/tools/contacts.d.ts.map +1 -1
  25. package/dist/tools/contacts.js +18 -59
  26. package/dist/tools/contacts.js.map +1 -1
  27. package/dist/tools/contracts.d.ts.map +1 -1
  28. package/dist/tools/contracts.js +23 -6
  29. package/dist/tools/contracts.js.map +1 -1
  30. package/dist/tools/crud-factory.d.ts +3 -0
  31. package/dist/tools/crud-factory.d.ts.map +1 -1
  32. package/dist/tools/crud-factory.js +11 -32
  33. package/dist/tools/crud-factory.js.map +1 -1
  34. package/dist/tools/deliveries.d.ts.map +1 -1
  35. package/dist/tools/deliveries.js +16 -2
  36. package/dist/tools/deliveries.js.map +1 -1
  37. package/dist/tools/description-builders.d.ts +135 -0
  38. package/dist/tools/description-builders.d.ts.map +1 -0
  39. package/dist/tools/description-builders.js +152 -0
  40. package/dist/tools/description-builders.js.map +1 -0
  41. package/dist/tools/documents.d.ts.map +1 -1
  42. package/dist/tools/documents.js +7 -3
  43. package/dist/tools/documents.js.map +1 -1
  44. package/dist/tools/expenses.d.ts.map +1 -1
  45. package/dist/tools/expenses.js +6 -1
  46. package/dist/tools/expenses.js.map +1 -1
  47. package/dist/tools/invoices.d.ts.map +1 -1
  48. package/dist/tools/invoices.js +9 -2
  49. package/dist/tools/invoices.js.map +1 -1
  50. package/dist/tools/notifications.d.ts.map +1 -1
  51. package/dist/tools/notifications.js +5 -1
  52. package/dist/tools/notifications.js.map +1 -1
  53. package/dist/tools/opportunities.d.ts.map +1 -1
  54. package/dist/tools/opportunities.js +20 -55
  55. package/dist/tools/opportunities.js.map +1 -1
  56. package/dist/tools/orders.d.ts.map +1 -1
  57. package/dist/tools/orders.js +6 -1
  58. package/dist/tools/orders.js.map +1 -1
  59. package/dist/tools/parameter-disclosure.d.ts +5 -0
  60. package/dist/tools/parameter-disclosure.d.ts.map +1 -0
  61. package/dist/tools/parameter-disclosure.js +71 -0
  62. package/dist/tools/parameter-disclosure.js.map +1 -0
  63. package/dist/tools/payments.d.ts.map +1 -1
  64. package/dist/tools/payments.js +15 -2
  65. package/dist/tools/payments.js.map +1 -1
  66. package/dist/tools/positionings.d.ts.map +1 -1
  67. package/dist/tools/positionings.js +20 -3
  68. package/dist/tools/positionings.js.map +1 -1
  69. package/dist/tools/projects.d.ts.map +1 -1
  70. package/dist/tools/projects.js +24 -67
  71. package/dist/tools/projects.js.map +1 -1
  72. package/dist/tools/provider-invoices.d.ts.map +1 -1
  73. package/dist/tools/provider-invoices.js +25 -3
  74. package/dist/tools/provider-invoices.js.map +1 -1
  75. package/dist/tools/purchases.d.ts.map +1 -1
  76. package/dist/tools/purchases.js +20 -3
  77. package/dist/tools/purchases.js.map +1 -1
  78. package/dist/tools/registration-decorators.d.ts +6 -1
  79. package/dist/tools/registration-decorators.d.ts.map +1 -1
  80. package/dist/tools/registration-decorators.js +8 -1
  81. package/dist/tools/registration-decorators.js.map +1 -1
  82. package/dist/tools/reporting.d.ts.map +1 -1
  83. package/dist/tools/reporting.js +25 -7
  84. package/dist/tools/reporting.js.map +1 -1
  85. package/dist/tools/resources.d.ts.map +1 -1
  86. package/dist/tools/resources.js +44 -87
  87. package/dist/tools/resources.js.map +1 -1
  88. package/dist/tools/tab-tools.d.ts +23 -0
  89. package/dist/tools/tab-tools.d.ts.map +1 -0
  90. package/dist/tools/tab-tools.js +48 -0
  91. package/dist/tools/tab-tools.js.map +1 -0
  92. package/dist/tools/timesheets.d.ts.map +1 -1
  93. package/dist/tools/timesheets.js +11 -1
  94. package/dist/tools/timesheets.js.map +1 -1
  95. package/dist/tools/usage-guidance.d.ts +45 -0
  96. package/dist/tools/usage-guidance.d.ts.map +1 -0
  97. package/dist/tools/usage-guidance.js +235 -0
  98. package/dist/tools/usage-guidance.js.map +1 -0
  99. package/dist/tools/validations.d.ts.map +1 -1
  100. package/dist/tools/validations.js +5 -1
  101. package/dist/tools/validations.js.map +1 -1
  102. package/dist/tools/workflows.d.ts.map +1 -1
  103. package/dist/tools/workflows.js +13 -4
  104. package/dist/tools/workflows.js.map +1 -1
  105. package/manifest.json +1 -1
  106. package/package.json +3 -3
@@ -0,0 +1,23 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { EntityWording } from "./description-builders.js";
3
+ export interface TabDefinition {
4
+ /** Tool-name suffix, underscored — `technical_data`. */
5
+ name: string;
6
+ /** API path segment, as BoondManager spells it — `technical-data`. */
7
+ tab: string;
8
+ title: string;
9
+ /** What the tab holds, as a noun phrase — "le profil technique". */
10
+ subject: string;
11
+ /** Parenthetical enumeration of the fields inside it. Omitted when the subject says it all. */
12
+ content?: string;
13
+ /** What the caller receives. */
14
+ returns: string;
15
+ /** Facts a caller cannot infer from the schema. */
16
+ behaviour?: string[];
17
+ }
18
+ export interface TabToolsOptions extends EntityWording {
19
+ /** API path of the parent collection — `/candidates`. */
20
+ apiPath: string;
21
+ }
22
+ export declare function registerTabTools(server: McpServer, opts: TabToolsOptions, tabs: TabDefinition[]): void;
23
+ //# sourceMappingURL=tab-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tab-tools.d.ts","sourceRoot":"","sources":["../../src/tools/tab-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAwB/D,MAAM,WAAW,aAAa;IAC5B,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,+FAA+F;IAC/F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,CA2BtG"}
@@ -0,0 +1,48 @@
1
+ import { apiRequest, formatTabResponse } from "../services/boond-client.js";
2
+ import { IdSchema } from "../schemas/index.js";
3
+ import { tabDescription } from "./description-builders.js";
4
+ /**
5
+ * The 42 entity-tab tools (`boond_candidates_technical_data`,
6
+ * `boond_companies_invoices`, …) were six byte-identical registration loops in
7
+ * six domain files, each with its own copy of the `TabDefinition` interface and
8
+ * its own hand-typed description ending in a redundant `Args: - id (string)`
9
+ * block. They are the catalogue's densest cluster of near-identical tools —
10
+ * same input, same annotations, all "some fields of one entity" — so a
11
+ * description that only names the tab leaves a model choosing by string
12
+ * similarity.
13
+ *
14
+ * Centralising them buys the thing that matters for that: every tab tool now
15
+ * states what its slice holds *and* which sibling reaches the rest, from one
16
+ * template that cannot drift per domain.
17
+ */
18
+ const TAB_TOOL_ANNOTATIONS = {
19
+ readOnlyHint: true,
20
+ destructiveHint: false,
21
+ idempotentHint: true,
22
+ openWorldHint: false,
23
+ };
24
+ export function registerTabTools(server, opts, tabs) {
25
+ for (const tab of tabs) {
26
+ server.registerTool(`${opts.prefix}_${tab.name}`, {
27
+ title: tab.title,
28
+ description: tabDescription({
29
+ entityName: opts.entityName,
30
+ entityNamePlural: opts.entityNamePlural,
31
+ prefix: opts.prefix,
32
+ subject: tab.subject,
33
+ content: tab.content,
34
+ returns: tab.returns,
35
+ behaviour: tab.behaviour,
36
+ }),
37
+ inputSchema: IdSchema,
38
+ annotations: TAB_TOOL_ANNOTATIONS,
39
+ }, async (params) => {
40
+ const response = await apiRequest(`${opts.apiPath}/${params.id}/${tab.tab}`);
41
+ const text = formatTabResponse(response);
42
+ return {
43
+ content: [{ type: "text", text }],
44
+ };
45
+ });
46
+ }
47
+ }
48
+ //# sourceMappingURL=tab-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tab-tools.js","sourceRoot":"","sources":["../../src/tools/tab-tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D;;;;;;;;;;;;;GAaG;AAEH,MAAM,oBAAoB,GAAG;IAC3B,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACZ,CAAC;AAuBX,MAAM,UAAU,gBAAgB,CAAC,MAAiB,EAAE,IAAqB,EAAE,IAAqB;IAC9F,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,CAAC,YAAY,CACjB,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,EAC5B;YACE,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,WAAW,EAAE,cAAc,CAAC;gBAC1B,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;gBACvC,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,OAAO,EAAE,GAAG,CAAC,OAAO;gBACpB,OAAO,EAAE,GAAG,CAAC,OAAO;gBACpB,OAAO,EAAE,GAAG,CAAC,OAAO;gBACpB,SAAS,EAAE,GAAG,CAAC,SAAS;aACzB,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 +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;AA6DzE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAkI9D"}
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"}
@@ -4,6 +4,7 @@ import { progressReporterFrom } from "../services/progress.js";
4
4
  import { buildJsonApiBody } from "./crud-factory.js";
5
5
  import { CHARACTER_LIMIT } from "../constants.js";
6
6
  import { z } from "zod";
7
+ import { composeDescription } from "./description-builders.js";
7
8
  const TimesheetCreateSchema = z
8
9
  .object({
9
10
  resourceId: z.string().min(1).describe("ID de la ressource"),
@@ -53,7 +54,16 @@ function formatTimesheetSummary(response) {
53
54
  export function registerTimesheetTools(server) {
54
55
  server.registerTool("boond_timesheets_create", {
55
56
  title: "Créer une feuille de temps",
56
- description: "Crée une feuille de temps mensuelle liée à une ressource.",
57
+ 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.",
61
+ behaviour: [
62
+ "`term` est le mois au format `YYYY-MM` — un CRA couvre un mois entier, pas une journée.",
63
+ "Écriture non idempotente.",
64
+ ],
65
+ returns: "confirmation et fiche du CRA créé.",
66
+ }),
57
67
  inputSchema: TimesheetCreateSchema,
58
68
  annotations: {
59
69
  readOnlyHint: false,
@@ -1 +1 @@
1
- {"version":3,"file":"timesheets.js","sourceRoot":"","sources":["../../src/tools/timesheets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzG,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC5G,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,gBAAgB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CACjB,sBAAsB,EACtB;QACE,KAAK,EAAE,gCAAgC;QACvC,WAAW,EAAE;;;;;yFAKsE;QACnF,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,EAAE,MAAyB,EAAE,EAAE;QAClC,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,kBAAkB,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QAC5C,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC;SAC3C,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Per-tool usage guidance for the hand-rolled tools.
3
+ *
4
+ * The five CRUD templates and the tab template compose their own
5
+ * "Quand / Plutôt que" block (see `description-builders.ts`), which covers
6
+ * ~145 of the 182 tools. The remaining ones carry hand-written descriptions
7
+ * whose *body* is worth keeping — endpoint filter vocabulary, the traps
8
+ * documented in CLAUDE.md — and only lack the guidance section. Rewriting each
9
+ * of them into a `composeDescription` call would churn a lot of prose to add
10
+ * two lines, so the two lines live here and are injected centrally.
11
+ *
12
+ * The obvious hazard of a name-keyed side table is silent drift: rename a tool
13
+ * and its guidance evaporates with nothing failing. `usage-guidance.test.ts`
14
+ * closes both directions — no entry may point at a tool that does not exist,
15
+ * and no tool may end up without guidance. So the table cannot rot quietly;
16
+ * it can only break the build.
17
+ *
18
+ * What belongs in `instead`: a **named** sibling and the reason the two are
19
+ * confusable. "See the other tools" is worse than nothing — it costs bytes and
20
+ * resolves no ambiguity. Where a tool genuinely has no alternative, say that
21
+ * explicitly (`boond_expenses_default`, `boond_documents_create`), because
22
+ * "there is no other way to get this" is itself the actionable fact.
23
+ */
24
+ export interface UsageGuidance {
25
+ /** When this tool is the right call. */
26
+ when?: string;
27
+ /** The named alternative, and why they are confusable. */
28
+ instead?: string;
29
+ }
30
+ export declare const USAGE_GUIDANCE: Record<string, UsageGuidance>;
31
+ /**
32
+ * Insert the guidance block after the description's first paragraph.
33
+ *
34
+ * Position is deliberate: the purpose sentence stays first (it is the only
35
+ * thing guaranteed to be read in a 182-tool listing), the guidance comes
36
+ * second, and the endpoint's filter vocabulary keeps its place below. That is
37
+ * also the order the composed templates produce, so the whole catalogue reads
38
+ * the same way regardless of which path built the description.
39
+ */
40
+ export declare function injectUsageGuidance(description: string, guidance: UsageGuidance): string;
41
+ /** Apply the table to one tool config, if it has an entry and no guidance yet. */
42
+ export declare function withUsageGuidance<T extends {
43
+ description?: string;
44
+ }>(name: string, config: T): T;
45
+ //# sourceMappingURL=usage-guidance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-guidance.d.ts","sourceRoot":"","sources":["../../src/tools/usage-guidance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,MAAM,WAAW,aAAa;IAC5B,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAiNxD,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,MAAM,CAWxF;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,CAAC,SAAS;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAShG"}
@@ -0,0 +1,235 @@
1
+ /**
2
+ * Per-tool usage guidance for the hand-rolled tools.
3
+ *
4
+ * The five CRUD templates and the tab template compose their own
5
+ * "Quand / Plutôt que" block (see `description-builders.ts`), which covers
6
+ * ~145 of the 182 tools. The remaining ones carry hand-written descriptions
7
+ * whose *body* is worth keeping — endpoint filter vocabulary, the traps
8
+ * documented in CLAUDE.md — and only lack the guidance section. Rewriting each
9
+ * of them into a `composeDescription` call would churn a lot of prose to add
10
+ * two lines, so the two lines live here and are injected centrally.
11
+ *
12
+ * The obvious hazard of a name-keyed side table is silent drift: rename a tool
13
+ * and its guidance evaporates with nothing failing. `usage-guidance.test.ts`
14
+ * closes both directions — no entry may point at a tool that does not exist,
15
+ * and no tool may end up without guidance. So the table cannot rot quietly;
16
+ * it can only break the build.
17
+ *
18
+ * What belongs in `instead`: a **named** sibling and the reason the two are
19
+ * confusable. "See the other tools" is worse than nothing — it costs bytes and
20
+ * resolves no ambiguity. Where a tool genuinely has no alternative, say that
21
+ * explicitly (`boond_expenses_default`, `boond_documents_create`), because
22
+ * "there is no other way to get this" is itself the actionable fact.
23
+ */
24
+ export const USAGE_GUIDANCE = {
25
+ // ---- application / référentiels ----
26
+ boond_application_current_user: {
27
+ when: "en début de session, pour connaître l'identité, l'agence et le périmètre du compte utilisé — donc ce que « mes données » désigne.",
28
+ instead: "la ressource `boond://application/current-user`, identique et moins coûteuse ; et `boond_resources_search` " +
29
+ "pour quelqu'un d'autre que le titulaire du compte, cet outil ne prenant aucun paramètre.",
30
+ },
31
+ boond_application_dictionary: {
32
+ when: "pour traduire un état ou un type BoondManager entre son ID entier et son libellé, avant de filtrer une recherche.",
33
+ instead: "les ressources `boond://dictionary/*` pour les tables courantes (états, typeOf, pays, devises, langues) : " +
34
+ "même contenu par un `resources/read`, sans consommer un appel d'outil. Cet outil reste nécessaire pour les " +
35
+ "tables non publiées en ressource.",
36
+ },
37
+ // ---- documents ----
38
+ boond_documents_get: {
39
+ when: "pour récupérer le contenu d'un CV ou d'un justificatif dont l'ID a été relevé dans un onglet d'entité.",
40
+ instead: "`boond_candidates_information` / `boond_candidates_administrative` (relations `resumes` / `files`) pour " +
41
+ "*trouver* l'ID : celui-ci exige un ID exact, suffixe compris (`123_resume`), et un ID tronqué désigne un autre document.",
42
+ },
43
+ boond_documents_create: {
44
+ when: "pour attacher à une entité un fichier accessible par URL publique.",
45
+ instead: "aucune alternative pour un fichier local : le serveur MCP ne lit jamais le disque, c'est BoondManager qui " +
46
+ "télécharge l'URL. Il faut donc d'abord héberger le fichier quelque part d'atteignable.",
47
+ },
48
+ boond_documents_delete: {
49
+ when: "pour retirer une pièce jointe erronée, sur demande explicite de l'utilisateur.",
50
+ instead: "`boond_documents_get` d'abord, pour confirmer qu'il s'agit du bon fichier — les ID de documents sont suffixés " +
51
+ "et un ID mal recopié pointe sur autre chose.",
52
+ },
53
+ // ---- actions ----
54
+ boond_actions_search: {
55
+ when: "pour balayer l'historique commercial ou RH sur un périmètre, plusieurs entités confondues.",
56
+ instead: "les onglets `actions` d'une entité connue (`boond_candidates_actions`, `boond_companies_actions`, " +
57
+ "`boond_projects_actions`…) : plus direct et sans filtre de périmètre à construire.",
58
+ },
59
+ boond_actions_create: {
60
+ instead: "`boond_actions_update` pour compléter une action déjà enregistrée plutôt que d'en créer un doublon.",
61
+ },
62
+ boond_actions_update: {
63
+ instead: "`boond_actions_create` si l'action n'existe pas encore.",
64
+ },
65
+ // ---- absences / planning / validations ----
66
+ boond_absences_search: {
67
+ when: "pour retrouver des demandes d'absence et leur état de validation.",
68
+ instead: "`boond_planning_absences_search` pour la vue calendaire (qui est absent quand), et " +
69
+ "`boond_validations_search` pour ce qui reste en attente de validation.",
70
+ },
71
+ boond_planning_absences_search: {
72
+ when: "pour savoir qui est absent sur une période — une vue calendaire, pas un suivi de demandes.",
73
+ instead: "`boond_absences_search` pour les demandes elles-mêmes (motif, état de validation, demandeur), " +
74
+ "que cette vue ne détaille pas.",
75
+ },
76
+ boond_validations_search: {
77
+ when: "pour lister ce qui attend une validation managériale sur une plage de mois.",
78
+ instead: "`boond_absences_search`, `boond_expenses_search` ou `boond_timesheets_search` pour les documents " +
79
+ "eux-mêmes : celui-ci renvoie l'en-cours de validation, pas leur contenu.",
80
+ },
81
+ boond_notifications_search: {
82
+ instead: "`boond_validations_search` pour ce qui requiert réellement une action de validation — une notification " +
83
+ "n'est qu'un message.",
84
+ },
85
+ // ---- temps ----
86
+ boond_timesheets_search: {
87
+ when: "pour balayer les CRA de plusieurs ressources sur une période.",
88
+ instead: "`boond_resources_timesheets` quand on part d'une ressource précise, et `boond_timesheets_get` pour le " +
89
+ "détail jour par jour d'un CRA.",
90
+ },
91
+ boond_timesheets_get: {
92
+ when: "après une recherche, pour le détail jour par jour d'un CRA identifié.",
93
+ instead: "`boond_resources_timesheets` pour lister les CRA d'une ressource sans connaître leurs ID.",
94
+ },
95
+ boond_resources_timesheets: {
96
+ when: "pour lister les CRA d'une ressource sur un mois donné, sans connaître leurs ID.",
97
+ instead: "`boond_timesheets_get` pour le détail d'un CRA précis, `boond_timesheets_search` pour couvrir " +
98
+ "plusieurs ressources d'un coup.",
99
+ },
100
+ // ---- notes de frais ----
101
+ boond_expenses_search: {
102
+ when: "avant toute création : l'API ne déduplique pas, deux notes de frais peuvent coexister sur le même couple (ressource, mois).",
103
+ instead: "`boond_expenses_get` pour le détail des lignes d'une note de frais identifiée.",
104
+ },
105
+ boond_expenses_default: {
106
+ when: "systématiquement avant `boond_expenses_create` — c'est la seule source des codes de types de frais et des couples (projet, prestation) imputables.",
107
+ instead: "rien d'autre : `boond_application_dictionary` ne publie aucune table de types de frais, et `/agencies/{id}` " +
108
+ "ne renvoie qu'un nom. Il n'existe pas de chemin alternatif.",
109
+ },
110
+ boond_expenses_create: {
111
+ instead: "`boond_expenses_update` pour ajouter des lignes à un mois déjà ouvert — mais `actualExpenses` y **remplace** " +
112
+ "tout le tableau, ce qui efface les lignes existantes si elles ne sont pas renvoyées.",
113
+ },
114
+ // ---- achats / factures / paiements ----
115
+ boond_purchases_search: {
116
+ when: "pour suivre les engagements de dépense et la sous-traitance.",
117
+ instead: "`boond_provider_invoices_search` pour les factures effectivement reçues : l'achat est l'engagement, " +
118
+ "la facture fournisseur le document qui le solde.",
119
+ },
120
+ boond_invoices_search: {
121
+ when: "pour suivre la facturation client (encours, retards, règlements attendus).",
122
+ instead: "`boond_provider_invoices_search` pour les factures d'achat — celui-ci ne couvre que le sens vente, " +
123
+ "et les deux ne partagent pas d'endpoint.",
124
+ },
125
+ boond_payments_search: {
126
+ when: "pour suivre les règlements enregistrés.",
127
+ instead: "`boond_provider_invoices_search` pour les factures fournisseur et `boond_purchases_search` pour les " +
128
+ "engagements : un paiement est adossé à un achat, il ne le remplace pas.",
129
+ },
130
+ boond_orders_search: {
131
+ when: "pour suivre les bons de commande client.",
132
+ instead: "`boond_invoices_search` pour la facturation qui en découle, `boond_orders_get` si l'ID est connu.",
133
+ },
134
+ // ---- livraisons / positionnements / avantages ----
135
+ boond_deliveries_search: {
136
+ when: "pour retrouver des prestations (lignes de mission facturables) sur un périmètre.",
137
+ instead: "`boond_projects_deliveries_groupments` quand on part d'un projet connu — plus direct.",
138
+ },
139
+ boond_positionings_search: {
140
+ when: "pour suivre l'avancement des profils proposés, plusieurs affaires confondues.",
141
+ instead: "les onglets `positionings` (`boond_candidates_positionings`, `boond_opportunities_positionings`, " +
142
+ "`boond_resources_positionings`) quand on part d'une entité connue.",
143
+ },
144
+ boond_positionings_update: {
145
+ when: "pour faire avancer l'état d'un positionnement (proposé → retenu → refusé).",
146
+ instead: "`boond_positionings_create` si le positionnement n'existe pas encore.",
147
+ },
148
+ boond_advantages_search: {
149
+ instead: "`boond_resources_advantages` quand on part d'une ressource précise.",
150
+ },
151
+ // ---- dossier technique ----
152
+ boond_resources_technical_data_update: {
153
+ when: "pour mettre à jour le dossier technique d'une ressource (compétences, formations, langues…).",
154
+ instead: "`boond_resources_reference_create` / `_update` / `_delete` pour les seules expériences professionnelles : " +
155
+ "elles vivent dans le même bloc, mais ces outils évitent d'avoir à republier le tableau entier.",
156
+ },
157
+ boond_resources_reference_create: {
158
+ instead: "`boond_resources_technical_data_update` pour les autres blocs du dossier technique (compétences, " +
159
+ "formations, langues), que cet outil ne touche pas.",
160
+ },
161
+ boond_resources_reference_update: {
162
+ when: "pour corriger une expérience professionnelle existante.",
163
+ instead: "`boond_resources_reference_create` pour en ajouter une nouvelle.",
164
+ },
165
+ boond_resources_reference_delete: {
166
+ when: "pour retirer une expérience saisie par erreur, sur demande explicite de l'utilisateur.",
167
+ instead: "`boond_resources_reference_update` pour corriger une référence plutôt que la détruire.",
168
+ },
169
+ // ---- audit ----
170
+ boond_logs_search: {
171
+ when: "pour retracer qui a modifié quoi et quand.",
172
+ instead: "le `_get` du domaine concerné (`boond_candidates_get`, `boond_projects_get`…) pour l'état *actuel* " +
173
+ "d'un enregistrement : celui-ci ne renvoie que l'historique des modifications.",
174
+ },
175
+ // ---- les six grandes recherches : le risque est la confusion de référentiel ----
176
+ boond_candidates_search: {
177
+ instead: "`boond_resources_search` pour les collaborateurs internes — candidats et ressources sont deux " +
178
+ "référentiels distincts, et une personne recrutée cesse d'être trouvable ici.",
179
+ },
180
+ boond_resources_search: {
181
+ instead: "`boond_candidates_search` pour les profils externes en cours de recrutement — deux référentiels " +
182
+ "distincts, un candidat n'apparaît pas ici avant son embauche.",
183
+ },
184
+ boond_companies_search: {
185
+ instead: "`boond_contacts_search` pour les personnes physiques ; noter aussi que `/companies` n'expose aucun " +
186
+ "filtre de type, seulement `states`.",
187
+ },
188
+ boond_contacts_search: {
189
+ instead: "`boond_companies_search` pour les sociétés elles-mêmes, `boond_candidates_search` / " +
190
+ "`boond_resources_search` pour les profils — un contact est un interlocuteur client, pas un profil.",
191
+ },
192
+ boond_opportunities_search: {
193
+ instead: "`boond_projects_search` une fois l'affaire gagnée : le projet est la suite de l'opportunité.",
194
+ },
195
+ boond_projects_search: {
196
+ instead: "`boond_opportunities_search` pour l'avant-vente — un projet est une affaire déjà gagnée.",
197
+ },
198
+ };
199
+ /**
200
+ * Insert the guidance block after the description's first paragraph.
201
+ *
202
+ * Position is deliberate: the purpose sentence stays first (it is the only
203
+ * thing guaranteed to be read in a 182-tool listing), the guidance comes
204
+ * second, and the endpoint's filter vocabulary keeps its place below. That is
205
+ * also the order the composed templates produce, so the whole catalogue reads
206
+ * the same way regardless of which path built the description.
207
+ */
208
+ export function injectUsageGuidance(description, guidance) {
209
+ const lines = [
210
+ guidance.when ? `Quand : ${guidance.when}` : undefined,
211
+ guidance.instead ? `Plutôt que : ${guidance.instead}` : undefined,
212
+ ].filter((l) => l !== undefined);
213
+ if (lines.length === 0)
214
+ return description;
215
+ const block = lines.join("\n");
216
+ const split = description.indexOf("\n\n");
217
+ if (split === -1)
218
+ return `${description}\n\n${block}`;
219
+ return `${description.slice(0, split)}\n\n${block}${description.slice(split)}`;
220
+ }
221
+ /** Apply the table to one tool config, if it has an entry and no guidance yet. */
222
+ export function withUsageGuidance(name, config) {
223
+ const guidance = Object.hasOwn(USAGE_GUIDANCE, name) ? USAGE_GUIDANCE[name] : undefined;
224
+ if (guidance === undefined)
225
+ return config;
226
+ const description = config.description;
227
+ if (typeof description !== "string" || description.length === 0)
228
+ return config;
229
+ // A description that already carries the section wins — the table is a
230
+ // backfill, not an override.
231
+ if (/^(Quand|Plutôt que) :/m.test(description))
232
+ return config;
233
+ return { ...config, description: injectUsageGuidance(description, guidance) };
234
+ }
235
+ //# sourceMappingURL=usage-guidance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-guidance.js","sourceRoot":"","sources":["../../src/tools/usage-guidance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AASH,MAAM,CAAC,MAAM,cAAc,GAAkC;IAC3D,uCAAuC;IACvC,8BAA8B,EAAE;QAC9B,IAAI,EAAE,mIAAmI;QACzI,OAAO,EACL,6GAA6G;YAC7G,0FAA0F;KAC7F;IACD,4BAA4B,EAAE;QAC5B,IAAI,EAAE,mHAAmH;QACzH,OAAO,EACL,4GAA4G;YAC5G,6GAA6G;Y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,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;AACjF,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,iBAAiB,CAAqC,IAAY,EAAE,MAAS;IAC3F,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxF,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IAC1C,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IACvC,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC;IAC/E,uEAAuE;IACvE,6BAA6B;IAC7B,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC;QAAE,OAAO,MAAM,CAAC;IAC9D,OAAO,EAAE,GAAG,MAAM,EAAE,WAAW,EAAE,mBAAmB,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAE,CAAC;AAChF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"validations.d.ts","sourceRoot":"","sources":["../../src/tools/validations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAWzE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAuD/D"}
1
+ {"version":3,"file":"validations.d.ts","sourceRoot":"","sources":["../../src/tools/validations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAYzE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA0D/D"}
@@ -1,6 +1,7 @@
1
1
  import { IdSchema, ValidationSearchSchema } from "../schemas/index.js";
2
2
  import { apiRequest, apiSearch, buildSearchQuery, formatListResponse, formatDetailResponse, } from "../services/boond-client.js";
3
3
  import { progressReporterFrom } from "../services/progress.js";
4
+ import { defaultGetDescription } from "./description-builders.js";
4
5
  export function registerValidationTools(server) {
5
6
  server.registerTool("boond_validations_search", {
6
7
  title: "Rechercher des validations",
@@ -33,7 +34,10 @@ Returns: Liste des validations correspondantes.`,
33
34
  });
34
35
  server.registerTool("boond_validations_get", {
35
36
  title: "Détails d'une validation",
36
- description: `Récupère les informations détaillées d'une validation par son ID.`,
37
+ description: defaultGetDescription({
38
+ ...{ entityName: "validation", entityNamePlural: "validations", prefix: "boond_validations" },
39
+ withTab: false,
40
+ }),
37
41
  inputSchema: IdSchema,
38
42
  annotations: {
39
43
  readOnlyHint: true,
@@ -1 +1 @@
1
- {"version":3,"file":"validations.js","sourceRoot":"","sources":["../../src/tools/validations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EACL,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,MAAM,UAAU,uBAAuB,CAAC,MAAiB;IACvD,MAAM,CAAC,YAAY,CACjB,0BAA0B,EAC1B;QACE,KAAK,EAAE,4BAA4B;QACnC,WAAW,EAAE;;;;;;;;;;;;gDAY6B;QAC1C,WAAW,EAAE,sBAAsB;QACnC,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;KACF,EACD,KAAK,EAAE,MAAM,EAAE,KAAc,EAAE,EAAE;QAC/B,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,cAAc,EAAE,KAAK,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC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"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/tools/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEhF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CA+BpF"}
1
+ {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/tools/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAGhF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAwCpF"}
@@ -1,5 +1,6 @@
1
1
  import { PROMPTS } from "../prompts/index.js";
2
2
  import { isDomainAllowed } from "../config/access-policy.js";
3
+ import { composeDescription } from "./description-builders.js";
3
4
  /**
4
5
  * Workflow tools — same runbooks as the MCP prompts in `src/prompts/index.ts`,
5
6
  * but exposed via `tools/list` instead of `prompts/list`.
@@ -27,10 +28,18 @@ export function registerWorkflowTools(server, policy) {
27
28
  continue;
28
29
  server.registerTool(`boond_workflow_${p.name}`, {
29
30
  title: p.title,
30
- description: p.description +
31
- ` Équivalent en outil du prompt MCP \`${p.name}\` ` +
32
- "(utile pour les clients qui ne gèrent pas correctement les prompts MCP, ex: claude.ai). " +
33
- "Retourne un runbook texte que le modèle doit ensuite exécuter en appelant les outils Boond référencés.",
31
+ description: composeDescription({
32
+ purpose: p.description,
33
+ when: "pour dérouler ce scénario multi-étapes sans avoir à retrouver soi-même le bon enchaînement d'outils et les bons noms de filtres.",
34
+ instead: `le prompt MCP \`${p.name}\` si le client l'expose — contenu identique, ` +
35
+ "sans consommer un appel d'outil. Cette variante existe pour les clients qui " +
36
+ "traitent mal `prompts/get` (claude.ai notamment).",
37
+ behaviour: [
38
+ "N'appelle aucune API BoondManager et ne lit aucune donnée : la réponse est générée côté serveur MCP.",
39
+ ],
40
+ returns: "un runbook en texte — la liste ordonnée des appels Boond à effectuer, avec les filtres exacts. " +
41
+ "C'est ensuite au modèle de les exécuter ; rien n'est fait par cet appel.",
42
+ }),
34
43
  inputSchema: p.argsSchema,
35
44
  annotations: {
36
45
  readOnlyHint: true,
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/tools/workflows.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAEhF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAiB,EAAE,MAAqB;IAC5E,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,sEAAsE;QACtE,mEAAmE;QACnE,yDAAyD;QACzD,IAAI,MAAM,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YAAE,SAAS;QAC5E,MAAM,CAAC,YAAY,CACjB,kBAAkB,CAAC,CAAC,IAAI,EAAE,EAC1B;YACE,KAAK,EAAE,CAAC,CAAC,KAAK;YACd,WAAW,EACT,CAAC,CAAC,WAAW;gBACb,wCAAwC,CAAC,CAAC,IAAI,KAAK;gBACnD,0FAA0F;gBAC1F,wGAAwG;YAC1G,WAAW,EAAE,CAAC,CAAC,UAAU;YACzB,WAAW,EAAE;gBACX,YAAY,EAAE,IAAI;gBAClB,eAAe,EAAE,KAAK;gBACtB,cAAc,EAAE,IAAI;gBACpB,aAAa,EAAE,K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AAW,EAAE,CAAC,CAAC,UAAU;YACzB,WAAW,EAAE;gBACX,YAAY,EAAE,IAAI;gBAClB,eAAe,EAAE,KAAK;gBACtB,cAAc,EAAE,IAAI;gBACpB,aAAa,EAAE,KAAK;aACrB;SACF,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;YACf,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,IAAI,EAAE,CAAuC,CAAC,CAAC;YAC3E,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC;aAC3C,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;AACH,CAAC"}
package/manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "manifest_version": "0.3",
3
3
  "name": "boondmanager-mcp-server",
4
4
  "display_name": "BoondManager MCP Server",
5
- "version": "2.14.0",
5
+ "version": "2.15.0",
6
6
  "description": "MCP Server for BoondManager API - 182 tools, 12 prompts, 22 resources (ERP/CRM)",
7
7
  "author": {
8
8
  "name": "Frédéric Auguste",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "boondmanager-mcp-server",
3
- "version": "2.14.0",
3
+ "version": "2.15.0",
4
4
  "description": "MCP Server for BoondManager API - 182 tools, 12 prompts, 22 resources (ERP/CRM)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -67,7 +67,7 @@
67
67
  "devDependencies": {
68
68
  "@eslint/js": "^10.0.1",
69
69
  "@types/node": "^26.0.0",
70
- "@vitest/coverage-v8": "^4.0.18",
70
+ "@vitest/coverage-v8": "^5.0.0",
71
71
  "ajv": "^8.17.1",
72
72
  "eslint": "^10.0.2",
73
73
  "husky": "^9.1.7",
@@ -75,6 +75,6 @@
75
75
  "prettier": "^3.8.3",
76
76
  "typescript": "^6.0.2",
77
77
  "typescript-eslint": "^8.0.0",
78
- "vitest": "^4.0.18"
78
+ "vitest": "^5.0.0"
79
79
  }
80
80
  }