boondmanager-mcp-server 2.10.0 → 2.12.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 (84) hide show
  1. package/README.md +68 -3
  2. package/dist/config/access-policy.d.ts +5 -0
  3. package/dist/config/access-policy.d.ts.map +1 -1
  4. package/dist/config/access-policy.js +36 -1
  5. package/dist/config/access-policy.js.map +1 -1
  6. package/dist/config/env-flags.d.ts +11 -0
  7. package/dist/config/env-flags.d.ts.map +1 -0
  8. package/dist/config/env-flags.js +16 -0
  9. package/dist/config/env-flags.js.map +1 -0
  10. package/dist/config/profiles.d.ts +71 -0
  11. package/dist/config/profiles.d.ts.map +1 -0
  12. package/dist/config/profiles.js +115 -0
  13. package/dist/config/profiles.js.map +1 -0
  14. package/dist/icons.d.ts +79 -0
  15. package/dist/icons.d.ts.map +1 -0
  16. package/dist/icons.js +169 -0
  17. package/dist/icons.js.map +1 -0
  18. package/dist/resources/index.d.ts.map +1 -1
  19. package/dist/resources/index.js +6 -0
  20. package/dist/resources/index.js.map +1 -1
  21. package/dist/schemas/filter-aliases.d.ts +69 -0
  22. package/dist/schemas/filter-aliases.d.ts.map +1 -0
  23. package/dist/schemas/filter-aliases.js +225 -0
  24. package/dist/schemas/filter-aliases.js.map +1 -0
  25. package/dist/schemas/index.d.ts +22 -22
  26. package/dist/schemas/index.d.ts.map +1 -1
  27. package/dist/schemas/index.js +54 -43
  28. package/dist/schemas/index.js.map +1 -1
  29. package/dist/server.d.ts +18 -1
  30. package/dist/server.d.ts.map +1 -1
  31. package/dist/server.js +26 -3
  32. package/dist/server.js.map +1 -1
  33. package/dist/services/boond-client.d.ts +12 -2
  34. package/dist/services/boond-client.d.ts.map +1 -1
  35. package/dist/services/boond-client.js +86 -5
  36. package/dist/services/boond-client.js.map +1 -1
  37. package/dist/services/progress.d.ts +48 -0
  38. package/dist/services/progress.d.ts.map +1 -0
  39. package/dist/services/progress.js +70 -0
  40. package/dist/services/progress.js.map +1 -0
  41. package/dist/tools/actions.d.ts.map +1 -1
  42. package/dist/tools/actions.js +3 -2
  43. package/dist/tools/actions.js.map +1 -1
  44. package/dist/tools/advantages.d.ts.map +1 -1
  45. package/dist/tools/advantages.js +3 -2
  46. package/dist/tools/advantages.js.map +1 -1
  47. package/dist/tools/crud-factory.d.ts +0 -8
  48. package/dist/tools/crud-factory.d.ts.map +1 -1
  49. package/dist/tools/crud-factory.js +72 -17
  50. package/dist/tools/crud-factory.js.map +1 -1
  51. package/dist/tools/deliveries.d.ts.map +1 -1
  52. package/dist/tools/deliveries.js +3 -2
  53. package/dist/tools/deliveries.js.map +1 -1
  54. package/dist/tools/documents.d.ts.map +1 -1
  55. package/dist/tools/documents.js +5 -2
  56. package/dist/tools/documents.js.map +1 -1
  57. package/dist/tools/notifications.d.ts.map +1 -1
  58. package/dist/tools/notifications.js +3 -2
  59. package/dist/tools/notifications.js.map +1 -1
  60. package/dist/tools/planning-absences.d.ts.map +1 -1
  61. package/dist/tools/planning-absences.js +3 -2
  62. package/dist/tools/planning-absences.js.map +1 -1
  63. package/dist/tools/purchases.d.ts.map +1 -1
  64. package/dist/tools/purchases.js +3 -2
  65. package/dist/tools/purchases.js.map +1 -1
  66. package/dist/tools/registration-decorators.d.ts +35 -0
  67. package/dist/tools/registration-decorators.d.ts.map +1 -0
  68. package/dist/tools/registration-decorators.js +30 -0
  69. package/dist/tools/registration-decorators.js.map +1 -0
  70. package/dist/tools/reporting.d.ts.map +1 -1
  71. package/dist/tools/reporting.js +9 -1
  72. package/dist/tools/reporting.js.map +1 -1
  73. package/dist/tools/timesheets.d.ts.map +1 -1
  74. package/dist/tools/timesheets.js +3 -2
  75. package/dist/tools/timesheets.js.map +1 -1
  76. package/dist/tools/validation-wrapper.d.ts +43 -0
  77. package/dist/tools/validation-wrapper.d.ts.map +1 -0
  78. package/dist/tools/validation-wrapper.js +108 -0
  79. package/dist/tools/validation-wrapper.js.map +1 -0
  80. package/dist/tools/validations.d.ts.map +1 -1
  81. package/dist/tools/validations.js +3 -2
  82. package/dist/tools/validations.js.map +1 -1
  83. package/manifest.json +8 -1
  84. package/package.json +3 -1
