boondmanager-mcp-server 2.15.2 → 2.17.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/LICENSE +1 -1
- package/NOTICE +16 -2
- package/README.md +60 -15
- package/dist/config/access-policy.d.ts.map +1 -1
- package/dist/config/access-policy.js +6 -18
- package/dist/config/access-policy.js.map +1 -1
- package/dist/config/dictionary-overrides.d.ts.map +1 -1
- package/dist/config/dictionary-overrides.js +2 -12
- package/dist/config/dictionary-overrides.js.map +1 -1
- package/dist/config/env.d.ts +63 -0
- package/dist/config/env.d.ts.map +1 -0
- package/dist/config/env.js +116 -0
- package/dist/config/env.js.map +1 -0
- package/dist/config/profiles.d.ts +22 -8
- package/dist/config/profiles.d.ts.map +1 -1
- package/dist/config/profiles.js +48 -4
- package/dist/config/profiles.js.map +1 -1
- package/dist/constants.d.ts +13 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +25 -1
- package/dist/constants.js.map +1 -1
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +6 -1
- package/dist/icons.js.map +1 -1
- package/dist/index.js +33 -15
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.d.ts.map +1 -1
- package/dist/instructions.js +6 -6
- package/dist/instructions.js.map +1 -1
- package/dist/prompts/index.d.ts +19 -1
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +495 -25
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/periods.d.ts +45 -0
- package/dist/prompts/periods.d.ts.map +1 -0
- package/dist/prompts/periods.js +154 -0
- package/dist/prompts/periods.js.map +1 -0
- package/dist/resources/index.d.ts +14 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +285 -0
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/templates.d.ts +1 -1
- package/dist/resources/templates.d.ts.map +1 -1
- package/dist/resources/templates.js +2 -0
- package/dist/resources/templates.js.map +1 -1
- package/dist/schema-dialect.js.map +1 -1
- package/dist/schemas/filter-aliases.d.ts +1 -1
- package/dist/schemas/filter-aliases.d.ts.map +1 -1
- package/dist/schemas/filter-aliases.js +101 -2
- package/dist/schemas/filter-aliases.js.map +1 -1
- package/dist/schemas/index.d.ts +987 -161
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +853 -323
- package/dist/schemas/index.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +10 -3
- package/dist/server.js.map +1 -1
- package/dist/services/boond-client.d.ts +29 -213
- package/dist/services/boond-client.d.ts.map +1 -1
- package/dist/services/boond-client.js +29 -1168
- package/dist/services/boond-client.js.map +1 -1
- package/dist/services/dictionary.d.ts +27 -3
- package/dist/services/dictionary.d.ts.map +1 -1
- package/dist/services/dictionary.js +60 -23
- package/dist/services/dictionary.js.map +1 -1
- package/dist/services/document-text.d.ts +32 -0
- package/dist/services/document-text.d.ts.map +1 -0
- package/dist/services/document-text.js +120 -0
- package/dist/services/document-text.js.map +1 -0
- package/dist/services/format/detail.d.ts +16 -0
- package/dist/services/format/detail.d.ts.map +1 -0
- package/dist/services/format/detail.js +36 -0
- package/dist/services/format/detail.js.map +1 -0
- package/dist/services/format/html.d.ts +19 -0
- package/dist/services/format/html.d.ts.map +1 -0
- package/dist/services/format/html.js +87 -0
- package/dist/services/format/html.js.map +1 -0
- package/dist/services/format/list.d.ts +3 -0
- package/dist/services/format/list.d.ts.map +1 -0
- package/dist/services/format/list.js +44 -0
- package/dist/services/format/list.js.map +1 -0
- package/dist/services/format/summary.d.ts +16 -0
- package/dist/services/format/summary.d.ts.map +1 -0
- package/dist/services/format/summary.js +172 -0
- package/dist/services/format/summary.js.map +1 -0
- package/dist/services/format/tab.d.ts +9 -0
- package/dist/services/format/tab.d.ts.map +1 -0
- package/dist/services/format/tab.js +32 -0
- package/dist/services/format/tab.js.map +1 -0
- package/dist/services/http/auth.d.ts +44 -0
- package/dist/services/http/auth.d.ts.map +1 -0
- package/dist/services/http/auth.js +146 -0
- package/dist/services/http/auth.js.map +1 -0
- package/dist/services/http/download.d.ts +60 -0
- package/dist/services/http/download.d.ts.map +1 -0
- package/dist/services/http/download.js +160 -0
- package/dist/services/http/download.js.map +1 -0
- package/dist/services/http/errors.d.ts +45 -0
- package/dist/services/http/errors.d.ts.map +1 -0
- package/dist/services/http/errors.js +188 -0
- package/dist/services/http/errors.js.map +1 -0
- package/dist/services/http/rate-limit.d.ts +40 -0
- package/dist/services/http/rate-limit.d.ts.map +1 -0
- package/dist/services/http/rate-limit.js +92 -0
- package/dist/services/http/rate-limit.js.map +1 -0
- package/dist/services/http/retry.d.ts +46 -0
- package/dist/services/http/retry.d.ts.map +1 -0
- package/dist/services/http/retry.js +101 -0
- package/dist/services/http/retry.js.map +1 -0
- package/dist/services/http/transport.d.ts +73 -0
- package/dist/services/http/transport.d.ts.map +1 -0
- package/dist/services/http/transport.js +272 -0
- package/dist/services/http/transport.js.map +1 -0
- package/dist/services/logger.d.ts +53 -2
- package/dist/services/logger.d.ts.map +1 -1
- package/dist/services/logger.js +82 -21
- package/dist/services/logger.js.map +1 -1
- package/dist/services/oauth.d.ts +12 -0
- package/dist/services/oauth.d.ts.map +1 -1
- package/dist/services/oauth.js +21 -8
- package/dist/services/oauth.js.map +1 -1
- package/dist/services/rate-limiter.d.ts +9 -2
- package/dist/services/rate-limiter.d.ts.map +1 -1
- package/dist/services/rate-limiter.js +18 -6
- package/dist/services/rate-limiter.js.map +1 -1
- package/dist/services/request-context.d.ts +47 -0
- package/dist/services/request-context.d.ts.map +1 -0
- package/dist/services/request-context.js +112 -0
- package/dist/services/request-context.js.map +1 -0
- package/dist/services/search.d.ts +26 -0
- package/dist/services/search.d.ts.map +1 -0
- package/dist/services/search.js +98 -0
- package/dist/services/search.js.map +1 -0
- package/dist/services/update-checker.d.ts.map +1 -1
- package/dist/services/update-checker.js +15 -8
- package/dist/services/update-checker.js.map +1 -1
- package/dist/tools/absences.d.ts +9 -0
- package/dist/tools/absences.d.ts.map +1 -1
- package/dist/tools/absences.js +65 -20
- package/dist/tools/absences.js.map +1 -1
- package/dist/tools/actions.d.ts.map +1 -1
- package/dist/tools/actions.js +11 -27
- package/dist/tools/actions.js.map +1 -1
- package/dist/tools/advantages.d.ts +2 -0
- package/dist/tools/advantages.d.ts.map +1 -1
- package/dist/tools/advantages.js +66 -13
- package/dist/tools/advantages.js.map +1 -1
- package/dist/tools/alerts.d.ts +18 -0
- package/dist/tools/alerts.d.ts.map +1 -0
- package/dist/tools/alerts.js +82 -0
- package/dist/tools/alerts.js.map +1 -0
- package/dist/tools/application.d.ts +2 -1
- package/dist/tools/application.d.ts.map +1 -1
- package/dist/tools/application.js +9 -3
- package/dist/tools/application.js.map +1 -1
- package/dist/tools/contacts.d.ts.map +1 -1
- package/dist/tools/contacts.js +3 -7
- package/dist/tools/contacts.js.map +1 -1
- package/dist/tools/contracts.d.ts +22 -0
- package/dist/tools/contracts.d.ts.map +1 -1
- package/dist/tools/contracts.js +185 -52
- package/dist/tools/contracts.js.map +1 -1
- package/dist/tools/crud-factory.d.ts +33 -2
- package/dist/tools/crud-factory.d.ts.map +1 -1
- package/dist/tools/crud-factory.js +42 -15
- package/dist/tools/crud-factory.js.map +1 -1
- package/dist/tools/deliveries.d.ts +3 -0
- package/dist/tools/deliveries.d.ts.map +1 -1
- package/dist/tools/deliveries.js +50 -94
- package/dist/tools/deliveries.js.map +1 -1
- package/dist/tools/description-builders.d.ts +0 -1
- package/dist/tools/description-builders.d.ts.map +1 -1
- package/dist/tools/description-builders.js +46 -3
- package/dist/tools/description-builders.js.map +1 -1
- package/dist/tools/documents.d.ts.map +1 -1
- package/dist/tools/documents.js +73 -21
- package/dist/tools/documents.js.map +1 -1
- package/dist/tools/expenses.d.ts.map +1 -1
- package/dist/tools/expenses.js +2 -11
- package/dist/tools/expenses.js.map +1 -1
- package/dist/tools/find.d.ts +61 -0
- package/dist/tools/find.d.ts.map +1 -0
- package/dist/tools/find.js +221 -0
- package/dist/tools/find.js.map +1 -0
- package/dist/tools/flags.d.ts +5 -0
- package/dist/tools/flags.d.ts.map +1 -1
- package/dist/tools/flags.js +116 -1
- package/dist/tools/flags.js.map +1 -1
- package/dist/tools/forms.d.ts +5 -0
- package/dist/tools/forms.d.ts.map +1 -0
- package/dist/tools/forms.js +64 -0
- package/dist/tools/forms.js.map +1 -0
- package/dist/tools/groupments.d.ts +5 -0
- package/dist/tools/groupments.d.ts.map +1 -0
- package/dist/tools/groupments.js +68 -0
- package/dist/tools/groupments.js.map +1 -0
- package/dist/tools/inactivities.d.ts +5 -0
- package/dist/tools/inactivities.d.ts.map +1 -0
- package/dist/tools/inactivities.js +59 -0
- package/dist/tools/inactivities.js.map +1 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/invoices.d.ts.map +1 -1
- package/dist/tools/invoices.js +27 -2
- package/dist/tools/invoices.js.map +1 -1
- package/dist/tools/linked-entity-filters.d.ts +48 -0
- package/dist/tools/linked-entity-filters.d.ts.map +1 -0
- package/dist/tools/linked-entity-filters.js +64 -0
- package/dist/tools/linked-entity-filters.js.map +1 -0
- package/dist/tools/notifications.d.ts.map +1 -1
- package/dist/tools/notifications.js +0 -5
- package/dist/tools/notifications.js.map +1 -1
- package/dist/tools/orders.d.ts.map +1 -1
- package/dist/tools/orders.js +33 -4
- package/dist/tools/orders.js.map +1 -1
- package/dist/tools/parameter-disclosure.js.map +1 -1
- package/dist/tools/payments.d.ts +3 -0
- package/dist/tools/payments.d.ts.map +1 -1
- package/dist/tools/payments.js +43 -109
- package/dist/tools/payments.js.map +1 -1
- package/dist/tools/positionings.d.ts.map +1 -1
- package/dist/tools/positionings.js +9 -39
- package/dist/tools/positionings.js.map +1 -1
- package/dist/tools/projects.d.ts.map +1 -1
- package/dist/tools/projects.js +5 -12
- package/dist/tools/projects.js.map +1 -1
- package/dist/tools/provider-invoices.d.ts +2 -0
- package/dist/tools/provider-invoices.d.ts.map +1 -1
- package/dist/tools/provider-invoices.js +30 -111
- package/dist/tools/provider-invoices.js.map +1 -1
- package/dist/tools/purchases.d.ts +2 -0
- package/dist/tools/purchases.d.ts.map +1 -1
- package/dist/tools/purchases.js +50 -104
- package/dist/tools/purchases.js.map +1 -1
- package/dist/tools/registration-decorators.d.ts +28 -0
- package/dist/tools/registration-decorators.d.ts.map +1 -1
- package/dist/tools/registration-decorators.js +107 -0
- package/dist/tools/registration-decorators.js.map +1 -1
- package/dist/tools/resources.d.ts.map +1 -1
- package/dist/tools/resources.js +27 -5
- package/dist/tools/resources.js.map +1 -1
- package/dist/tools/rights.d.ts +101 -0
- package/dist/tools/rights.d.ts.map +1 -0
- package/dist/tools/rights.js +75 -0
- package/dist/tools/rights.js.map +1 -0
- package/dist/tools/tab-tools.js +3 -3
- package/dist/tools/tab-tools.js.map +1 -1
- package/dist/tools/timesheets.d.ts +29 -0
- package/dist/tools/timesheets.d.ts.map +1 -1
- package/dist/tools/timesheets.js +196 -126
- package/dist/tools/timesheets.js.map +1 -1
- package/dist/tools/todolists.d.ts +2 -0
- package/dist/tools/todolists.d.ts.map +1 -1
- package/dist/tools/todolists.js +64 -1
- package/dist/tools/todolists.js.map +1 -1
- package/dist/tools/validations.d.ts +9 -0
- package/dist/tools/validations.d.ts.map +1 -1
- package/dist/tools/validations.js +86 -9
- package/dist/tools/validations.js.map +1 -1
- package/dist/tools/workflows.js +1 -1
- package/dist/tools/workflows.js.map +1 -1
- package/dist/transports/http.d.ts +116 -0
- package/dist/transports/http.d.ts.map +1 -1
- package/dist/transports/http.js +422 -92
- package/dist/transports/http.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/manifest.json +7 -7
- package/package.json +14 -10
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { AlertSearchSchema } from "../schemas/index.js";
|
|
2
|
+
import { apiSearch, formatListResponse } from "../services/boond-client.js";
|
|
3
|
+
import { renderAttributeValue } from "../services/format/summary.js";
|
|
4
|
+
import { progressReporterFrom } from "../services/progress.js";
|
|
5
|
+
import { buildListStructured, SearchOutputSchema } from "./crud-factory.js";
|
|
6
|
+
import { composeDescription } from "./description-builders.js";
|
|
7
|
+
/**
|
|
8
|
+
* The user's dashboard alerts (issue #255). Observed live on 2026-09-26
|
|
9
|
+
* (issue #311): `GET /alerts` returns the **configuration** of the user's
|
|
10
|
+
* dashboard indicators, not computed occurrences — one row per indicator
|
|
11
|
+
* (`module`: actions | activityExpenses | resources…, `indicator`:
|
|
12
|
+
* `contractsEndedUpcoming`, `resourcesProbationaryDateUpcoming`,
|
|
13
|
+
* `timesReportsWithNoValidation`, `actionsUpcoming`…) with its `params`
|
|
14
|
+
* (`period` in days or `-1` = last month, `X` / `Y` = state or type ids,
|
|
15
|
+
* `perimeter` such as `dynamic_data`) and the daily / weekly report flags.
|
|
16
|
+
* There is no `/alerts/{id}` (404). So the list says *what* to watch and with
|
|
17
|
+
* which thresholds; the matching `*_search` gives the items — which is what
|
|
18
|
+
* the `attention_du_jour` prompt does.
|
|
19
|
+
*/
|
|
20
|
+
export function alertSummary(alert) {
|
|
21
|
+
const a = alert.attributes ?? {};
|
|
22
|
+
const parts = [`[alert #${alert.id}]`];
|
|
23
|
+
if (a.module !== undefined)
|
|
24
|
+
parts.push(`Module: ${renderAttributeValue(a.module)}`);
|
|
25
|
+
if (a.indicator !== undefined)
|
|
26
|
+
parts.push(`Indicateur: ${renderAttributeValue(a.indicator)}`);
|
|
27
|
+
if (a.state !== undefined)
|
|
28
|
+
parts.push(`État: ${renderAttributeValue(a.state)}`);
|
|
29
|
+
const cadence = [a.isDaily ? "quotidien" : undefined, a.isWeekly ? "hebdomadaire" : undefined].filter(Boolean);
|
|
30
|
+
if (cadence.length)
|
|
31
|
+
parts.push(`Rapport: ${cadence.join(" + ")}`);
|
|
32
|
+
const params = a.params && typeof a.params === "object" ? a.params : undefined;
|
|
33
|
+
if (params) {
|
|
34
|
+
const bits = [];
|
|
35
|
+
if (params.period !== undefined)
|
|
36
|
+
bits.push(`period=${String(params.period)}`);
|
|
37
|
+
for (const key of ["X", "Y", "Z"]) {
|
|
38
|
+
const v = params[key];
|
|
39
|
+
if (Array.isArray(v) && v.length > 0)
|
|
40
|
+
bits.push(`${key}=[${v.map(String).join(",")}]`);
|
|
41
|
+
}
|
|
42
|
+
if (Array.isArray(params.perimeter) && params.perimeter.length > 0) {
|
|
43
|
+
bits.push(`perimeter=${params.perimeter.map(String).join(",")}`);
|
|
44
|
+
}
|
|
45
|
+
if (bits.length)
|
|
46
|
+
parts.push(`Paramètres: ${bits.join(" ")}`);
|
|
47
|
+
}
|
|
48
|
+
else if (a.params !== undefined && a.params !== null && a.params !== "") {
|
|
49
|
+
parts.push(`Paramètres: ${renderAttributeValue(a.params)}`);
|
|
50
|
+
}
|
|
51
|
+
for (const key of ["title", "name", "label", "count", "value"]) {
|
|
52
|
+
if (a[key] !== undefined && a[key] !== null && a[key] !== "")
|
|
53
|
+
parts.push(`${key}: ${renderAttributeValue(a[key])}`);
|
|
54
|
+
}
|
|
55
|
+
return parts.join(" | ");
|
|
56
|
+
}
|
|
57
|
+
export function registerAlertTools(server) {
|
|
58
|
+
server.registerTool("boond_alerts_search", {
|
|
59
|
+
title: "Alertes du tableau de bord",
|
|
60
|
+
description: composeDescription({
|
|
61
|
+
purpose: "Liste les indicateurs d'alerte configurés sur le tableau de bord de l'utilisateur (fins de contrat, périodes d'essai, CRA / notes / absences non validés, actions à venir…) avec leurs seuils : période en jours, états visés, périmètre.",
|
|
62
|
+
when: "en premier, pour « qu'est-ce qui demande mon attention aujourd'hui ? » — la liste dit *quoi* surveiller et avec quels seuils ; l'outil `*_search` du module donne les éléments.",
|
|
63
|
+
instead: "la ressource `boond://alerts/me` (même contenu en JSON) ; le prompt `attention_du_jour` enchaîne indicateur → recherche.",
|
|
64
|
+
behaviour: [
|
|
65
|
+
"`GET /alerts` renvoie la **configuration** des indicateurs, pas des occurrences (vérifié le 2026-09-26) : une ligne par indicateur, `params.period` en jours (`-1` = mois précédent), `X` / `Y` = IDs d'états ou de types, `perimeter` (`dynamic_data` = mes données). Aucun filtre, aucune pagination, pas de `/alerts/{id}`.",
|
|
66
|
+
'Correspondances : `contractsEndedUpcoming` → `boond_contracts_search` `period: "ending"` ; `resourcesProbationaryDateUpcoming` → `period: "probationEnding"` ; `timesReportsWithNoValidation` / `expensesReportsWithNoValidation` / `absencesReportsWithNoValidation` → `boond_validations_search` (`documentTypes`, `waitingForValidation`) ; `actionsUpcoming` → `boond_actions_search` `period: "started"`.',
|
|
67
|
+
],
|
|
68
|
+
returns: "une ligne par indicateur (`module`, `indicator`, paramètres, cadence de rapport) et `structuredContent.items[]`. Lecture seule.",
|
|
69
|
+
}),
|
|
70
|
+
inputSchema: AlertSearchSchema,
|
|
71
|
+
outputSchema: SearchOutputSchema,
|
|
72
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
73
|
+
}, async (params, extra) => {
|
|
74
|
+
const { fields } = params;
|
|
75
|
+
const response = await apiSearch("/alerts", {}, progressReporterFrom(extra));
|
|
76
|
+
return {
|
|
77
|
+
content: [{ type: "text", text: formatListResponse(response, "alerte", fields, alertSummary) }],
|
|
78
|
+
structuredContent: buildListStructured(response, fields, alertSummary),
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=alerts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alerts.js","sourceRoot":"","sources":["../../src/tools/alerts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAy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;YACxG,iBAAiB,EAAE,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC;SACvE,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
|
|
2
|
+
import type { AccessPolicy } from "../config/access-policy.js";
|
|
3
|
+
export declare function registerApplicationTools(server: McpServer, policy?: AccessPolicy): void;
|
|
3
4
|
//# sourceMappingURL=application.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../src/tools/application.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../src/tools/application.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAiB/D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAsFvF"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { registerFindTool } from "./find.js";
|
|
2
|
+
import { registerRightsTool } from "./rights.js";
|
|
1
3
|
import { DictionaryGetSchema } from "../schemas/index.js";
|
|
2
4
|
import { CHARACTER_LIMIT } from "../constants.js";
|
|
3
5
|
import { apiRequest, formatDetailResponse } from "../services/boond-client.js";
|
|
@@ -9,7 +11,12 @@ function formatDictionaryNode(node) {
|
|
|
9
11
|
}
|
|
10
12
|
return text;
|
|
11
13
|
}
|
|
12
|
-
export function registerApplicationTools(server) {
|
|
14
|
+
export function registerApplicationTools(server, policy) {
|
|
15
|
+
// Cross-entity name → id resolver (issue #262). Lives in this domain because
|
|
16
|
+
// `application` is in every profile; the entities it offers follow the policy.
|
|
17
|
+
registerFindTool(server, policy);
|
|
18
|
+
// Per-record rights (issue #257): same reasoning, same policy-narrowed enum.
|
|
19
|
+
registerRightsTool(server, policy);
|
|
13
20
|
// Get dictionary
|
|
14
21
|
server.registerTool("boond_application_dictionary", {
|
|
15
22
|
title: "Récupérer un dictionnaire BoondManager",
|
|
@@ -17,8 +24,7 @@ export function registerApplicationTools(server) {
|
|
|
17
24
|
|
|
18
25
|
L'API expose un seul endpoint \`/application/dictionary\` qui renvoie tout — le serveur le cache (TTL 1h, configurable via \`BOOND_DICTIONARY_TTL_MS\`) et extrait un sous-arbre par chemin dotté.
|
|
19
26
|
|
|
20
|
-
|
|
21
|
-
- dictionaryType (string): Chemin dans la réponse (relatif à \`data\`). Exemples :
|
|
27
|
+
Chemins usuels de \`dictionaryType\` (relatifs à \`data\`) :
|
|
22
28
|
- "setting.state.{resource,candidate,contact,company,opportunity,project,invoice,order,positioning}" → états par entité
|
|
23
29
|
- "setting.typeOf.{resource,contact,project}" → types par entité
|
|
24
30
|
- "setting.action.{candidate,resource,opportunity,project,...}" → actions disponibles
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/tools/application.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/tools/application.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEjF,SAAS,oBAAoB,C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,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;SACvE,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,sCAAsC;IACtC,MAAM,CAAC,YAAY,CACjB,gCAAgC,EAChC;QACE,KAAK,EAAE,kCAAkC;QACzC,WAAW,EAAE;;gDAE6B;QAC1C,WAAW,EAAE,EAAE;QACf,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,IAAI,EAAE;QACT,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,2BAA2B,CAAC,CAAC;QAC/D,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/tools/contacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAmFzE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/tools/contacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAmFzE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA+B5D"}
|
package/dist/tools/contacts.js
CHANGED
|
@@ -76,13 +76,9 @@ export function registerContactTools(server) {
|
|
|
76
76
|
registerGetTool(server, OPTS);
|
|
77
77
|
registerCreateTool(server, OPTS, ContactCreateSchema, (params) => {
|
|
78
78
|
const { companyId, ...attrs } = params;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
company: { data: { id: companyId, type: "company" } },
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
return body;
|
|
79
|
+
return buildJsonApiBody("contact", attrs, undefined, {
|
|
80
|
+
company: typeof companyId === "string" ? { id: companyId, type: "company" } : undefined,
|
|
81
|
+
});
|
|
86
82
|
});
|
|
87
83
|
// Updates go through PUT /contacts/{id}/information — the base resource
|
|
88
84
|
// returns 405 on PATCH (issue #134, same root cause as #124). buildJsonApiBody
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../src/tools/contacts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,IAAI,GAAG;IACX,UAAU,EAAE,SAAS;IACrB,gBAAgB,EAAE,UAAU;IAC5B,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,gBAAgB;CACzB,CAAC;AAEF,MAAM,YAAY,GAAoB;IACpC;QACE,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,aAAa;QAClB,KAAK,EAAE,qCAAqC;QAC5C,OAAO,EAAE,4BAA4B;QACrC,OAAO,EAAE,sDAAsD;QAC/D,OAAO,EAAE,2CAA2C;KACrD;IACD;QACE,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,4BAA4B;QACnC,OAAO,EAAE,aAAa;QACtB,OAAO,EAAE,4BAA4B;QACrC,OAAO,EAAE,0CAA0C;KACpD;IACD;QACE,IAAI,EAAE,eAAe;QACrB,GAAG,EAAE,eA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D,kBAAkB,CAAC,MAAM,EAAE,IAAI,EAAE;QAC/B,MAAM,EAAE,mBAAmB;QAC3B,WAAW,EAAE,0BAA0B;KACxC,CAAC,CAAC;IACH,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAE9B,kBAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC,MAAM,EAAE,EAAE;QAC/D,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACvC,OAAO,gBAAgB,CAAC,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;YACnD,OAAO,EAAE,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS;SACxF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,wEAAwE;IACxE,+EAA+E;IAC/E,yEAAyE;IACzE,kBAAkB,CAChB,MAAM,EACN,IAAI,EACJ,mBAAmB,EACnB,CAAC,MAAM,EAAE,EAAE;QACT,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAChC,OAAO,gBAAgB,CAAC,SAAS,EAAE,KAAK,EAAE,EAAY,CAAC,CAAC;IAC1D,CAAC,EACD,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,CAC7C,CAAC;IAEF,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAEjC,gBAAgB,CAAC,MAAM,EAAE,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,YAAY,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -1,3 +1,25 @@
|
|
|
1
1
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import type { ContractSearchInput } from "../schemas/index.js";
|
|
3
|
+
import type { JsonApiResource } from "../types.js";
|
|
4
|
+
/**
|
|
5
|
+
* `/contracts` payload: the resource id becomes the `resource` relationship,
|
|
6
|
+
* `note` the `informationComments` attribute (`models.contract` has no `note`),
|
|
7
|
+
* and `id` — present on update — lands on `data.id`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildContractBody(params: Record<string, unknown>): unknown;
|
|
10
|
+
/**
|
|
11
|
+
* The contracts of one resource, as `/resources/{id}/administrative` includes
|
|
12
|
+
* them (issue #253). Neither `GET /contracts` (WAF 403 page — the RAML only
|
|
13
|
+
* documents `post`) nor `GET /resources/{id}/contracts` (404) exists, probed
|
|
14
|
+
* live on 2026-09-26: the administrative tab is the only read path, and its
|
|
15
|
+
* `included` carries the full contract objects. Each contract is tagged with
|
|
16
|
+
* the resource it belongs to so a list spanning several resources stays
|
|
17
|
+
* readable.
|
|
18
|
+
*/
|
|
19
|
+
export declare function contractsOfResource(resourceId: string, label?: string): Promise<JsonApiResource[]>;
|
|
20
|
+
/** Server-side contract filters of the composed search (type, then period window). */
|
|
21
|
+
export declare function filterContracts(contracts: JsonApiResource[], filters: Pick<ContractSearchInput, "contractTypes" | "period" | "startDate" | "endDate">): JsonApiResource[];
|
|
22
|
+
/** One line per contract: who, which type, which dates, where the probation stands. */
|
|
23
|
+
export declare function contractSummary(contract: JsonApiResource): string;
|
|
2
24
|
export declare function registerContractTools(server: McpServer): void;
|
|
3
25
|
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/tools/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/tools/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAI/D,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,aAAa,CAAC;AAapE;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAU1E;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CASxG;AAoBD,sFAAsF;AACtF,wBAAgB,eAAe,CAC7B,SAAS,EAAE,eAAe,EAAE,EAC5B,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,eAAe,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC,GACvF,eAAe,EAAE,CAqBnB;AAED,uFAAuF;AACvF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAiBjE;AA8BD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAoG7D"}
|
package/dist/tools/contracts.js
CHANGED
|
@@ -1,74 +1,207 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { apiRequest,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { ContractCreateSchema, ContractSearchSchema, ContractUpdateSchema } from "../schemas/index.js";
|
|
2
|
+
import { apiRequest, apiSearch, buildSearchQuery, formatListResponse } from "../services/boond-client.js";
|
|
3
|
+
import { renderAttributeValue } from "../services/format/summary.js";
|
|
4
|
+
import { progressReporterFrom } from "../services/progress.js";
|
|
5
|
+
import { buildJsonApiBody, buildListStructured, registerCreateTool, registerGetTool, registerUpdateTool, SearchOutputSchema, } from "./crud-factory.js";
|
|
6
|
+
import { composeDescription } from "./description-builders.js";
|
|
7
|
+
const OPTS = { entityName: "contrat", entityNamePlural: "contrats", apiPath: "/contracts", prefix: "boond_contracts" };
|
|
8
|
+
/**
|
|
9
|
+
* `/contracts` payload: the resource id becomes the `resource` relationship,
|
|
10
|
+
* `note` the `informationComments` attribute (`models.contract` has no `note`),
|
|
11
|
+
* and `id` — present on update — lands on `data.id`.
|
|
12
|
+
*/
|
|
13
|
+
export function buildContractBody(params) {
|
|
14
|
+
const { id, resourceId, note, ...attrs } = params;
|
|
15
|
+
return buildJsonApiBody("contract", { ...attrs, ...(note !== undefined ? { informationComments: note } : {}) }, typeof id === "string" ? id : undefined, {
|
|
16
|
+
resource: resourceId ? { id: String(resourceId), type: "resource" } : undefined,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The contracts of one resource, as `/resources/{id}/administrative` includes
|
|
21
|
+
* them (issue #253). Neither `GET /contracts` (WAF 403 page — the RAML only
|
|
22
|
+
* documents `post`) nor `GET /resources/{id}/contracts` (404) exists, probed
|
|
23
|
+
* live on 2026-09-26: the administrative tab is the only read path, and its
|
|
24
|
+
* `included` carries the full contract objects. Each contract is tagged with
|
|
25
|
+
* the resource it belongs to so a list spanning several resources stays
|
|
26
|
+
* readable.
|
|
27
|
+
*/
|
|
28
|
+
export async function contractsOfResource(resourceId, label) {
|
|
29
|
+
const response = await apiRequest(`/resources/${resourceId}/administrative`);
|
|
30
|
+
const included = Array.isArray(response.included) ? response.included : [];
|
|
31
|
+
return included
|
|
32
|
+
.filter((item) => item.type === "contract")
|
|
33
|
+
.map((contract) => ({
|
|
34
|
+
...contract,
|
|
35
|
+
attributes: { ...contract.attributes, resource: label ? `${label} (#${resourceId})` : `#${resourceId}` },
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
function dateOf(value) {
|
|
39
|
+
return typeof value === "string" && /^\d{4}-\d{2}-\d{2}/.test(value) ? value.slice(0, 10) : undefined;
|
|
40
|
+
}
|
|
41
|
+
/** A contract with no `endDate` is open-ended: it runs until further notice. */
|
|
42
|
+
function overlaps(start, end, from, to) {
|
|
43
|
+
if (to !== undefined && start !== undefined && start > to)
|
|
44
|
+
return false;
|
|
45
|
+
if (from !== undefined && end !== undefined && end < from)
|
|
46
|
+
return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
function within(date, from, to) {
|
|
50
|
+
if (date === undefined)
|
|
51
|
+
return false;
|
|
52
|
+
if (from !== undefined && date < from)
|
|
53
|
+
return false;
|
|
54
|
+
if (to !== undefined && date > to)
|
|
55
|
+
return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
/** Server-side contract filters of the composed search (type, then period window). */
|
|
59
|
+
export function filterContracts(contracts, filters) {
|
|
60
|
+
const { contractTypes, period, startDate: from, endDate: to } = filters;
|
|
61
|
+
return contracts.filter((contract) => {
|
|
62
|
+
const a = contract.attributes;
|
|
63
|
+
if (contractTypes && contractTypes.length > 0 && !contractTypes.includes(Number(a.typeOf)))
|
|
64
|
+
return false;
|
|
65
|
+
if (!period)
|
|
66
|
+
return true;
|
|
67
|
+
const start = dateOf(a.startDate);
|
|
68
|
+
const end = dateOf(a.endDate);
|
|
69
|
+
switch (period) {
|
|
70
|
+
case "running":
|
|
71
|
+
return overlaps(start, end, from, to);
|
|
72
|
+
case "ending":
|
|
73
|
+
return within(end, from, to);
|
|
74
|
+
case "starting":
|
|
75
|
+
return within(start, from, to);
|
|
76
|
+
case "probationEnding":
|
|
77
|
+
return within(dateOf(a.probationEndDate), from, to) || within(dateOf(a.renewalProbationEndDate), from, to);
|
|
78
|
+
default:
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/** One line per contract: who, which type, which dates, where the probation stands. */
|
|
84
|
+
export function contractSummary(contract) {
|
|
85
|
+
const a = contract.attributes;
|
|
86
|
+
const parts = [`[contract #${contract.id}]`];
|
|
87
|
+
if (a.resource !== undefined)
|
|
88
|
+
parts.push(`Ressource: ${renderAttributeValue(a.resource)}`);
|
|
89
|
+
if (a.typeOf !== undefined)
|
|
90
|
+
parts.push(`Type: ${renderAttributeValue(a.typeOf)}`);
|
|
91
|
+
const start = dateOf(a.startDate);
|
|
92
|
+
const end = dateOf(a.endDate);
|
|
93
|
+
if (start || end)
|
|
94
|
+
parts.push(`${start ?? "?"} → ${end ?? "en cours"}`);
|
|
95
|
+
const probation = dateOf(a.renewalProbationEndDate) ?? dateOf(a.probationEndDate);
|
|
96
|
+
if (probation)
|
|
97
|
+
parts.push(`Fin PE: ${probation}${a.probationState !== undefined ? ` (état ${renderAttributeValue(a.probationState)})` : ""}`);
|
|
98
|
+
if (a.endReason !== undefined && a.endReason !== null && a.endReason !== "") {
|
|
99
|
+
parts.push(`Motif fin: ${renderAttributeValue(a.endReason)}`);
|
|
100
|
+
}
|
|
101
|
+
return parts.join(" | ");
|
|
102
|
+
}
|
|
103
|
+
function resourceLabel(resource) {
|
|
104
|
+
const a = resource.attributes;
|
|
105
|
+
const name = [a.firstName, a.lastName].filter((v) => typeof v === "string" && v.length > 0).join(" ");
|
|
106
|
+
return name.length > 0 ? name : `ressource ${resource.id}`;
|
|
107
|
+
}
|
|
108
|
+
/** Bounded fan-out: a handful of administrative reads in flight, never the whole page at once. */
|
|
109
|
+
async function mapWithConcurrency(items, limit, fn) {
|
|
110
|
+
const results = new Array(items.length);
|
|
111
|
+
let next = 0;
|
|
112
|
+
async function worker() {
|
|
113
|
+
while (next < items.length) {
|
|
114
|
+
const index = next++;
|
|
115
|
+
const item = items[index];
|
|
116
|
+
if (item === undefined)
|
|
117
|
+
break;
|
|
118
|
+
results[index] = await fn(item, index);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
await Promise.all(Array.from({ length: Math.min(limit, items.length) }, () => worker()));
|
|
122
|
+
return results;
|
|
123
|
+
}
|
|
124
|
+
const ADMINISTRATIVE_CONCURRENCY = 4;
|
|
15
125
|
export function registerContractTools(server) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
126
|
+
// Composed search (issue #253): BoondManager has no contract list endpoint.
|
|
127
|
+
server.registerTool("boond_contracts_search", {
|
|
128
|
+
title: "Rechercher des contrats de travail",
|
|
129
|
+
description: composeDescription({
|
|
130
|
+
purpose: "Recherche les contrats de travail (CDI, CDD, freelance…) des ressources d'un périmètre, avec filtres de type et de période (fins de contrat, périodes d'essai qui expirent).",
|
|
131
|
+
when: "pour « contrats qui se terminent ce mois », « périodes d'essai qui expirent », « CDD à renouveler », ou les contrats d'une ressource.",
|
|
132
|
+
instead: "`boond_resources_contracts` pour les contrats d'une seule ressource connue, `boond_contracts_get` pour la fiche complète d'un contrat.",
|
|
133
|
+
behaviour: [
|
|
134
|
+
"Recherche **composée** : BoondManager n'a pas de liste de contrats (`GET /contracts` n'existe pas). L'outil sélectionne les ressources (`keywords`, `perimeter*`, `resourceStates` ; `page` / `pageSize` portent sur les ressources parcourues) puis lit l'onglet administratif de chacune : une requête par ressource — préférer des pages modestes —, progression notifiée.",
|
|
135
|
+
"`contractTypes` et `period` + `startDate` / `endDate` sont appliqués côté serveur sur les contrats lus ; un contrat sans `endDate` compte comme en cours.",
|
|
136
|
+
"`resourceId` court-circuite la sélection : seuls les contrats de cette ressource sont lus.",
|
|
137
|
+
],
|
|
138
|
+
returns: "une ligne par contrat (ressource, type, dates, fin de période d'essai, motif de fin) et `structuredContent.items[]` ; `total` = nombre de contrats retenus.",
|
|
21
139
|
}),
|
|
22
|
-
inputSchema:
|
|
140
|
+
inputSchema: ContractSearchSchema,
|
|
141
|
+
outputSchema: SearchOutputSchema,
|
|
23
142
|
annotations: {
|
|
24
143
|
readOnlyHint: true,
|
|
25
144
|
destructiveHint: false,
|
|
26
145
|
idempotentHint: true,
|
|
27
|
-
openWorldHint:
|
|
146
|
+
openWorldHint: true,
|
|
28
147
|
},
|
|
29
|
-
}, async (params) => {
|
|
30
|
-
const
|
|
148
|
+
}, async (params, extra) => {
|
|
149
|
+
const p = params;
|
|
150
|
+
const report = progressReporterFrom(extra);
|
|
151
|
+
let targets;
|
|
152
|
+
if (p.resourceId) {
|
|
153
|
+
targets = [{ id: p.resourceId }];
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
const { resourceId: _skip, contractTypes: _t, period: _p, startDate: _s, endDate: _e, fields: _f, ...resourceParams } = p;
|
|
157
|
+
const resources = await apiSearch("/resources", buildSearchQuery(resourceParams), report);
|
|
158
|
+
const rows = Array.isArray(resources.data) ? resources.data : resources.data ? [resources.data] : [];
|
|
159
|
+
targets = rows.map((row) => ({ id: row.id, label: resourceLabel(row) }));
|
|
160
|
+
}
|
|
161
|
+
const total = targets.length;
|
|
162
|
+
let done = 0;
|
|
163
|
+
const perResource = await mapWithConcurrency(targets, ADMINISTRATIVE_CONCURRENCY, async (target) => {
|
|
164
|
+
const contracts = await contractsOfResource(target.id, target.label);
|
|
165
|
+
done += 1;
|
|
166
|
+
report(done, total, `${done}/${total} ressource(s) lue(s)`);
|
|
167
|
+
return contracts;
|
|
168
|
+
});
|
|
169
|
+
const contracts = filterContracts(perResource.flat(), p);
|
|
170
|
+
const response = { data: contracts, meta: { totals: { rows: contracts.length } } };
|
|
31
171
|
return {
|
|
32
|
-
content: [{ type: "text", text:
|
|
172
|
+
content: [{ type: "text", text: formatListResponse(response, "contrat", p.fields, contractSummary) }],
|
|
173
|
+
structuredContent: buildListStructured(response, p.fields, contractSummary),
|
|
33
174
|
};
|
|
34
175
|
});
|
|
35
|
-
server
|
|
176
|
+
registerGetTool(server, OPTS, {
|
|
177
|
+
withTab: false,
|
|
178
|
+
title: "Détails d'un contrat",
|
|
179
|
+
description: composeDescription({
|
|
180
|
+
purpose: "Récupère la fiche complète d'un contrat de travail par son ID numérique.",
|
|
181
|
+
when: "après `boond_contracts_search` ou `boond_resources_contracts`, qui listent les contrats avec leurs IDs.",
|
|
182
|
+
instead: "`boond_resources_contracts` pour tous les contrats d'une ressource en un appel — cet outil n'accepte pas de nom.",
|
|
183
|
+
behaviour: [
|
|
184
|
+
"Un ID inconnu remonte l'erreur BoondManager telle quelle — l'ID doit venir d'une liste de contrats, jamais d'une supposition.",
|
|
185
|
+
],
|
|
186
|
+
returns: "JSON du contrat (attributs + relations) tel que renvoyé par l'API. Lecture seule.",
|
|
187
|
+
}),
|
|
188
|
+
});
|
|
189
|
+
registerCreateTool(server, OPTS, ContractCreateSchema, buildContractBody, {
|
|
36
190
|
title: "Créer un contrat",
|
|
37
191
|
description: composeDescription({
|
|
38
192
|
purpose: "Crée un contrat de travail rattaché à une ressource.",
|
|
39
193
|
when: "pour enregistrer un nouveau contrat (embauche, avenant, renouvellement).",
|
|
40
|
-
instead: "`
|
|
194
|
+
instead: "`boond_resources_contracts` d'abord, pour vérifier qu'un contrat couvrant la même période n'existe pas déjà.",
|
|
41
195
|
behaviour: [
|
|
42
196
|
"Écriture non idempotente : deux appels identiques créent deux contrats.",
|
|
43
|
-
"
|
|
197
|
+
"`typeOf` est un ID entier de `boond://dictionary/typeOf/contracts`, pas un libellé.",
|
|
44
198
|
],
|
|
45
199
|
returns: "confirmation et fiche du contrat créé, avec son ID dans `structuredContent.id`.",
|
|
46
200
|
}),
|
|
47
|
-
inputSchema: ContractCreateSchema,
|
|
48
|
-
annotations: {
|
|
49
|
-
readOnlyHint: false,
|
|
50
|
-
destructiveHint: false,
|
|
51
|
-
idempotentHint: false,
|
|
52
|
-
openWorldHint: false,
|
|
53
|
-
},
|
|
54
|
-
}, async (params) => {
|
|
55
|
-
const { resourceId, ...attrs } = params;
|
|
56
|
-
const body = buildJsonApiBody("contract", attrs);
|
|
57
|
-
if (resourceId) {
|
|
58
|
-
body.data.relationships = {
|
|
59
|
-
resource: { data: { id: resourceId, type: "resource" } },
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
const response = await apiRequest("/contracts", "POST", body);
|
|
63
|
-
const entity = Array.isArray(response.data) ? response.data[0] : response.data;
|
|
64
|
-
return {
|
|
65
|
-
content: [
|
|
66
|
-
{
|
|
67
|
-
type: "text",
|
|
68
|
-
text: `✅ Contrat créé avec succès.\nID: ${entity?.id}\n\n${formatDetailResponse(response)}`,
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
};
|
|
72
201
|
});
|
|
202
|
+
// PUT /contracts/{id}: attributes only (issue #252). The RAML has no
|
|
203
|
+
// information.raml for contracts, so the base resource is the PUT target —
|
|
204
|
+
// the pattern /actions/{id} and /times-reports/{id} follow.
|
|
205
|
+
registerUpdateTool(server, OPTS, ContractUpdateSchema, buildContractBody, { method: "PUT" });
|
|
73
206
|
}
|
|
74
207
|
//# sourceMappingURL=contracts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/tools/contracts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/tools/contracts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEvG,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC1G,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,IAAI,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC;AAEvH;;;;GAIG;AACH,MAAM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AAmF;SAC7F,CAAC;KACH,CAAC,CAAC;IAEH,kBAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,iBAAiB,EAAE;QACxE,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,kBAAkB,CAAC;YAC9B,OAAO,EAAE,sDAAsD;YAC/D,IAAI,EAAE,0EAA0E;YAChF,OAAO,EACL,8GAA8G;YAChH,SAAS,EAAE;gBACT,yEAAyE;gBACzE,qFAAqF;aACtF;YACD,OAAO,EAAE,iFAAiF;SAC3F,CAAC;KACH,CAAC,CAAC;IAEH,qEAAqE;IACrE,2EAA2E;IAC3E,4DAA4D;IAC5D,kBAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAC/F,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import type { JsonApiResponse } from "../types.js";
|
|
3
|
+
import type { JsonApiResponse, JsonApiResource } from "../types.js";
|
|
4
4
|
interface CrudToolOptions {
|
|
5
5
|
entityName: string;
|
|
6
6
|
entityNamePlural: string;
|
|
@@ -11,6 +11,12 @@ interface SearchToolOverrides {
|
|
|
11
11
|
schema?: z.ZodType;
|
|
12
12
|
title?: string;
|
|
13
13
|
description?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Bespoke one-line summary for rows the generic summary renders poorly
|
|
16
|
+
* (`/times-reports` rows have no name / title — `timesheetSummary`). Used
|
|
17
|
+
* for the text output and for `structuredContent.items[].summary` alike.
|
|
18
|
+
*/
|
|
19
|
+
summaryFn?: (entity: JsonApiResource) => string;
|
|
14
20
|
}
|
|
15
21
|
export declare const SearchOutputSchema: z.ZodObject<{
|
|
16
22
|
total: z.ZodOptional<z.ZodNumber>;
|
|
@@ -32,7 +38,32 @@ export declare const DeleteOutputSchema: z.ZodObject<{
|
|
|
32
38
|
reason: z.ZodOptional<z.ZodString>;
|
|
33
39
|
}, z.core.$strip>;
|
|
34
40
|
/** Build the compact structured payload for a search result page. Exported for unit testing. */
|
|
35
|
-
export declare function buildListStructured(response: JsonApiResponse, fields?: string[]): z.infer<typeof SearchOutputSchema>;
|
|
41
|
+
export declare function buildListStructured(response: JsonApiResponse, fields?: string[], summaryFn?: (entity: JsonApiResource) => string): z.infer<typeof SearchOutputSchema>;
|
|
42
|
+
export declare function entityRef(response: JsonApiResponse): z.infer<typeof MutationOutputSchema>;
|
|
43
|
+
export interface ConfirmChoiceOptions {
|
|
44
|
+
/** Question shown to the end user. */
|
|
45
|
+
message: string;
|
|
46
|
+
/** Title of the single-select field. */
|
|
47
|
+
title: string;
|
|
48
|
+
/** Help text under the field. */
|
|
49
|
+
description: string;
|
|
50
|
+
/** Label of the option that confirms the irreversible action. */
|
|
51
|
+
confirmTitle: string;
|
|
52
|
+
/** `true` when the operator opted out of this confirmation through its env flag. */
|
|
53
|
+
disabled: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Generic titled single-select confirmation (the mechanics documented on
|
|
57
|
+
* `confirmDeletion`, which is its first caller). Issue #251 reuses it for the
|
|
58
|
+
* rejection of a validation: "reject" is not destructive in the delete sense,
|
|
59
|
+
* but it is a decision the workflow does not undo by itself, so it gets the
|
|
60
|
+
* same safe-default prompt. The confirm value is always `"delete"` on the wire
|
|
61
|
+
* so a client built against the delete schema keeps answering correctly.
|
|
62
|
+
*/
|
|
63
|
+
export declare function confirmChoice(server: McpServer, options: ConfirmChoiceOptions): Promise<{
|
|
64
|
+
confirmed: boolean;
|
|
65
|
+
reason?: string;
|
|
66
|
+
}>;
|
|
36
67
|
export declare function confirmDeletion(server: McpServer, entityName: string, id: string): Promise<{
|
|
37
68
|
confirmed: boolean;
|
|
38
69
|
reason?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud-factory.d.ts","sourceRoot":"","sources":["../../src/tools/crud-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"crud-factory.d.ts","sourceRoot":"","sources":["../../src/tools/crud-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEpE,UAAU,eAAe;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,MAAM,CAAC;CACjD;AAQD,eAAO,MAAM,kBAAkB;;;;;;;;;iBAc7B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AAEH,gGAAgG;AAChG,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,MAAM,CAAC,EAAE,MAAM,EAAE,EACjB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,MAAM,GAC9C,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAiCpC;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,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