boondmanager-mcp-server 2.3.0 → 2.5.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.
- package/README.md +20 -1
- package/dist/config/dictionary-overrides.d.ts +57 -0
- package/dist/config/dictionary-overrides.d.ts.map +1 -0
- package/dist/config/dictionary-overrides.js +193 -0
- package/dist/config/dictionary-overrides.js.map +1 -0
- package/dist/constants.d.ts +3 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +7 -0
- package/dist/constants.js.map +1 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +25 -0
- package/dist/resources/index.js.map +1 -1
- package/dist/schemas/index.d.ts +64 -13
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +144 -20
- package/dist/schemas/index.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +2 -1
- package/dist/server.js.map +1 -1
- package/dist/services/boond-client.d.ts +34 -1
- package/dist/services/boond-client.d.ts.map +1 -1
- package/dist/services/boond-client.js +156 -4
- package/dist/services/boond-client.js.map +1 -1
- package/dist/tools/absences.d.ts.map +1 -1
- package/dist/tools/absences.js +12 -20
- package/dist/tools/absences.js.map +1 -1
- package/dist/tools/actions.d.ts.map +1 -1
- package/dist/tools/actions.js +63 -19
- package/dist/tools/actions.js.map +1 -1
- package/dist/tools/candidates.js +2 -2
- package/dist/tools/candidates.js.map +1 -1
- package/dist/tools/companies.js +2 -2
- package/dist/tools/companies.js.map +1 -1
- package/dist/tools/contacts.js +2 -2
- package/dist/tools/contacts.js.map +1 -1
- package/dist/tools/crud-factory.d.ts +40 -2
- package/dist/tools/crud-factory.d.ts.map +1 -1
- package/dist/tools/crud-factory.js +164 -16
- package/dist/tools/crud-factory.js.map +1 -1
- package/dist/tools/documents.d.ts +3 -0
- package/dist/tools/documents.d.ts.map +1 -0
- package/dist/tools/documents.js +118 -0
- package/dist/tools/documents.js.map +1 -0
- package/dist/tools/expenses.d.ts.map +1 -1
- package/dist/tools/expenses.js +17 -20
- package/dist/tools/expenses.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/invoices.d.ts.map +1 -1
- package/dist/tools/invoices.js +12 -20
- package/dist/tools/invoices.js.map +1 -1
- package/dist/tools/opportunities.d.ts.map +1 -1
- package/dist/tools/opportunities.js +3 -3
- package/dist/tools/opportunities.js.map +1 -1
- package/dist/tools/orders.d.ts.map +1 -1
- package/dist/tools/orders.js +12 -20
- package/dist/tools/orders.js.map +1 -1
- package/dist/tools/positionings.d.ts.map +1 -1
- package/dist/tools/positionings.js +81 -16
- package/dist/tools/positionings.js.map +1 -1
- package/dist/tools/projects.js +2 -2
- package/dist/tools/projects.js.map +1 -1
- package/dist/tools/purchases.d.ts.map +1 -1
- package/dist/tools/purchases.js +16 -21
- package/dist/tools/purchases.js.map +1 -1
- package/dist/tools/resources.d.ts.map +1 -1
- package/dist/tools/resources.js +14 -3
- package/dist/tools/resources.js.map +1 -1
- package/dist/transports/http.d.ts.map +1 -1
- package/dist/transports/http.js +15 -0
- package/dist/transports/http.js.map +1 -1
- package/manifest.json +18 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
Serveur MCP (Model Context Protocol) pour l'API BoondManager, permettant a Claude (Desktop, Cowork, Code) de rechercher, consulter, creer et modifier des enregistrements dans votre instance BoondManager.
|
|
15
15
|
|
|
16
|
-
**
|
|
16
|
+
**175 outils** couvrant **38 domaines** de l'API BoondManager. Voir [TOOLS.md](./TOOLS.md) pour le catalogue auto-généré (outils + prompts + ressources).
|
|
17
17
|
|
|
18
18
|
## Domaines couverts
|
|
19
19
|
|
|
@@ -444,6 +444,25 @@ comptabilité), et/ou bloquer les écritures et suppressions.
|
|
|
444
444
|
|
|
445
445
|
Guide complet, règles de résolution et exemples : [docs/access-control.md](docs/access-control.md).
|
|
446
446
|
|
|
447
|
+
### Libellés personnalisés du dictionnaire
|
|
448
|
+
|
|
449
|
+
Si votre instance BoondManager utilise des libellés de dictionnaire
|
|
450
|
+
personnalisés (ex. types d'action ou états en anglais), vous pouvez déclarer
|
|
451
|
+
le mapping libellé→ID via `BOOND_DICTIONARY_OVERRIDES` (JSON inline ou chemin
|
|
452
|
+
vers un fichier JSON) :
|
|
453
|
+
|
|
454
|
+
```bash
|
|
455
|
+
export BOOND_DICTIONARY_OVERRIDES='{"action":{"contact":{"Call":61,"Email":63}},"state":{"candidate":{"Interviewed":2}}}'
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
Le serveur accepte alors ces libellés pour le `typeOf` de
|
|
459
|
+
`boond_actions_create` et les champs `state` des créations/modifications, les
|
|
460
|
+
résout automatiquement en IDs numériques, et enrichit les descriptions des
|
|
461
|
+
outils avec les libellés disponibles. Sans cette variable, le comportement est
|
|
462
|
+
strictement inchangé.
|
|
463
|
+
|
|
464
|
+
Format complet, entités supportées et limites : [docs/dictionary-overrides.md](docs/dictionary-overrides.md).
|
|
465
|
+
|
|
447
466
|
## Transports
|
|
448
467
|
|
|
449
468
|
Le serveur supporte deux transports MCP, selectionnables via la variable d'environnement `MCP_TRANSPORT`.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dictionary overrides: let operators whose BoondManager instance uses
|
|
3
|
+
* customised dictionary labels (e.g. English action types or states) declare
|
|
4
|
+
* a label→id mapping, so the model can pass human labels instead of opaque
|
|
5
|
+
* numeric dictionary ids.
|
|
6
|
+
*
|
|
7
|
+
* Env var (optional):
|
|
8
|
+
* - `BOOND_DICTIONARY_OVERRIDES` Either inline JSON (the value starts with
|
|
9
|
+
* `{`) or a path to a UTF-8 JSON file. Expected shape:
|
|
10
|
+
*
|
|
11
|
+
* {
|
|
12
|
+
* "action": { "contact": { "Call": 61, "Email": 63 }, "candidate": { ... } },
|
|
13
|
+
* "state": { "candidate": { "Interviewed": 2 }, "opportunity": { ... } }
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* Both sections are optional. Unknown entity keys are warned-and-ignored.
|
|
17
|
+
* Any hard error (unreadable file, invalid JSON, invalid structure) is logged
|
|
18
|
+
* as a warning and the overrides are simply disabled: the server ALWAYS
|
|
19
|
+
* starts (fail-open, same philosophy as services/update-checker.ts).
|
|
20
|
+
*
|
|
21
|
+
* This is a pure input-side convenience: it never translates API responses.
|
|
22
|
+
*/
|
|
23
|
+
/** Entities that can carry an action `typeOf` (see `setting.action.*`). */
|
|
24
|
+
export declare const ACTION_ENTITIES: readonly ["contact", "candidate", "resource", "opportunity", "project"];
|
|
25
|
+
/** Entities that carry a `state` attribute (see `setting.state.*`). */
|
|
26
|
+
export declare const STATE_ENTITIES: readonly ["candidate", "resource", "contact", "company", "opportunity", "project", "positioning", "quotation", "product", "invoice", "order", "absence"];
|
|
27
|
+
export type OverrideSection = "action" | "state";
|
|
28
|
+
/** Custom label → numeric dictionary id. */
|
|
29
|
+
export type LabelMap = Record<string, number>;
|
|
30
|
+
export interface DictionaryOverrides {
|
|
31
|
+
action: Partial<Record<string, LabelMap>>;
|
|
32
|
+
state: Partial<Record<string, LabelMap>>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Load and validate the overrides from the environment. Resilient: any error
|
|
36
|
+
* is logged as a warning and `null` is returned — the server always starts.
|
|
37
|
+
*/
|
|
38
|
+
export declare function loadDictionaryOverrides(env?: NodeJS.ProcessEnv): DictionaryOverrides | null;
|
|
39
|
+
export declare function getDictionaryOverrides(): DictionaryOverrides | null;
|
|
40
|
+
/** Reset the singleton (tests only). */
|
|
41
|
+
export declare function resetDictionaryOverridesForTests(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Resolve a custom label to its numeric dictionary id. Matching is
|
|
44
|
+
* case-insensitive and ignores leading/trailing whitespace.
|
|
45
|
+
*/
|
|
46
|
+
export declare function resolveLabel(section: OverrideSection, entity: string, label: string): number | undefined;
|
|
47
|
+
/** Labels declared for a section/entity (original casing), or [] if none. */
|
|
48
|
+
export declare function availableLabels(section: OverrideSection, entity: string): string[];
|
|
49
|
+
/** Compact "Label=id, Label=id" summary for a section/entity, or null if none. */
|
|
50
|
+
export declare function formatOverridesSummary(section: OverrideSection, entity: string): string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Append the accepted custom labels to a schema/tool description. Returns the
|
|
53
|
+
* base string unchanged (byte-for-byte) when no override is configured for
|
|
54
|
+
* this section/entity.
|
|
55
|
+
*/
|
|
56
|
+
export declare function appendOverridesToDescription(base: string, section: OverrideSection, entity: string): string;
|
|
57
|
+
//# sourceMappingURL=dictionary-overrides.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary-overrides.d.ts","sourceRoot":"","sources":["../../src/config/dictionary-overrides.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,2EAA2E;AAC3E,eAAO,MAAM,eAAe,yEAA0E,CAAC;AAEvG,uEAAuE;AACvE,eAAO,MAAM,cAAc,0JAajB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjD,4CAA4C;AAC5C,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC1C,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;CAC1C;AA8CD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,mBAAmB,GAAG,IAAI,CAuDxG;AASD,wBAAgB,sBAAsB,IAAI,mBAAmB,GAAG,IAAI,CAMnE;AAED,wCAAwC;AACxC,wBAAgB,gCAAgC,IAAI,IAAI,CAGvD;AAaD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQxG;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAGlF;AAED,kFAAkF;AAClF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM9F;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAI3G"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { logger } from "../services/logger.js";
|
|
4
|
+
/**
|
|
5
|
+
* Dictionary overrides: let operators whose BoondManager instance uses
|
|
6
|
+
* customised dictionary labels (e.g. English action types or states) declare
|
|
7
|
+
* a label→id mapping, so the model can pass human labels instead of opaque
|
|
8
|
+
* numeric dictionary ids.
|
|
9
|
+
*
|
|
10
|
+
* Env var (optional):
|
|
11
|
+
* - `BOOND_DICTIONARY_OVERRIDES` Either inline JSON (the value starts with
|
|
12
|
+
* `{`) or a path to a UTF-8 JSON file. Expected shape:
|
|
13
|
+
*
|
|
14
|
+
* {
|
|
15
|
+
* "action": { "contact": { "Call": 61, "Email": 63 }, "candidate": { ... } },
|
|
16
|
+
* "state": { "candidate": { "Interviewed": 2 }, "opportunity": { ... } }
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* Both sections are optional. Unknown entity keys are warned-and-ignored.
|
|
20
|
+
* Any hard error (unreadable file, invalid JSON, invalid structure) is logged
|
|
21
|
+
* as a warning and the overrides are simply disabled: the server ALWAYS
|
|
22
|
+
* starts (fail-open, same philosophy as services/update-checker.ts).
|
|
23
|
+
*
|
|
24
|
+
* This is a pure input-side convenience: it never translates API responses.
|
|
25
|
+
*/
|
|
26
|
+
/** Entities that can carry an action `typeOf` (see `setting.action.*`). */
|
|
27
|
+
export const ACTION_ENTITIES = ["contact", "candidate", "resource", "opportunity", "project"];
|
|
28
|
+
/** Entities that carry a `state` attribute (see `setting.state.*`). */
|
|
29
|
+
export const STATE_ENTITIES = [
|
|
30
|
+
"candidate",
|
|
31
|
+
"resource",
|
|
32
|
+
"contact",
|
|
33
|
+
"company",
|
|
34
|
+
"opportunity",
|
|
35
|
+
"project",
|
|
36
|
+
"positioning",
|
|
37
|
+
"quotation",
|
|
38
|
+
"product",
|
|
39
|
+
"invoice",
|
|
40
|
+
"order",
|
|
41
|
+
"absence",
|
|
42
|
+
];
|
|
43
|
+
// Values must be numeric dictionary ids (>= 0).
|
|
44
|
+
const LabelMapSchema = z.record(z.string().min(1), z.number().int().min(0));
|
|
45
|
+
// Top-level shape. `.strict()` so a typo like "actions" fails loudly (warn +
|
|
46
|
+
// disabled) instead of being silently dropped.
|
|
47
|
+
const OverridesFileSchema = z
|
|
48
|
+
.object({
|
|
49
|
+
action: z.record(z.string(), LabelMapSchema).optional(),
|
|
50
|
+
state: z.record(z.string(), LabelMapSchema).optional(),
|
|
51
|
+
})
|
|
52
|
+
.strict();
|
|
53
|
+
// --- Env parsing helper (mirroring config/access-policy.ts) ---
|
|
54
|
+
function readEnv(env, key) {
|
|
55
|
+
const raw = env[key];
|
|
56
|
+
if (raw === undefined)
|
|
57
|
+
return undefined;
|
|
58
|
+
// Ignore unresolved placeholders like "${SOMETHING}" (same guard as http.ts).
|
|
59
|
+
if (raw.startsWith("${"))
|
|
60
|
+
return undefined;
|
|
61
|
+
if (raw.trim().length === 0)
|
|
62
|
+
return undefined;
|
|
63
|
+
return raw;
|
|
64
|
+
}
|
|
65
|
+
/** Keep only known entity keys; warn-and-ignore the rest (never fatal). */
|
|
66
|
+
function filterKnownEntities(section, raw, known, log) {
|
|
67
|
+
const out = {};
|
|
68
|
+
for (const [entity, labels] of Object.entries(raw)) {
|
|
69
|
+
if (known.includes(entity)) {
|
|
70
|
+
if (Object.keys(labels).length > 0)
|
|
71
|
+
out[entity] = labels;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
log.warn({ section, entity, known: [...known] }, `BOOND_DICTIONARY_OVERRIDES: unknown ${section} entity "${entity}" ignored`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return out;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Load and validate the overrides from the environment. Resilient: any error
|
|
81
|
+
* is logged as a warning and `null` is returned — the server always starts.
|
|
82
|
+
*/
|
|
83
|
+
export function loadDictionaryOverrides(env = process.env) {
|
|
84
|
+
const log = logger.child({ component: "dictionary-overrides" });
|
|
85
|
+
const raw = readEnv(env, "BOOND_DICTIONARY_OVERRIDES");
|
|
86
|
+
if (raw === undefined)
|
|
87
|
+
return null;
|
|
88
|
+
// Inline JSON if the value starts with "{", otherwise a file path.
|
|
89
|
+
let text = raw;
|
|
90
|
+
const trimmed = raw.trim();
|
|
91
|
+
if (!trimmed.startsWith("{")) {
|
|
92
|
+
try {
|
|
93
|
+
text = readFileSync(trimmed, "utf-8");
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
log.warn({ path: trimmed, err: err instanceof Error ? err.message : String(err) }, "BOOND_DICTIONARY_OVERRIDES: cannot read overrides file; custom labels disabled");
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
let parsed;
|
|
101
|
+
try {
|
|
102
|
+
parsed = JSON.parse(text);
|
|
103
|
+
}
|
|
104
|
+
catch (err) {
|
|
105
|
+
log.warn({ err: err instanceof Error ? err.message : String(err) }, "BOOND_DICTIONARY_OVERRIDES: invalid JSON; custom labels disabled");
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
const result = OverridesFileSchema.safeParse(parsed);
|
|
109
|
+
if (!result.success) {
|
|
110
|
+
log.warn({ issues: result.error.issues }, "BOOND_DICTIONARY_OVERRIDES: invalid structure; custom labels disabled");
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
const overrides = {
|
|
114
|
+
action: filterKnownEntities("action", result.data.action ?? {}, ACTION_ENTITIES, log),
|
|
115
|
+
state: filterKnownEntities("state", result.data.state ?? {}, STATE_ENTITIES, log),
|
|
116
|
+
};
|
|
117
|
+
if (Object.keys(overrides.action).length === 0 && Object.keys(overrides.state).length === 0) {
|
|
118
|
+
log.warn("BOOND_DICTIONARY_OVERRIDES: no usable entry after validation; custom labels disabled");
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
log.info({
|
|
122
|
+
actionEntities: Object.keys(overrides.action),
|
|
123
|
+
stateEntities: Object.keys(overrides.state),
|
|
124
|
+
}, "Dictionary overrides active: custom labels will be resolved to numeric ids");
|
|
125
|
+
return overrides;
|
|
126
|
+
}
|
|
127
|
+
// --- Lazy singleton over process.env ---
|
|
128
|
+
// Loaded on first use (NOT at import time) so tests can set the env var after
|
|
129
|
+
// importing modules that depend on this one.
|
|
130
|
+
let cached = null;
|
|
131
|
+
let loaded = false;
|
|
132
|
+
export function getDictionaryOverrides() {
|
|
133
|
+
if (!loaded) {
|
|
134
|
+
cached = loadDictionaryOverrides(process.env);
|
|
135
|
+
loaded = true;
|
|
136
|
+
}
|
|
137
|
+
return cached;
|
|
138
|
+
}
|
|
139
|
+
/** Reset the singleton (tests only). */
|
|
140
|
+
export function resetDictionaryOverridesForTests() {
|
|
141
|
+
cached = null;
|
|
142
|
+
loaded = false;
|
|
143
|
+
}
|
|
144
|
+
// --- Resolution helpers ---
|
|
145
|
+
function normalizeLabel(label) {
|
|
146
|
+
return label.trim().toLowerCase();
|
|
147
|
+
}
|
|
148
|
+
function labelMapFor(section, entity) {
|
|
149
|
+
const overrides = getDictionaryOverrides();
|
|
150
|
+
return overrides?.[section][entity];
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Resolve a custom label to its numeric dictionary id. Matching is
|
|
154
|
+
* case-insensitive and ignores leading/trailing whitespace.
|
|
155
|
+
*/
|
|
156
|
+
export function resolveLabel(section, entity, label) {
|
|
157
|
+
const map = labelMapFor(section, entity);
|
|
158
|
+
if (!map)
|
|
159
|
+
return undefined;
|
|
160
|
+
const wanted = normalizeLabel(label);
|
|
161
|
+
for (const [key, id] of Object.entries(map)) {
|
|
162
|
+
if (normalizeLabel(key) === wanted)
|
|
163
|
+
return id;
|
|
164
|
+
}
|
|
165
|
+
return undefined;
|
|
166
|
+
}
|
|
167
|
+
/** Labels declared for a section/entity (original casing), or [] if none. */
|
|
168
|
+
export function availableLabels(section, entity) {
|
|
169
|
+
const map = labelMapFor(section, entity);
|
|
170
|
+
return map ? Object.keys(map) : [];
|
|
171
|
+
}
|
|
172
|
+
/** Compact "Label=id, Label=id" summary for a section/entity, or null if none. */
|
|
173
|
+
export function formatOverridesSummary(section, entity) {
|
|
174
|
+
const map = labelMapFor(section, entity);
|
|
175
|
+
if (!map)
|
|
176
|
+
return null;
|
|
177
|
+
const entries = Object.entries(map);
|
|
178
|
+
if (entries.length === 0)
|
|
179
|
+
return null;
|
|
180
|
+
return entries.map(([label, id]) => `${label}=${id}`).join(", ");
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Append the accepted custom labels to a schema/tool description. Returns the
|
|
184
|
+
* base string unchanged (byte-for-byte) when no override is configured for
|
|
185
|
+
* this section/entity.
|
|
186
|
+
*/
|
|
187
|
+
export function appendOverridesToDescription(base, section, entity) {
|
|
188
|
+
const summary = formatOverridesSummary(section, entity);
|
|
189
|
+
if (summary === null)
|
|
190
|
+
return base;
|
|
191
|
+
return `${base}\nLibellés personnalisés acceptés (résolus automatiquement) : ${summary}`;
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=dictionary-overr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,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAAC,IAAY,EAAE,OAAwB,EAAE,MAAc;IACjG,MAAM,OAAO,GAAG,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACxD,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAClC,OAAO,GAAG,IAAI,iEAAiE,OAAO,EAAE,CAAC;AAC3F,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export declare const CHARACTER_LIMIT = 50000;
|
|
|
3
3
|
export declare const DEFAULT_PAGE_SIZE = 30;
|
|
4
4
|
export declare const MAX_PAGE_SIZE = 500;
|
|
5
5
|
export declare const MAX_SEARCH_PAGE = 100;
|
|
6
|
+
export declare const MAX_DOCUMENT_BYTES: number;
|
|
6
7
|
export declare const DEFAULT_HTTP_TIMEOUT_MS = 30000;
|
|
7
8
|
export declare const DEFAULT_HTTP_MAX_RETRIES = 2;
|
|
8
9
|
export declare const DEFAULT_HTTP_RETRY_BASE_MS = 200;
|
|
@@ -53,8 +54,9 @@ export declare const API_PATHS: {
|
|
|
53
54
|
readonly reportingResources: "/reporting-resources";
|
|
54
55
|
readonly reportingSynthesis: "/reporting-synthesis";
|
|
55
56
|
readonly reportingProductionPlans: "/reporting-production-plans";
|
|
57
|
+
readonly documents: "/documents";
|
|
56
58
|
};
|
|
57
|
-
export declare const REGISTERED_DOMAINS: readonly ["candidates", "resources", "contacts", "companies", "opportunities", "actions", "timesheets", "projects", "invoices", "orders", "deliveries", "absences", "expenses", "products", "positionings", "payments", "advantages", "application", "contracts", "purchases", "provider-invoices", "accounts", "agencies", "business-units", "roles", "logs", "notifications", "threads", "todolists", "flags", "calendars", "webhooks", "validations", "poles", "reporting", "planning-absences", "workflows"];
|
|
59
|
+
export declare const REGISTERED_DOMAINS: readonly ["candidates", "resources", "contacts", "companies", "opportunities", "actions", "timesheets", "projects", "invoices", "orders", "deliveries", "absences", "expenses", "products", "positionings", "payments", "advantages", "application", "contracts", "purchases", "provider-invoices", "accounts", "agencies", "business-units", "roles", "logs", "notifications", "threads", "todolists", "flags", "calendars", "webhooks", "validations", "poles", "reporting", "planning-absences", "documents", "workflows"];
|
|
58
60
|
export type DomainName = (typeof REGISTERED_DOMAINS)[number];
|
|
59
61
|
export declare const ENTITY_TABS: {
|
|
60
62
|
readonly candidates: readonly ["information", "technical-data", "administrative", "actions", "positionings"];
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,oCAAoC,CAAC;AAClE,eAAO,MAAM,eAAe,QAAQ,CAAC;AACrC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,aAAa,MAAM,CAAC;AAKjC,eAAO,MAAM,eAAe,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,oCAAoC,CAAC;AAClE,eAAO,MAAM,eAAe,QAAQ,CAAC;AACrC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,aAAa,MAAM,CAAC;AAKjC,eAAO,MAAM,eAAe,MAAM,CAAC;AAMnC,eAAO,MAAM,kBAAkB,QAAkB,CAAC;AAKlD,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAK9C,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAC9C,eAAO,MAAM,yBAAyB,OAAQ,CAAC;AAM/C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAC9C,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAGhD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CZ,CAAC;AAOX,eAAO,MAAM,kBAAkB,+fAuCrB,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAG7D,eAAO,MAAM,WAAW;;;;;;;;;CAsCd,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -7,6 +7,11 @@ export const MAX_PAGE_SIZE = 500;
|
|
|
7
7
|
// iterations. At 500 results/page, page 100 = 50k records — well beyond
|
|
8
8
|
// typical interactive exploration. The model can refine filters instead.
|
|
9
9
|
export const MAX_SEARCH_PAGE = 100;
|
|
10
|
+
// Max size of a document returned inline by boond_documents_get. Base64
|
|
11
|
+
// inflates the payload by ~33% and everything lands in the model context, so
|
|
12
|
+
// anything beyond this is refused with a clear message instead of silently
|
|
13
|
+
// flooding the conversation.
|
|
14
|
+
export const MAX_DOCUMENT_BYTES = 5 * 1024 * 1024;
|
|
10
15
|
// HTTP client defaults
|
|
11
16
|
// Timeout applied to every BoondManager API request. Overridable via
|
|
12
17
|
// BOOND_HTTP_TIMEOUT_MS to handle slow tenants or long reporting queries.
|
|
@@ -68,6 +73,7 @@ export const API_PATHS = {
|
|
|
68
73
|
reportingResources: "/reporting-resources",
|
|
69
74
|
reportingSynthesis: "/reporting-synthesis",
|
|
70
75
|
reportingProductionPlans: "/reporting-production-plans",
|
|
76
|
+
documents: "/documents",
|
|
71
77
|
};
|
|
72
78
|
// Canonical list of tool domains exposed by the server, in registration order.
|
|
73
79
|
// Domain names use dashes; the matching tool-name prefix replaces them with
|
|
@@ -111,6 +117,7 @@ export const REGISTERED_DOMAINS = [
|
|
|
111
117
|
"poles",
|
|
112
118
|
"reporting",
|
|
113
119
|
"planning-absences",
|
|
120
|
+
"documents",
|
|
114
121
|
"workflows",
|
|
115
122
|
];
|
|
116
123
|
// Tab names available on entities (matching actual API endpoints)
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,MAAM,CAAC,MAAM,gBAAgB,GAAG,iCAAiC,CAAC;AAClE,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AACrC,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AACpC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC,yEAAyE;AACzE,wEAAwE;AACxE,yEAAyE;AACzE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AAEnC,uBAAuB;AACvB,qEAAqE;AACrE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE9C,4EAA4E;AAC5E,6EAA6E;AAC7E,4BAA4B;AAC5B,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAC1C,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAC;AAC9C,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAC;AAE/C,2EAA2E;AAC3E,2EAA2E;AAC3E,wEAAwE;AACxE,kDAAkD;AAClD,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAC9C,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAEhD,YAAY;AACZ,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,UAAU,EAAE,aAAa;IACzB,SAAS,EAAE,YAAY;IACvB,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,YAAY;IACvB,aAAa,EAAE,gBAAgB;IAC/B,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,SAAS;IACjB,UAAU,EAAE,aAAa;IACzB,oBAAoB,EAAE,w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cAAc,CAAU;IACnG,SAAS,EAAE;QACT,aAAa;QACb,gBAAgB;QAChB,gBAAgB;QAChB,YAAY;QACZ,SAAS;QACT,cAAc;QACd,UAAU;QACV,eAAe;QACf,kBAAkB;QAClB,kBAAkB;KACV;IACV,QAAQ,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAU;IAChG,SAAS,EAAE;QACT,aAAa;QACb,UAAU;QACV,SAAS;QACT,eAAe;QACf,UAAU;QACV,QAAQ;QACR,UAAU;QACV,WAAW;QACX,mBAAmB;KACX;IACV,aAAa,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,CAAU;IAC5F,QAAQ,EAAE;QACR,aAAa;QACb,SAAS;QACT,YAAY;QACZ,uBAAuB;QACvB,QAAQ;QACR,WAAW;QACX,cAAc;KACN;IACV,QAAQ,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,gBAAgB,CAAU;IAC/D,MAAM,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,UAAU,CAAU;CAC/C,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;
|
|
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"}
|
package/dist/resources/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { apiRequest } from "../services/boond-client.js";
|
|
2
2
|
import { getDictionary, resolveDictionaryPath } from "../services/dictionary.js";
|
|
3
|
+
import { getDictionaryOverrides } from "../config/dictionary-overrides.js";
|
|
3
4
|
/**
|
|
4
5
|
* Curated dictionaries surfaced as static MCP resources. Slugs follow the
|
|
5
6
|
* historical "kind/entity" naming for backward compatibility with client URIs;
|
|
@@ -129,6 +130,8 @@ const DICTIONARIES = [
|
|
|
129
130
|
const DICTIONARY_URI_PREFIX = "boond://dictionary/";
|
|
130
131
|
/** URI of the cached identity resource. */
|
|
131
132
|
const CURRENT_USER_URI = "boond://application/current-user";
|
|
133
|
+
/** URI of the static dictionary-overrides resource (no API call behind it). */
|
|
134
|
+
const OVERRIDES_URI = "boond://dictionary/overrides";
|
|
132
135
|
function buildResourceUri(slug) {
|
|
133
136
|
return `${DICTIONARY_URI_PREFIX}${slug}`;
|
|
134
137
|
}
|
|
@@ -139,6 +142,7 @@ export const REGISTERED_RESOURCES = [
|
|
|
139
142
|
uri: buildResourceUri(d.slug),
|
|
140
143
|
title: d.title,
|
|
141
144
|
})),
|
|
145
|
+
{ name: "dictionary/overrides", uri: OVERRIDES_URI, title: "Libellés personnalisés (overrides)" },
|
|
142
146
|
{ name: "application/current-user", uri: CURRENT_USER_URI, title: "Utilisateur courant" },
|
|
143
147
|
];
|
|
144
148
|
export function registerAllResources(server) {
|
|
@@ -167,6 +171,27 @@ export function registerAllResources(server) {
|
|
|
167
171
|
};
|
|
168
172
|
});
|
|
169
173
|
}
|
|
174
|
+
// Static resource: the label→id overrides configured by the operator via
|
|
175
|
+
// BOOND_DICTIONARY_OVERRIDES (see docs/dictionary-overrides.md). No API call:
|
|
176
|
+
// the body reflects exactly what the server resolved at startup, so the
|
|
177
|
+
// model (and the user) can check which custom labels are usable.
|
|
178
|
+
server.registerResource("dictionary/overrides", OVERRIDES_URI, {
|
|
179
|
+
title: "Libellés personnalisés (overrides)",
|
|
180
|
+
description: "Mapping libellé→ID configuré via BOOND_DICTIONARY_OVERRIDES (types d'action et états). " +
|
|
181
|
+
'Renvoie { "configured": false } si aucun override n\'est configuré.',
|
|
182
|
+
mimeType: "application/json",
|
|
183
|
+
}, () => {
|
|
184
|
+
const overrides = getDictionaryOverrides();
|
|
185
|
+
return Promise.resolve({
|
|
186
|
+
contents: [
|
|
187
|
+
{
|
|
188
|
+
uri: OVERRIDES_URI,
|
|
189
|
+
mimeType: "application/json",
|
|
190
|
+
text: JSON.stringify(overrides ?? { configured: false }, null, 2),
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
});
|
|
194
|
+
});
|
|
170
195
|
// The current-user resource is a convenience for prompts/tools that need
|
|
171
196
|
// the caller's userId without first issuing a tool call. The body is the
|
|
172
197
|
// full /application/current-user payload.
|
|
@@ -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;AA+
|
|
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,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