package/dist/icons.js ADDED
@@ -0,0 +1,169 @@
1
+ import { ListPromptsRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
2
+ import { PROMPTS } from "./prompts/index.js";
3
+ import { isFeatureDisabled } from "./config/env-flags.js";
4
+ /**
5
+ * Mid-grey: legible on both light and dark client themes. A data-URI SVG can't
6
+ * inherit `currentColor` from the host UI, so a single neutral tone beats
7
+ * shipping a light/dark pair (which would double the payload).
8
+ */
9
+ const ICON_COLOR = "%237d8794";
10
+ /**
11
+ * `BOOND_MCP_ICONS=0|false|no|off` drops icons everywhere. Measured cost of the
12
+ * full set: ~40 KiB, i.e. ~14% of the 295 KiB `tools/list` payload (180 tools ×
13
+ * ~230 B). Worth it for a client that renders them, pure overhead for a gateway
14
+ * that doesn't — hence the switch.
15
+ */
16
+ function iconsDisabled() {
17
+ return isFeatureDisabled(process.env.BOOND_MCP_ICONS);
18
+ }
19
+ /**
20
+ * Build the data URI for a single-path 16×16 glyph.
21
+ *
22
+ * Path data uses `,` as its number separator rather than a space: both are
23
+ * valid SVG, and a comma needs no percent-encoding inside a `data:` URI (a
24
+ * space does). The markup's own spaces are written as `%20` so the URI stays
25
+ * valid unquoted.
26
+ */
27
+ function glyph(path) {
28
+ return {
29
+ src: `data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'` +
30
+ `%20fill='${ICON_COLOR}'%3E%3Cpath%20d='${path.replace(/ /g, ",")}'/%3E%3C/svg%3E`,
31
+ };
32
+ }
33
+ // ---- Glyph vocabulary (reused across domains) ----
34
+ const PERSON = glyph("M8 3a2.5 2.5 0 100 5 2.5 2.5 0 000-5zM3 14v-1c0-1.7 2.2-3 5-3s5 1.3 5 3v1z");
35
+ const PEOPLE = glyph("M5 4a2 2 0 100 4 2 2 0 000-4zm6 0a2 2 0 100 4 2 2 0 000-4zM1 14v-1c0-1.4 1.8-2.5 4-2.5s4 1.1 4 2.5v1zm8 0v-1c0-1 .7-1.9 1.9-2.4 1.8.2 3.1 1.2 3.1 2.4v1z");
36
+ const BUILDING = glyph("M3 2h10v12H3zm2 2h2v2H5zm4 0h2v2H9zM5 8h2v2H5zm4 0h2v2H9zm-2 4h2v2H7z");
37
+ const TARGET = glyph("M8 2a6 6 0 100 12A6 6 0 008 2zm0 4a2 2 0 100 4 2 2 0 000-4z");
38
+ const BRIEFCASE = glyph("M6 2h4v2h3v9H3V4h3zm1 1v1h2V3z");
39
+ const DOCUMENT = glyph("M4 1h5l3 3v11H4zm1 5h6v1H5zm0 3h6v1H5zm0 3h4v1H5z");
40
+ const CALENDAR = glyph("M3 3h10v11H3zm2-2h1v3H5zm5 0h1v3h-1zM4 6h8v1H4z");
41
+ const CLOCK = glyph("M8 2a6 6 0 100 12A6 6 0 008 2zm-.5 2h1v3.7l2.3 1.4-.5.9L7.5 8.4z");
42
+ const MONEY = glyph("M2 4h12v8H2zm6 1.5A2.5 2.5 0 118 10.5a2.5 2.5 0 010-5z");
43
+ const CART = glyph("M1 2h2l2 8h8l1-5H5v-1h10l-2 8H4L2 3H1zm4 10h1.5v1.5H5zm6 0h1.5v1.5H11z");
44
+ const BOX = glyph("M8 1l6 3-6 3-6-3zM2 6l6 3v6l-6-3zm12 0v6l-6 3V9z");
45
+ const CHART = glyph("M2 13h12v1H2zm1-5h2v4H3zm4-4h2v8H7zm4 2h2v6h-2z");
46
+ const LIST = glyph("M2 3h12v2H2zm0 4h12v2H2zm0 4h12v2H2z");
47
+ const CHECK = glyph("M6.5 13L2 8.5l1.4-1.4 3.1 3.1L12.6 4l1.4 1.4z");
48
+ const TAG = glyph("M2 2h6l6 6-6 6-6-6zm2 2v2h2V4z");
49
+ const GEAR = glyph("M7 1h2v2H7zm0 12h2v2H7zM1 7h2v2H1zm12 0h2v2h-2zM8 4.5a3.5 3.5 0 100 7 3.5 3.5 0 000-7zm0 2a1.5 1.5 0 110 3 1.5 1.5 0 010-3z");
50
+ const BELL = glyph("M8 1a4 4 0 00-4 4v4l-1 2h10l-1-2V5a4 4 0 00-4-4zm-1.5 12h3a1.5 1.5 0 01-3 0z");
51
+ const CHAT = glyph("M2 3h12v8H7l-3 3v-3H2z");
52
+ const PLUG = glyph("M4 1h2v4H4zm6 0h2v4h-2zM3 6h10v2a5 5 0 01-4 4.9V15H7v-2.1A5 5 0 013 8z");
53
+ const KEY = glyph("M10 2a4 4 0 00-3.9 5L2 11.1V14h3v-2h2v-1.2l.9-.9A4 4 0 1010 2zm1 2.2a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z");
54
+ const PIN = glyph("M8 1a4.5 4.5 0 00-4.5 4.5C3.5 9 8 15 8 15s4.5-6 4.5-9.5A4.5 4.5 0 008 1zm0 2.8a1.8 1.8 0 110 3.6 1.8 1.8 0 010-3.6z");
55
+ const PLANE = glyph("M8 1l1.2 5.5L15 8l-5.8 1.5L8 15l-1.2-5.5L1 8l5.8-1.5z");
56
+ /**
57
+ * Domain → icons. Every entry of `REGISTERED_DOMAINS` must be present
58
+ * (asserted in `icons.test.ts`), so adding a domain without an icon fails CI
59
+ * rather than shipping a half-iconified catalogue.
60
+ */
61
+ export const DOMAIN_ICONS = {
62
+ candidates: [PERSON],
63
+ resources: [PEOPLE],
64
+ contacts: [PERSON],
65
+ companies: [BUILDING],
66
+ opportunities: [TARGET],
67
+ actions: [CHAT],
68
+ timesheets: [CLOCK],
69
+ projects: [BRIEFCASE],
70
+ invoices: [DOCUMENT],
71
+ orders: [DOCUMENT],
72
+ deliveries: [BRIEFCASE],
73
+ absences: [PLANE],
74
+ expenses: [MONEY],
75
+ products: [BOX],
76
+ positionings: [TARGET],
77
+ payments: [MONEY],
78
+ advantages: [MONEY],
79
+ application: [GEAR],
80
+ contracts: [DOCUMENT],
81
+ purchases: [CART],
82
+ "provider-invoices": [DOCUMENT],
83
+ accounts: [KEY],
84
+ agencies: [BUILDING],
85
+ "business-units": [BUILDING],
86
+ roles: [KEY],
87
+ logs: [LIST],
88
+ notifications: [BELL],
89
+ threads: [CHAT],
90
+ todolists: [CHECK],
91
+ flags: [TAG],
92
+ calendars: [CALENDAR],
93
+ webhooks: [PLUG],
94
+ validations: [CHECK],
95
+ poles: [PIN],
96
+ reporting: [CHART],
97
+ "planning-absences": [CALENDAR],
98
+ documents: [DOCUMENT],
99
+ workflows: [LIST],
100
+ };
101
+ /**
102
+ * Icons for the dictionary / reference resources (`boond://…`). Resolved
103
+ * through a function, not a constant, because `registerAllResources` runs at
104
+ * startup and must honour `BOOND_MCP_ICONS` too.
105
+ */
106
+ export function referenceIcons() {
107
+ return iconsDisabled() ? undefined : [LIST];
108
+ }
109
+ /** Icons for the `current-user` resource. */
110
+ export function identityIcons() {
111
+ return iconsDisabled() ? undefined : [PERSON];
112
+ }
113
+ export function iconsForDomain(domain) {
114
+ if (domain === undefined || iconsDisabled())
115
+ return undefined;
116
+ return DOMAIN_ICONS[domain];
117
+ }
118
+ /**
119
+ * Prompt → icons, from the first domain the prompt orchestrates (its subject:
120
+ * `factures_a_relancer` → invoices, `synthese_equipe` → resources).
121
+ */
122
+ export function iconsForPrompt(name) {
123
+ const prompt = PROMPTS.find((p) => p.name === name);
124
+ return iconsForDomain(prompt?.domains[0]);
125
+ }
126
+ /** Total byte cost of an icon payload, for the cap test and the docs. */
127
+ export function iconsByteSize(icons) {
128
+ return icons === undefined ? 0 : JSON.stringify(icons).length;
129
+ }
130
+ function withIcons(entry, icons) {
131
+ return icons === undefined || icons.length === 0 ? entry : { ...entry, icons };
132
+ }
133
+ /**
134
+ * Attach domain icons to `tools/list` and `prompts/list` responses.
135
+ *
136
+ * MUST be called before the first `registerTool` / `registerPrompt` on this
137
+ * server: it works by intercepting the `setRequestHandler` calls the SDK makes
138
+ * when it lazily installs those handlers. `index` is read at request time, so
139
+ * it can still be empty at install time.
140
+ */
141
+ export function installProtocolIcons(server, index) {
142
+ // `Server.setRequestHandler` is generic over the request schema; the shim is
143
+ // schema-agnostic, hence the single cast at the boundary.
144
+ const underlying = server.server;
145
+ const original = underlying.setRequestHandler.bind(underlying);
146
+ underlying.setRequestHandler = (schema, handler) => {
147
+ if (schema === ListToolsRequestSchema) {
148
+ return original(schema, async (...args) => {
149
+ const result = (await handler(...args));
150
+ if (!Array.isArray(result?.tools))
151
+ return result;
152
+ return {
153
+ ...result,
154
+ tools: result.tools.map((t) => withIcons(t, iconsForDomain(index.toolDomains.get(t.name)))),
155
+ };
156
+ });
157
+ }
158
+ if (schema === ListPromptsRequestSchema) {
159
+ return original(schema, async (...args) => {
160
+ const result = (await handler(...args));
161
+ if (!Array.isArray(result?.prompts))
162
+ return result;
163
+ return { ...result, prompts: result.prompts.map((p) => withIcons(p, iconsForPrompt(p.name))) };
164
+ });
165
+ }
166
+ return original(schema, handler);
167
+ };
168
+ }
169
+ //# sourceMappingURL=icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.js","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAEtG,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAiD1D;;;;GAIG;AACH,MAAM,UAAU,GAAG,WAAW,CAAC;AAE/B;;;;;GAKG;AACH,SAAS,aAAa;IACpB,OAAO,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACxD,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO;QACL,GAAG,EACD,4FAA4F;YAC5F,YAAY,UAAU,oBAAoB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,iBAAiB;KACrF,CAAC;AACJ,CAAC;AAED,qDAAqD;AACrD,MAAM,MAAM,GAAG,K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O,CAAC;oBAAE,OAAO,MAAM,CAAC;gBACnD,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACjG,CAAC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA2KzE,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB;;;;GAQhC,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAuF5D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA4KzE,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB;;;;GAQhC,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA4F5D"}
@@ -1,6 +1,7 @@
1
1
  import { apiRequest } from "../services/boond-client.js";
2
2
  import { getDictionary, resolveDictionaryPath } from "../services/dictionary.js";
3
3
  import { getDictionaryOverrides } from "../config/dictionary-overrides.js";
4
+ import { identityIcons, referenceIcons } from "../icons.js";
4
5
  /**
5
6
  * Curated dictionaries surfaced as static MCP resources. Slugs follow the
6
7
  * historical "kind/entity" naming for backward compatibility with client URIs;
@@ -152,6 +153,9 @@ export function registerAllResources(server) {
152
153
  title: dict.title,
153
154
  description: dict.description,
154
155
  mimeType: "application/json",
156
+ // SEP-973. Unlike tools/prompts, the SDK's resource listing spreads the
157
+ // whole config, so `icons` reaches the client with no shim needed.
158
+ icons: referenceIcons(),
155
159
  }, async () => {
156
160
  const { payload } = await getDictionary();
157
161
  const node = resolveDictionaryPath(payload, dict.path);
@@ -180,6 +184,7 @@ export function registerAllResources(server) {
180
184
  description: "Mapping libellé→ID configuré via BOOND_DICTIONARY_OVERRIDES (types d'action et états). " +
181
185
  'Renvoie { "configured": false } si aucun override n\'est configuré.',
182
186
  mimeType: "application/json",
187
+ icons: referenceIcons(),
183
188
  }, () => {
184
189
  const overrides = getDictionaryOverrides();
185
190
  return Promise.resolve({
@@ -200,6 +205,7 @@ export function registerAllResources(server) {
200
205
  description: "Profil de l'utilisateur authentifié auprès de l'API BoondManager (id, agence, permissions). " +
201
206
  "Utile pour résoudre 'mon ID' avant un appel filtré par perimeterManagers.",
202
207
  mimeType: "application/json",
208
+ icons: identityIcons(),
203
209
  }, async () => {
204
210
  const response = await apiRequest("/application/current-user");
205
211
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AA+B3E;;;;;;;;GAQG;AACH,MAAM,YAAY,GAAsB;IACtC,yEAAyE;IACzE;QACE,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,wBAAwB;QAC9B,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,kDAAkD;KAChE;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,yBAAyB;QAC/B,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,iCAAiC;KAC/C;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,uBAAuB;QAC7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,gBAAgB,EAChB;QACE,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EACT,8FAA8F;YAC9F,2EAA2E;QAC7E,QAAQ,EAAE,kBAAkB;QAC5B,KAAK,EAAE,aAAa,EAAE;KACvB,EACD,KAAK,IAAI,EAAE;QACT,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,2BAA2B,CAAC,CAAC;QAC/D,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,gBAAgB;oBACrB,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;iBACxC;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,69 @@
1
+ import type { DomainName } from "../constants.js";
2
+ /**
3
+ * Wrong-filter-name → correction table, used to turn a `.strict()` schema
4
+ * rejection into something the model can act on in one turn (SEP-1303: input
5
+ * validation failures must surface as *tool* errors so the model can
6
+ * self-correct, not as opaque protocol errors).
7
+ *
8
+ * Why this exists: the six main search endpoints take filter names that must
9
+ * match the BoondManager API query parameters verbatim (see CLAUDE.md
10
+ * §*Search Filter Naming*). The schemas are `.strict()`, so a wrong name is
11
+ * rejected rather than silently ignored — but "Unrecognized key:
12
+ * \"mainManagers\"" tells the model *that* it was wrong, never *what to use
13
+ * instead*. Every entry below is a confusion we have actually seen (or that
14
+ * the API's own naming invites), mapped to the correct name plus the one-line
15
+ * reason the correct name behaves differently.
16
+ *
17
+ * The messages are consumed by `unknownFilterMessage()`, which the search
18
+ * schemas install as their unrecognized-key error (see
19
+ * `src/tools/validation-wrapper.ts`). Keep them short: they are read by a
20
+ * model mid-call, not by a human reading docs.
21
+ */
22
+ export interface FilterAlias {
23
+ /** Input name to use instead. Absent when the filter simply does not exist on that endpoint. */
24
+ correct?: string;
25
+ /** One-line reason / usage note. Should say what the correct filter *does*, not just its name. */
26
+ hint: string;
27
+ /** Dictionary resource URI to read when the value is a state/type id. */
28
+ dictionary?: string;
29
+ }
30
+ /**
31
+ * Endpoints whose filter vocabulary differs (states/types are named after the
32
+ * entity). Everything else only gets the global table.
33
+ */
34
+ export type SearchEndpoint = Extract<DomainName, "resources" | "candidates" | "contacts" | "companies" | "opportunities" | "projects">;
35
+ /** Confusions that are wrong on every endpoint. */
36
+ export declare const GLOBAL_FILTER_ALIASES: Readonly<Record<string, FilterAlias>>;
37
+ /**
38
+ * Endpoint-specific confusions. `states` and `typeOf` are the two names the
39
+ * model reaches for by default; on four of the six endpoints they are prefixed
40
+ * with the entity, on `/contacts` it is `typesOf` (with the s), and
41
+ * `/companies` has no type filter at all.
42
+ */
43
+ export declare const ENDPOINT_FILTER_ALIASES: Readonly<Record<SearchEndpoint, Readonly<Record<string, FilterAlias>>>>;
44
+ /** Resolve a wrong filter name to its correction, endpoint-specific table first. */
45
+ export declare function resolveFilterAlias(key: string, endpoint?: SearchEndpoint): FilterAlias | undefined;
46
+ /**
47
+ * Closest accepted key within 2 edits (case/separator-insensitive), for typos
48
+ * the alias table doesn't know about (`pagesize`, `keywordType`, …).
49
+ */
50
+ export declare function closestKey(key: string, validKeys: readonly string[]): string | undefined;
51
+ /**
52
+ * Build the text returned to the model when a search call carries unknown
53
+ * filter names. Shape, per unknown key:
54
+ *
55
+ * Filtre inconnu « mainManagers » → utiliser `perimeterManagers` (…).
56
+ *
57
+ * plus, when the correction is a state/type filter, the dictionary resource to
58
+ * read for the ids. Ends with the accepted filter list so the model can retry
59
+ * from the error alone rather than re-reading the whole tool schema.
60
+ *
61
+ * A correction is only printed when the replacement is **actually accepted by
62
+ * this endpoint**. The wrapper runs on every search tool, not just the six
63
+ * perimeter-aware ones, and the global table is written for those: telling
64
+ * `boond_invoices_search` to use `perimeterAgencies` (which it does not accept)
65
+ * sends the model into a second rejection, after which it typically drops the
66
+ * filter and reports a company-wide list as if it were scoped.
67
+ */
68
+ export declare function unknownFilterMessage(keys: readonly string[], validKeys: readonly string[], endpoint?: SearchEndpoint): string;
69
+ //# sourceMappingURL=filter-aliases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-aliases.d.ts","sourceRoot":"","sources":["../../src/schemas/filter-aliases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,WAAW,WAAW;IAC1B,gGAAgG;IAChG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kGAAkG;IAClG,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAClC,UAAU,EACV,WAAW,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,eAAe,GAAG,UAAU,CACrF,CAAC;AAIF,mDAAmD;AACnD,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAuCvE,CAAC;AAKF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CA2D3G,CAAC;AAqBF,oFAAoF;AACpF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,WAAW,GAAG,SAAS,CAOlG;AAgBD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAUxF;AAaD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,QAAQ,CAAC,EAAE,cAAc,GACxB,MAAM,CAkCR"}
@@ -0,0 +1,225 @@
1
+ const PERIMETER_DYNAMIC_NOTE = 'pour « mes données / mon équipe », `perimeterDynamic: ["data"|"managers"]`';
2
+ /** Confusions that are wrong on every endpoint. */
3
+ export const GLOBAL_FILTER_ALIASES = {
4
+ mainmanagers: {
5
+ correct: "perimeterManagers",
6
+ hint: `IDs des managers dont on veut l'équipe (${PERIMETER_DYNAMIC_NOTE})`,
7
+ },
8
+ managers: {
9
+ correct: "perimeterManagers",
10
+ hint: `IDs des managers dont on veut l'équipe (${PERIMETER_DYNAMIC_NOTE})`,
11
+ },
12
+ agencies: { correct: "perimeterAgencies", hint: "IDs d'agences ; combiner avec `narrowPerimeter: true` pour un ET" },
13
+ poles: { correct: "perimeterPoles", hint: "IDs de pôles" },
14
+ businessunits: { correct: "perimeterBusinessUnits", hint: "IDs de business units" },
15
+ // Pagination: `maxResults` is the *API* name; the tools expose `pageSize`.
16
+ maxresults: { correct: "pageSize", hint: "le nom API `maxResults` est dérivé côté serveur" },
17
+ limit: { correct: "pageSize", hint: "nombre de résultats par page" },
18
+ perpage: { correct: "pageSize", hint: "nombre de résultats par page" },
19
+ offset: { correct: "page", hint: "pagination par numéro de page, pas par offset" },
20
+ start: { correct: "page", hint: "pagination par numéro de page, pas par offset" },
21
+ sortby: { correct: "sort", hint: "nom du champ de tri" },
22
+ orderby: { correct: "order", hint: '"asc" ou "desc"' },
23
+ q: { correct: "keywords", hint: "recherche plein texte" },
24
+ query: { correct: "keywords", hint: "recherche plein texte" },
25
+ search: { correct: "keywords", hint: "recherche plein texte" },
26
+ name: { correct: "keywords", hint: 'cibler un champ précis via `keywordsType` (ex: "lastName", "fullName")' },
27
+ fullname: { correct: "keywords", hint: '`keywordsType: "fullName"` avec `keywords: "NOM#PRENOM"`' },
28
+ lastname: { correct: "keywords", hint: '`keywordsType: "lastName"`' },
29
+ firstname: { correct: "keywords", hint: '`keywordsType: "firstName"`' },
30
+ email: { correct: "keywords", hint: '`keywordsType: "emails"`' },
31
+ emails: { correct: "keywords", hint: '`keywordsType: "emails"`' },
32
+ // Linked-entity lookups go through the `keywords` prefix syntax.
33
+ companyid: {
34
+ correct: "keywords",
35
+ hint: 'entité liée : `keywords: "CSOC<id>"` (projets : filtre `companies: [<id>]`)',
36
+ },
37
+ contactid: { correct: "keywords", hint: 'entité liée : `keywords: "CCON<id>"`' },
38
+ candidateid: { correct: "keywords", hint: 'entité liée : `keywords: "CAND<id>"`' },
39
+ resourceid: { correct: "keywords", hint: 'entité liée : `keywords: "COMP<id>"`' },
40
+ opportunityid: { correct: "keywords", hint: 'entité liée : `keywords: "AO<id>"`' },
41
+ projectid: { correct: "keywords", hint: 'entité liée : `keywords: "PRJ<id>"`' },
42
+ };
43
+ const STATES_URI = (entity) => `boond://dictionary/states/${entity}`;
44
+ const TYPEOF_URI = (entity) => `boond://dictionary/typeOf/${entity}`;
45
+ /**
46
+ * Endpoint-specific confusions. `states` and `typeOf` are the two names the
47
+ * model reaches for by default; on four of the six endpoints they are prefixed
48
+ * with the entity, on `/contacts` it is `typesOf` (with the s), and
49
+ * `/companies` has no type filter at all.
50
+ */
51
+ export const ENDPOINT_FILTER_ALIASES = {
52
+ resources: {
53
+ states: { correct: "resourceStates", hint: "IDs d'états (entiers)", dictionary: STATES_URI("resources") },
54
+ excludestates: {
55
+ correct: "excludeResourceStates",
56
+ hint: "IDs d'états à exclure",
57
+ dictionary: STATES_URI("resources"),
58
+ },
59
+ typeof: { correct: "resourceTypes", hint: "IDs de types (entiers)", dictionary: TYPEOF_URI("resources") },
60
+ types: { correct: "resourceTypes", hint: "IDs de types (entiers)", dictionary: TYPEOF_URI("resources") },
61
+ typesof: { correct: "resourceTypes", hint: "IDs de types (entiers)", dictionary: TYPEOF_URI("resources") },
62
+ },
63
+ candidates: {
64
+ states: { correct: "candidateStates", hint: "IDs d'états (entiers)", dictionary: STATES_URI("candidates") },
65
+ typeof: { correct: "candidateTypes", hint: "IDs de types (entiers)", dictionary: TYPEOF_URI("resources") },
66
+ types: { correct: "candidateTypes", hint: "IDs de types (entiers)", dictionary: TYPEOF_URI("resources") },
67
+ typesof: { correct: "candidateTypes", hint: "IDs de types (entiers)", dictionary: TYPEOF_URI("resources") },
68
+ },
69
+ contacts: {
70
+ typeof: {
71
+ correct: "typesOf",
72
+ hint: "avec un `s` : `typesOf` (IDs entiers)",
73
+ dictionary: TYPEOF_URI("contacts"),
74
+ },
75
+ types: { correct: "typesOf", hint: "IDs de types de contact (entiers)", dictionary: TYPEOF_URI("contacts") },
76
+ contactstates: {
77
+ correct: "states",
78
+ hint: "sur /contacts le filtre s'appelle `states`",
79
+ dictionary: STATES_URI("contacts"),
80
+ },
81
+ },
82
+ companies: {
83
+ typeof: {
84
+ hint: "/companies n'expose aucun filtre de type — filtrer sur `states`, `activityAreas` ou après lecture",
85
+ },
86
+ types: {
87
+ hint: "/companies n'expose aucun filtre de type — filtrer sur `states`, `activityAreas` ou après lecture",
88
+ },
89
+ // `typesOf` is the correct name on /contacts, so the model transfers it here.
90
+ typesof: {
91
+ hint: "/companies n'expose aucun filtre de type (`typesOf` n'existe que sur /contacts) — filtrer sur `states` ou `activityAreas`",
92
+ },
93
+ companystates: {
94
+ correct: "states",
95
+ hint: "sur /companies le filtre s'appelle `states`",
96
+ dictionary: STATES_URI("companies"),
97
+ },
98
+ },
99
+ opportunities: {
100
+ states: { correct: "opportunityStates", hint: "IDs d'états (entiers)", dictionary: STATES_URI("opportunities") },
101
+ typeof: { correct: "opportunityTypes", hint: "IDs de types", dictionary: TYPEOF_URI("projects") },
102
+ types: { correct: "opportunityTypes", hint: "IDs de types", dictionary: TYPEOF_URI("projects") },
103
+ },
104
+ projects: {
105
+ states: { correct: "projectStates", hint: "IDs d'états (entiers)", dictionary: STATES_URI("projects") },
106
+ typeof: { correct: "projectTypes", hint: "IDs de types (entiers)", dictionary: TYPEOF_URI("projects") },
107
+ types: { correct: "projectTypes", hint: "IDs de types (entiers)", dictionary: TYPEOF_URI("projects") },
108
+ company: { correct: "companies", hint: "tableau d'IDs de sociétés, ex: `companies: [42]`" },
109
+ },
110
+ };
111
+ /**
112
+ * Lookup key: lowercase, separators stripped. So `max_results`, `maxResults`
113
+ * and `MAXRESULTS` all resolve to the same entry — the model's mistakes are
114
+ * about the *word*, not its casing.
115
+ */
116
+ function normalizeKey(key) {
117
+ return key.toLowerCase().replace(/[-_\s]/g, "");
118
+ }
119
+ /**
120
+ * Own-property lookup. The tables are object literals, so a plain `table[norm]`
121
+ * happily returns `Object.prototype.constructor` / `toString` / `hasOwnProperty`
122
+ * for a filter named after them — a truthy value with no `.correct`/`.hint`,
123
+ * which used to print "Filtre inconnu « constructor » : undefined.".
124
+ */
125
+ function lookupAlias(table, norm) {
126
+ return Object.hasOwn(table, norm) ? table[norm] : undefined;
127
+ }
128
+ /** Resolve a wrong filter name to its correction, endpoint-specific table first. */
129
+ export function resolveFilterAlias(key, endpoint) {
130
+ const norm = normalizeKey(key);
131
+ if (endpoint !== undefined && Object.hasOwn(ENDPOINT_FILTER_ALIASES, endpoint)) {
132
+ const specific = lookupAlias(ENDPOINT_FILTER_ALIASES[endpoint], norm);
133
+ if (specific)
134
+ return specific;
135
+ }
136
+ return lookupAlias(GLOBAL_FILTER_ALIASES, norm);
137
+ }
138
+ /** Levenshtein distance, capped: we only care about "is it within 2 edits". */
139
+ function editDistance(a, b, max) {
140
+ if (Math.abs(a.length - b.length) > max)
141
+ return max + 1;
142
+ let prev = Array.from({ length: b.length + 1 }, (_, i) => i);
143
+ for (let i = 1; i <= a.length; i++) {
144
+ const row = [i];
145
+ for (let j = 1; j <= b.length; j++) {
146
+ row[j] = Math.min(prev[j] + 1, row[j - 1] + 1, prev[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1));
147
+ }
148
+ prev = row;
149
+ }
150
+ return prev[b.length];
151
+ }
152
+ /**
153
+ * Closest accepted key within 2 edits (case/separator-insensitive), for typos
154
+ * the alias table doesn't know about (`pagesize`, `keywordType`, …).
155
+ */
156
+ export function closestKey(key, validKeys) {
157
+ const norm = normalizeKey(key);
158
+ let best;
159
+ for (const candidate of validKeys) {
160
+ const distance = editDistance(norm, normalizeKey(candidate), 2);
161
+ if (distance <= 2 && (best === undefined || distance < best.distance)) {
162
+ best = { key: candidate, distance };
163
+ }
164
+ }
165
+ return best?.key;
166
+ }
167
+ /** Cap the accepted-filters list so one bad key can't produce a wall of text. */
168
+ const MAX_ACCEPTED_KEYS_LISTED = 25;
169
+ /**
170
+ * Cap the number of per-key correction lines, for the same reason: the message
171
+ * is read by a model mid-call. A stray 40-key filter object would otherwise emit
172
+ * 40 lines (and 40 full Levenshtein scans) — several thousand characters on a
173
+ * path whose whole point is a short, actionable correction.
174
+ */
175
+ const MAX_UNKNOWN_KEYS_EXPLAINED = 6;
176
+ /**
177
+ * Build the text returned to the model when a search call carries unknown
178
+ * filter names. Shape, per unknown key:
179
+ *
180
+ * Filtre inconnu « mainManagers » → utiliser `perimeterManagers` (…).
181
+ *
182
+ * plus, when the correction is a state/type filter, the dictionary resource to
183
+ * read for the ids. Ends with the accepted filter list so the model can retry
184
+ * from the error alone rather than re-reading the whole tool schema.
185
+ *
186
+ * A correction is only printed when the replacement is **actually accepted by
187
+ * this endpoint**. The wrapper runs on every search tool, not just the six
188
+ * perimeter-aware ones, and the global table is written for those: telling
189
+ * `boond_invoices_search` to use `perimeterAgencies` (which it does not accept)
190
+ * sends the model into a second rejection, after which it typically drops the
191
+ * filter and reports a company-wide list as if it were scoped.
192
+ */
193
+ export function unknownFilterMessage(keys, validKeys, endpoint) {
194
+ const lines = [];
195
+ const explained = keys.slice(0, MAX_UNKNOWN_KEYS_EXPLAINED);
196
+ for (const key of explained) {
197
+ const alias = resolveFilterAlias(key, endpoint);
198
+ if (alias?.correct !== undefined && validKeys.includes(alias.correct)) {
199
+ const dict = alias.dictionary ? ` — IDs via ${alias.dictionary}` : "";
200
+ lines.push(`Filtre inconnu « ${key} » → utiliser \`${alias.correct}\` : ${alias.hint}${dict}.`);
201
+ continue;
202
+ }
203
+ // An endpoint-specific entry without `correct` says "this filter does not
204
+ // exist here" — that hint is always safe to print. A global correction whose
205
+ // replacement this endpoint doesn't accept is not, so it falls through.
206
+ if (alias !== undefined && alias.correct === undefined) {
207
+ lines.push(`Filtre inconnu « ${key} » : ${alias.hint}.`);
208
+ continue;
209
+ }
210
+ const near = closestKey(key, validKeys);
211
+ lines.push(near !== undefined
212
+ ? `Filtre inconnu « ${key} » → vouliez-vous dire \`${near}\` ?`
213
+ : `Filtre inconnu « ${key} » : non supporté par cet endpoint (ne pas le renvoyer).`);
214
+ }
215
+ if (keys.length > explained.length) {
216
+ lines.push(`… et ${keys.length - explained.length} autre(s) filtre(s) inconnu(s) à retirer.`);
217
+ }
218
+ const listed = validKeys.slice(0, MAX_ACCEPTED_KEYS_LISTED);
219
+ const suffix = validKeys.length > listed.length ? `, … (${validKeys.length} au total)` : "";
220
+ if (listed.length > 0) {
221
+ lines.push(`Filtres acceptés : ${listed.join(", ")}${suffix}.`);
222
+ }
223
+ return lines.join("\n");
224
+ }
225
+ //# sourceMappingURL=filter-aliases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-aliases.js","sourceRoot":"","sources":["../../src/schemas/filter-aliases.ts"],"names":[],"mappings":"AAyCA,MAAM,sBAAsB,GAAG,4EAA4E,CAAC;AAE5G,mDAAmD;AACnD,MAAM,CAAC,MAAM,qBAAqB,GAA0C;IAC1E,YAAY,EAAE;QACZ,OAAO,EAAE,mBAAmB;QAC5B,IAAI,EAAE,2CAA2C,sBAAsB,GAAG;KAC3E;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,mBAAmB;QAC5B,IAAI,EAAE,2CAA2C,sBAAsB,GAAG;KAC3E;IACD,QAAQ,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,kEAAkE,EAAE;IACpH,KAAK,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,cAAc,EAAE;IAC1D,aAAa,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