@futdevpro/nts-dynamo 1.15.293 → 1.15.296

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 (74) hide show
  1. package/build/_collections/global-settings.const.d.ts.map +1 -1
  2. package/build/_collections/global-settings.const.js +1 -0
  3. package/build/_collections/global-settings.const.js.map +1 -1
  4. package/build/_models/interfaces/global-settings.interface.d.ts +6 -0
  5. package/build/_models/interfaces/global-settings.interface.d.ts.map +1 -1
  6. package/build/_modules/mcp/_collections/mcp-error.util.d.ts +38 -0
  7. package/build/_modules/mcp/_collections/mcp-error.util.d.ts.map +1 -0
  8. package/build/_modules/mcp/_collections/mcp-error.util.js +103 -0
  9. package/build/_modules/mcp/_collections/mcp-error.util.js.map +1 -0
  10. package/build/_modules/mcp/_collections/mcp-tool-load.util.d.ts +46 -0
  11. package/build/_modules/mcp/_collections/mcp-tool-load.util.d.ts.map +1 -0
  12. package/build/_modules/mcp/_collections/mcp-tool-load.util.js +93 -0
  13. package/build/_modules/mcp/_collections/mcp-tool-load.util.js.map +1 -0
  14. package/build/_modules/mcp/_enums/mcp-error-code.type-enum.d.ts +17 -0
  15. package/build/_modules/mcp/_enums/mcp-error-code.type-enum.d.ts.map +1 -0
  16. package/build/_modules/mcp/_enums/mcp-error-code.type-enum.js +21 -0
  17. package/build/_modules/mcp/_enums/mcp-error-code.type-enum.js.map +1 -0
  18. package/build/_modules/mcp/_enums/mcp-tool-exposure.type-enum.d.ts +14 -0
  19. package/build/_modules/mcp/_enums/mcp-tool-exposure.type-enum.d.ts.map +1 -0
  20. package/build/_modules/mcp/_enums/mcp-tool-exposure.type-enum.js +18 -0
  21. package/build/_modules/mcp/_enums/mcp-tool-exposure.type-enum.js.map +1 -0
  22. package/build/_modules/mcp/_models/control-models/mcp-tool-params.control-model.d.ts +81 -0
  23. package/build/_modules/mcp/_models/control-models/mcp-tool-params.control-model.d.ts.map +1 -0
  24. package/build/_modules/mcp/_models/control-models/mcp-tool-params.control-model.js +150 -0
  25. package/build/_modules/mcp/_models/control-models/mcp-tool-params.control-model.js.map +1 -0
  26. package/build/_modules/mcp/_models/errors/mcp-conflict.error.d.ts +7 -0
  27. package/build/_modules/mcp/_models/errors/mcp-conflict.error.d.ts.map +1 -0
  28. package/build/_modules/mcp/_models/errors/mcp-conflict.error.js +11 -0
  29. package/build/_modules/mcp/_models/errors/mcp-conflict.error.js.map +1 -0
  30. package/build/_modules/mcp/_models/errors/mcp-forbidden.error.d.ts +7 -0
  31. package/build/_modules/mcp/_models/errors/mcp-forbidden.error.d.ts.map +1 -0
  32. package/build/_modules/mcp/_models/errors/mcp-forbidden.error.js +11 -0
  33. package/build/_modules/mcp/_models/errors/mcp-forbidden.error.js.map +1 -0
  34. package/build/_modules/mcp/_models/errors/mcp-internal.error.d.ts +7 -0
  35. package/build/_modules/mcp/_models/errors/mcp-internal.error.d.ts.map +1 -0
  36. package/build/_modules/mcp/_models/errors/mcp-internal.error.js +11 -0
  37. package/build/_modules/mcp/_models/errors/mcp-internal.error.js.map +1 -0
  38. package/build/_modules/mcp/_models/errors/mcp-invalid-params.error.d.ts +7 -0
  39. package/build/_modules/mcp/_models/errors/mcp-invalid-params.error.d.ts.map +1 -0
  40. package/build/_modules/mcp/_models/errors/mcp-invalid-params.error.js +11 -0
  41. package/build/_modules/mcp/_models/errors/mcp-invalid-params.error.js.map +1 -0
  42. package/build/_modules/mcp/_models/errors/mcp-method-not-found.error.d.ts +7 -0
  43. package/build/_modules/mcp/_models/errors/mcp-method-not-found.error.d.ts.map +1 -0
  44. package/build/_modules/mcp/_models/errors/mcp-method-not-found.error.js +11 -0
  45. package/build/_modules/mcp/_models/errors/mcp-method-not-found.error.js.map +1 -0
  46. package/build/_modules/mcp/_models/errors/mcp.error-base.d.ts +21 -0
  47. package/build/_modules/mcp/_models/errors/mcp.error-base.d.ts.map +1 -0
  48. package/build/_modules/mcp/_models/errors/mcp.error-base.js +25 -0
  49. package/build/_modules/mcp/_models/errors/mcp.error-base.js.map +1 -0
  50. package/build/_modules/mcp/_models/interfaces/mcp-error-data.interface.d.ts +32 -0
  51. package/build/_modules/mcp/_models/interfaces/mcp-error-data.interface.d.ts.map +1 -0
  52. package/build/_modules/mcp/_models/interfaces/mcp-error-data.interface.js +3 -0
  53. package/build/_modules/mcp/_models/interfaces/mcp-error-data.interface.js.map +1 -0
  54. package/build/_modules/mcp/_models/interfaces/mcp-json-rpc-error.interface.d.ts +12 -0
  55. package/build/_modules/mcp/_models/interfaces/mcp-json-rpc-error.interface.d.ts.map +1 -0
  56. package/build/_modules/mcp/_models/interfaces/mcp-json-rpc-error.interface.js +3 -0
  57. package/build/_modules/mcp/_models/interfaces/mcp-json-rpc-error.interface.js.map +1 -0
  58. package/build/_modules/mcp/_models/interfaces/mcp-settings.interface.d.ts +15 -0
  59. package/build/_modules/mcp/_models/interfaces/mcp-settings.interface.d.ts.map +1 -0
  60. package/build/_modules/mcp/_models/interfaces/mcp-settings.interface.js +3 -0
  61. package/build/_modules/mcp/_models/interfaces/mcp-settings.interface.js.map +1 -0
  62. package/build/_modules/mcp/_models/interfaces/mcp-validation-error-item.interface.d.ts +8 -0
  63. package/build/_modules/mcp/_models/interfaces/mcp-validation-error-item.interface.d.ts.map +1 -0
  64. package/build/_modules/mcp/_models/interfaces/mcp-validation-error-item.interface.js +3 -0
  65. package/build/_modules/mcp/_models/interfaces/mcp-validation-error-item.interface.js.map +1 -0
  66. package/build/_modules/mcp/_services/dynts-mcp.adapter.d.ts +5 -3
  67. package/build/_modules/mcp/_services/dynts-mcp.adapter.d.ts.map +1 -1
  68. package/build/_modules/mcp/_services/dynts-mcp.adapter.js +23 -20
  69. package/build/_modules/mcp/_services/dynts-mcp.adapter.js.map +1 -1
  70. package/build/_modules/mcp/index.d.ts +15 -0
  71. package/build/_modules/mcp/index.d.ts.map +1 -1
  72. package/build/_modules/mcp/index.js +19 -0
  73. package/build/_modules/mcp/index.js.map +1 -1
  74. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"global-settings.const.d.ts","sourceRoot":"","sources":["../../src/_collections/global-settings.const.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAIxF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,qBA+HnC,CAAC"}
1
+ {"version":3,"file":"global-settings.const.d.ts","sourceRoot":"","sources":["../../src/_collections/global-settings.const.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAIxF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,qBAiInC,CAAC"}
@@ -57,6 +57,7 @@ exports.DyNTS_global_settings = {
57
57
  optional: false,
58
58
  },
59
59
  bot_settings: null,
60
+ mcp_settings: null,
60
61
  openAi_settings: null,
61
62
  dias_settings: null,
62
63
  assistant_settings: null,
@@ -1 +1 @@
1
- {"version":3,"file":"global-settings.const.js","sourceRoot":"","sources":["../../src/_collections/global-settings.const.ts"],"names":[],"mappings":";;;AAEA,uEAAoE;AAEpE,yFAAsF;AACtF,mFAAgF;AAEhF;;;GAGG;AACU,QAAA,qBAAqB,GAA0B;IAC1D,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,iBAAiB;IAChC,oBAAoB,EAAE,yCAAmB,CAAC,IAAI;IAC9C,qBAAqB,EAAE,2CAAoB,CAAC,IAAI;IAEhD,eAAe,EAAE,EAAE;IACnB,gBAAgB,EAAE,GAAG;IACrB,YAAY,EAAE,IAAA,6DAA6B,GAAE;IAE7C,oCAAoC,EAAE,IAAI;IAC1C,oBAAoB,EAAE,IAAI;IAE1B,+FAA+F;IAC/F,6FAA6F;IAC7F,oBAAoB,EAAE,SAAS;IAC/B,qFAAqF;IACrF,gFAAgF;IAChF,gBAAgB,EAAE,KAAK;IACvB,sBAAsB,EAAE,IAAI;IAC5B,YAAY,EAAE;QACZ,gBAAgB,EAAE,KAAK;QAEvB,KAAK,EAAE,KAAK;QAEZ,O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,EAAE,CAAC;QAC1B,oBAAoB,EAAE,IAAI;QAC1B,uBAAuB,EAAE,KAAK;QAC9B,sBAAsB,EAAE,CAAC;QACzB,QAAQ,EAAE,GAAG;QACb,WAAW,EAAE,KAAK;QAClB,8FAA8F;QAC9F,eAAe,EAAE,KAAK;QACtB,uBAAuB,EAAE,CAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,CAAE;KACzE;IACD,+FAA+F;IAC/F,aAAa,EAAE;QACb,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,IAAI;QACpB,eAAe,EAAE,GAAG;KACrB;IAED,+FAA+F;IAC/F,iGAAiG;IACjG,iGAAiG;IACjG,gGAAgG;IAChG,uBAAuB,EAAE;QACvB,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,MAAM;QACtB,qBAAqB,EAAE,MAAM;QAC7B,sBAAsB,EAAE,EAAE;QAC1B,iBAAiB,EAAE,OAAO;KAC3B;CACF,CAAC"}
1
+ {"version":3,"file":"global-settings.const.js","sourceRoot":"","sources":["../../src/_collections/global-settings.const.ts"],"names":[],"mappings":";;;AAEA,uEAAoE;AAEpE,yFAAsF;AACtF,mFAAgF;AAEhF;;;GAGG;AACU,QAAA,qBAAqB,GAA0B;IAC1D,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,iBAAiB;IAChC,oBAAoB,EAAE,yCAAmB,CAAC,IAAI;IAC9C,qBAAqB,EAAE,2CAAoB,CAAC,IAAI;IAEhD,eAAe,EAAE,EAAE;IACnB,gBAAgB,EAAE,GAAG;IACrB,YAAY,EAAE,IAAA,6DAA6B,GAAE;IAE7C,oCAAoC,EAAE,IAAI;IAC1C,oBAAoB,EAAE,IAAI;IAE1B,+FAA+F;IAC/F,6FAA6F;IAC7F,oBAAoB,EAAE,SAAS;IAC/B,qFAAqF;IACrF,gFAAgF;IAChF,gBAAgB,EAAE,KAAK;IACvB,sBAAsB,EAAE,IAAI;IAC5B,YAAY,EAAE;QACZ,gBAAgB,EAAE,KA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AA0G;QAC1G,kGAAkG;QAClG,sBAAsB,EAAE,CAAC;QACzB,uBAAuB,EAAE,CAAC;QAC1B,oBAAoB,EAAE,IAAI;QAC1B,uBAAuB,EAAE,KAAK;QAC9B,sBAAsB,EAAE,CAAC;QACzB,QAAQ,EAAE,GAAG;QACb,WAAW,EAAE,KAAK;QAClB,8FAA8F;QAC9F,eAAe,EAAE,KAAK;QACtB,uBAAuB,EAAE,CAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,CAAE;KACzE;IACD,+FAA+F;IAC/F,aAAa,EAAE;QACb,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,IAAI;QACpB,eAAe,EAAE,GAAG;KACrB;IAED,+FAA+F;IAC/F,iGAAiG;IACjG,iGAAiG;IACjG,gGAAgG;IAChG,uBAAuB,EAAE;QACvB,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,MAAM;QACtB,qBAAqB,EAAE,MAAM;QAC7B,sBAAsB,EAAE,EAAE;QAC1B,iBAAiB,EAAE,OAAO;KAC3B;CACF,CAAC"}
@@ -4,6 +4,7 @@ import { DyNTS_AppVersionHeader_Settings } from './app-version-header-settings.i
4
4
  import { DyNTS_Environment_Settings } from './environment-settings.interface';
5
5
  import { DyNTS_GlobalLog_Settings } from './global-log-settings.interface';
6
6
  import { DyNTS_SecurityHeaders_Settings } from './security-headers-settings.interface';
7
+ import type { DyNTS_Mcp_Settings } from '../../_modules/mcp/_models/interfaces/mcp-settings.interface';
7
8
  /**
8
9
  *
9
10
  *
@@ -112,6 +113,11 @@ export interface DyNTS_Global_Settings {
112
113
  * default settings: {@link DyNTS_Bot_Global_Settings}
113
114
  */
114
115
  bot_settings: any;
116
+ /**
117
+ * Server-wide MCP defaults (HP-DOPL MP-3.2): tool-name prefix, read-only server, heavy-tool load protection.
118
+ * `null` (default) = every field takes its documented default ({@link DyNTS_Mcp_Settings}).
119
+ */
120
+ mcp_settings: DyNTS_Mcp_Settings | null;
115
121
  /**
116
122
  * this setting will set the openai settings
117
123
  * (this will be set in the {@link DyNTS_OAI_LLMChat_ServiceBase} constructor)
@@ -1 +1 @@
1
- {"version":3,"file":"global-settings.interface.d.ts","sourceRoot":"","sources":["../../../src/_models/interfaces/global-settings.interface.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AACzF,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,uCAAuC,CAAC;AAEvF;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IAEpC,YAAY,EAAE,0BAA0B,CAAC;IAEzC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,oBAAoB,EAAE,mBAAmB,CAAC;IAC1C;;OAEG;IACH,qBAAqB,EAAE,oBAAoB,CAAC;IAE5C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,oCAAoC,EAAE,OAAO,CAAC;IAE9C;;OAEG;IACH,oBAAoB,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IAGH;;OAEG;IACH,YAAY,EAAE,wBAAwB,CAAC;IAEvC;;;;;;;;;;OAUG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;;;;;OAQG;IACH,g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AC;KACnB,CAAC;CACH"}
1
+ {"version":3,"file":"global-settings.interface.d.ts","sourceRoot":"","sources":["../../../src/_models/interfaces/global-settings.interface.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AACzF,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,uCAAuC,CAAC;AACvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAEvG;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IAEpC,YAAY,EAAE,0BAA0B,CAAC;IAEzC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,oBAAoB,EAAE,mBAAmB,CAAC;IAC1C;;OAEG;IACH,qBAAqB,EAAE,oBAAoB,CAAC;IAE5C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,oCAAoC,EAAE,OAAO,CAAC;IAE9C;;OAEG;IACH,oBAAoB,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IAGH;;OAEG;IACH,YAAY,EAAE,wBAAwB,CAAC;IAEvC;;;;;;;;;;OAUG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;;;;;OAQG;I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E,MAAM,CAAC;QACjB,sDAAsD;QACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH"}
@@ -0,0 +1,38 @@
1
+ import { DyNTS_McpErrorCode_Type } from '../_enums/mcp-error-code.type-enum';
2
+ import { DyNTS_Mcp_JsonRpcError } from '../_models/interfaces/mcp-json-rpc-error.interface';
3
+ /**
4
+ * Turns any error into a caller-safe JSON-RPC error of the MCP layer (HP-DOPL MP-3.6, DMCP-006) — lifted from the
5
+ * organizer `Mcp_Controller.toJsonRpcError`, including its measured leak fix (`TD-20260817-003`: an internal provider
6
+ * message carried an API key prefix into the response).
7
+ *
8
+ * - `DyNTS_Mcp_*Error` → its own code, message and data (written for the caller);
9
+ * - `DyFM_Error` → the code from its HTTP status (400/404/422 invalid params · 401/403 forbidden ·
10
+ * 409/412/428 conflict · otherwise internal); the message is the `__userMessage` or a generic text with the error
11
+ * code — ⛔ the internal `_message` is NEVER sent (neither as `message` nor inside `data`);
12
+ * - any other `Error` / value → internal error with a generic message (the detail stays in the server log).
13
+ *
14
+ * ⭐ To give an agent a helpful text for a `DyFM_Error`, set its `userMessage`.
15
+ */
16
+ export declare class DyNTS_McpError_Util {
17
+ /**
18
+ * Builds the JSON-RPC error of an MCP call.
19
+ * @param set.error - the thrown error
20
+ * @param set.method - the called tool / method name
21
+ * @param set.validMethods - the valid method names, added to a method-not-found error
22
+ */
23
+ static toJsonRpcError(set: {
24
+ error: unknown;
25
+ method?: string;
26
+ validMethods?: string[];
27
+ }): DyNTS_Mcp_JsonRpcError;
28
+ /**
29
+ * The JSON-RPC code of an HTTP status — the same rejection on REST and MCP (DMCP-012 parity).
30
+ * @param status - the HTTP status of a `DyFM_Error`
31
+ */
32
+ static codeOfStatus(status: number | undefined): DyNTS_McpErrorCode_Type;
33
+ /** A generic, caller-safe label of a code. */
34
+ private static labelOf;
35
+ /** Drops the undefined fields, so the serialized data stays compact. */
36
+ private static withoutUndefined;
37
+ }
38
+ //# sourceMappingURL=mcp-error.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-error.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/mcp/_collections/mcp-error.util.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAI7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAG5F;;;;;;;;;;;;GAYG;AACH,qBAAa,mBAAmB;IAC9B;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,sBAAsB;IAwChH;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,uBAAuB;IAgBxE,8CAA8C;IAC9C,OAAO,CAAC,MAAM,CAAC,OAAO;IAetB,wEAAwE;IACxE,OAAO,CAAC,MAAM,CAAC,gBAAgB;CAShC"}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyNTS_McpError_Util = void 0;
4
+ const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
5
+ const mcp_error_code_type_enum_1 = require("../_enums/mcp-error-code.type-enum");
6
+ const mcp_error_base_1 = require("../_models/errors/mcp.error-base");
7
+ const mcp_method_not_found_error_1 = require("../_models/errors/mcp-method-not-found.error");
8
+ /**
9
+ * Turns any error into a caller-safe JSON-RPC error of the MCP layer (HP-DOPL MP-3.6, DMCP-006) — lifted from the
10
+ * organizer `Mcp_Controller.toJsonRpcError`, including its measured leak fix (`TD-20260817-003`: an internal provider
11
+ * message carried an API key prefix into the response).
12
+ *
13
+ * - `DyNTS_Mcp_*Error` → its own code, message and data (written for the caller);
14
+ * - `DyFM_Error` → the code from its HTTP status (400/404/422 invalid params · 401/403 forbidden ·
15
+ * 409/412/428 conflict · otherwise internal); the message is the `__userMessage` or a generic text with the error
16
+ * code — ⛔ the internal `_message` is NEVER sent (neither as `message` nor inside `data`);
17
+ * - any other `Error` / value → internal error with a generic message (the detail stays in the server log).
18
+ *
19
+ * ⭐ To give an agent a helpful text for a `DyFM_Error`, set its `userMessage`.
20
+ */
21
+ class DyNTS_McpError_Util {
22
+ /**
23
+ * Builds the JSON-RPC error of an MCP call.
24
+ * @param set.error - the thrown error
25
+ * @param set.method - the called tool / method name
26
+ * @param set.validMethods - the valid method names, added to a method-not-found error
27
+ */
28
+ static toJsonRpcError(set) {
29
+ const error = set.error;
30
+ if (error instanceof mcp_error_base_1.DyNTS_Mcp_ErrorBase) {
31
+ const data = {
32
+ message: error.message,
33
+ userMessage: error.message,
34
+ ...error.data,
35
+ method: error.data?.method ?? set.method,
36
+ };
37
+ if (error instanceof mcp_method_not_found_error_1.DyNTS_Mcp_MethodNotFoundError && !data.validMethods && set.validMethods) {
38
+ data.validMethods = [...set.validMethods];
39
+ }
40
+ return { code: error.code, message: error.message, data: DyNTS_McpError_Util.withoutUndefined(data) };
41
+ }
42
+ if (error instanceof fsm_dynamo_1.DyFM_Error) {
43
+ const code = DyNTS_McpError_Util.codeOfStatus(error.___status);
44
+ const errorCode = error._errorCode || undefined;
45
+ const message = error.__userMessage ??
46
+ `${DyNTS_McpError_Util.labelOf(code)}${errorCode ? ` (${errorCode})` : ''}`;
47
+ return {
48
+ code: code,
49
+ message: message,
50
+ data: DyNTS_McpError_Util.withoutUndefined({
51
+ message: message, userMessage: error.__userMessage, errorCode: errorCode, method: set.method,
52
+ }),
53
+ };
54
+ }
55
+ return {
56
+ code: mcp_error_code_type_enum_1.DyNTS_McpErrorCode_Type.internal,
57
+ message: 'Internal error',
58
+ data: DyNTS_McpError_Util.withoutUndefined({ message: 'Internal error', method: set.method }),
59
+ };
60
+ }
61
+ /**
62
+ * The JSON-RPC code of an HTTP status — the same rejection on REST and MCP (DMCP-012 parity).
63
+ * @param status - the HTTP status of a `DyFM_Error`
64
+ */
65
+ static codeOfStatus(status) {
66
+ if (status === 400 || status === 404 || status === 422) {
67
+ return mcp_error_code_type_enum_1.DyNTS_McpErrorCode_Type.invalidParams;
68
+ }
69
+ if (status === 401 || status === 403) {
70
+ return mcp_error_code_type_enum_1.DyNTS_McpErrorCode_Type.forbidden;
71
+ }
72
+ if (status === 409 || status === 412 || status === 428) {
73
+ return mcp_error_code_type_enum_1.DyNTS_McpErrorCode_Type.conflict;
74
+ }
75
+ return mcp_error_code_type_enum_1.DyNTS_McpErrorCode_Type.internal;
76
+ }
77
+ /** A generic, caller-safe label of a code. */
78
+ static labelOf(code) {
79
+ switch (code) {
80
+ case mcp_error_code_type_enum_1.DyNTS_McpErrorCode_Type.invalidParams:
81
+ return 'Invalid params';
82
+ case mcp_error_code_type_enum_1.DyNTS_McpErrorCode_Type.forbidden:
83
+ return 'Forbidden';
84
+ case mcp_error_code_type_enum_1.DyNTS_McpErrorCode_Type.conflict:
85
+ return 'Conflict';
86
+ case mcp_error_code_type_enum_1.DyNTS_McpErrorCode_Type.methodNotFound:
87
+ return 'Method not found';
88
+ default:
89
+ return 'Internal error';
90
+ }
91
+ }
92
+ /** Drops the undefined fields, so the serialized data stays compact. */
93
+ static withoutUndefined(data) {
94
+ Object.keys(data).forEach((key) => {
95
+ if (data[key] === undefined) {
96
+ delete data[key];
97
+ }
98
+ });
99
+ return data;
100
+ }
101
+ }
102
+ exports.DyNTS_McpError_Util = DyNTS_McpError_Util;
103
+ //# sourceMappingURL=mcp-error.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-error.util.js","sourceRoot":"","sources":["../../../../src/_modules/mcp/_collections/mcp-error.util.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AAEnD,iFAA6E;AAC7E,qEAAuE;AACvE,6FAA6F;AAK7F;;;;;;;;;;;;GAYG;AACH,MAAa,mBAAmB;IAC9B;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CA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D,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAW,EAAQ,EAAE;YAC9C,IAAK,IAA2C,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;gBACpE,OAAQ,IAA2C,CAAC,GAAG,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA7FD,kDA6FC"}
@@ -0,0 +1,46 @@
1
+ import { DyNTS_McpTool_Params } from '../_models/control-models/mcp-tool-params.control-model';
2
+ import { DyNTS_Mcp_Settings } from '../_models/interfaces/mcp-settings.interface';
3
+ /**
4
+ * Load protection of MCP tool calls (HP-DOPL MP-3.2, DMCP-013) — the FAM `assertHeapCapacity` +
5
+ * `FAM_OperationQueue_Service` pattern at bedrock level. Only HEAVY tools (`DyNTS_McpTool_Params.isHeavy`) are guarded;
6
+ * a light call runs immediately.
7
+ *
8
+ * For a heavy call, in this order:
9
+ * 1. **load shed** — while the installed `DyNTS_MemoryGuard` reports critical pressure the call is rejected with 503
10
+ * `DyNTS-MTL-SHD` (retryable), so a new heavy job does not push a strained heap into OOM;
11
+ * 2. **serialization** — at most `mcp_settings.heavyToolConcurrency` (default 1) heavy calls run at once; the rest
12
+ * wait in FIFO order. A failed call releases its slot too.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const result: unknown = await DyNTS_McpToolLoad_Util.run(scanTool, () => scanTool.operation.run(ctx, path));
17
+ * ```
18
+ */
19
+ export declare class DyNTS_McpToolLoad_Util {
20
+ /** Heavy calls running now. */
21
+ private static running;
22
+ /** Resolvers of the heavy calls waiting for a slot (FIFO). */
23
+ private static readonly waiters;
24
+ /**
25
+ * Runs the task with the load protection of the tool.
26
+ * @param tool - the tool being called
27
+ * @param task - the call itself
28
+ * @param settings - the MCP settings (default: `DyNTS_global_settings.mcp_settings`)
29
+ * @throws 503 `DyNTS-MTL-SHD` when a heavy call is shed under memory pressure
30
+ */
31
+ static run<T>(tool: DyNTS_McpTool_Params, task: () => Promise<T>, settings?: DyNTS_Mcp_Settings | null): Promise<T>;
32
+ /** Heavy calls running and waiting — for health endpoints and specs. */
33
+ static stats(): {
34
+ running: number;
35
+ queued: number;
36
+ };
37
+ /** Rejects a heavy call while the installed memory guard wants to shed load. */
38
+ private static assertMemoryCapacity;
39
+ /** Waits for a heavy slot (FIFO). */
40
+ private static acquire;
41
+ /** Hands the slot to the next waiter, or frees it. */
42
+ private static release;
43
+ /** The heavy concurrency limit (at least 1). */
44
+ private static limit;
45
+ }
46
+ //# sourceMappingURL=mcp-tool-load.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-tool-load.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/mcp/_collections/mcp-tool-load.util.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yDAAyD,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAGlF;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,sBAAsB;IACjC,+BAA+B;IAC/B,OAAO,CAAC,MAAM,CAAC,OAAO,CAAa;IAEnC,8DAA8D;IAC9D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAErD;;;;;;OAMG;WACU,GAAG,CAAC,CAAC,EAChB,IAAI,EAAE,oBAAoB,EAC1B,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACtB,QAAQ,GAAE,kBAAkB,GAAG,IAAyC,GACvE,OAAO,CAAC,CAAC,CAAC;IAgBb,wEAAwE;IACxE,MAAM,CAAC,KAAK,IAAI;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAInD,gFAAgF;IAChF,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAenC,qCAAqC;mBAChB,OAAO;IAa5B,sDAAsD;IACtD,OAAO,CAAC,MAAM,CAAC,OAAO;IAYtB,gDAAgD;IAChD,OAAO,CAAC,MAAM,CAAC,KAAK;CAGrB"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyNTS_McpToolLoad_Util = void 0;
4
+ const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
5
+ const global_settings_const_1 = require("../../../_collections/global-settings.const");
6
+ const memory_guard_service_1 = require("../../../_services/core/memory-guard.service");
7
+ /**
8
+ * Load protection of MCP tool calls (HP-DOPL MP-3.2, DMCP-013) — the FAM `assertHeapCapacity` +
9
+ * `FAM_OperationQueue_Service` pattern at bedrock level. Only HEAVY tools (`DyNTS_McpTool_Params.isHeavy`) are guarded;
10
+ * a light call runs immediately.
11
+ *
12
+ * For a heavy call, in this order:
13
+ * 1. **load shed** — while the installed `DyNTS_MemoryGuard` reports critical pressure the call is rejected with 503
14
+ * `DyNTS-MTL-SHD` (retryable), so a new heavy job does not push a strained heap into OOM;
15
+ * 2. **serialization** — at most `mcp_settings.heavyToolConcurrency` (default 1) heavy calls run at once; the rest
16
+ * wait in FIFO order. A failed call releases its slot too.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const result: unknown = await DyNTS_McpToolLoad_Util.run(scanTool, () => scanTool.operation.run(ctx, path));
21
+ * ```
22
+ */
23
+ class DyNTS_McpToolLoad_Util {
24
+ /** Heavy calls running now. */
25
+ static running = 0;
26
+ /** Resolvers of the heavy calls waiting for a slot (FIFO). */
27
+ static waiters = [];
28
+ /**
29
+ * Runs the task with the load protection of the tool.
30
+ * @param tool - the tool being called
31
+ * @param task - the call itself
32
+ * @param settings - the MCP settings (default: `DyNTS_global_settings.mcp_settings`)
33
+ * @throws 503 `DyNTS-MTL-SHD` when a heavy call is shed under memory pressure
34
+ */
35
+ static async run(tool, task, settings = global_settings_const_1.DyNTS_global_settings.mcp_settings) {
36
+ if (!tool.isHeavy) {
37
+ return task();
38
+ }
39
+ DyNTS_McpToolLoad_Util.assertMemoryCapacity(tool, settings);
40
+ await DyNTS_McpToolLoad_Util.acquire(settings);
41
+ try {
42
+ return await task();
43
+ }
44
+ finally {
45
+ DyNTS_McpToolLoad_Util.release(settings);
46
+ }
47
+ }
48
+ /** Heavy calls running and waiting — for health endpoints and specs. */
49
+ static stats() {
50
+ return { running: DyNTS_McpToolLoad_Util.running, queued: DyNTS_McpToolLoad_Util.waiters.length };
51
+ }
52
+ /** Rejects a heavy call while the installed memory guard wants to shed load. */
53
+ static assertMemoryCapacity(tool, settings) {
54
+ const guard = memory_guard_service_1.DyNTS_MemoryGuard.getInstance();
55
+ if (settings?.shedHeavyToolsUnderMemoryPressure === false || !guard.isInstalled() || !guard.shouldShedLoad()) {
56
+ return;
57
+ }
58
+ throw new fsm_dynamo_1.DyFM_Error({
59
+ status: 503,
60
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-MTL-SHD`,
61
+ message: `heavy MCP tool "${tool.tool}" rejected under memory pressure - retry when the pressure eases`,
62
+ additionalContent: { tool: tool.tool, pressure: guard.pressure() },
63
+ });
64
+ }
65
+ /** Waits for a heavy slot (FIFO). */
66
+ static async acquire(settings) {
67
+ if (DyNTS_McpToolLoad_Util.running < DyNTS_McpToolLoad_Util.limit(settings)) {
68
+ DyNTS_McpToolLoad_Util.running++;
69
+ return;
70
+ }
71
+ // the slot is handed over by release(), so `running` already counts this call when it resumes
72
+ await new Promise((resolve) => {
73
+ DyNTS_McpToolLoad_Util.waiters.push(resolve);
74
+ });
75
+ }
76
+ /** Hands the slot to the next waiter, or frees it. */
77
+ static release(settings) {
78
+ const next = DyNTS_McpToolLoad_Util.running <= DyNTS_McpToolLoad_Util.limit(settings) ?
79
+ DyNTS_McpToolLoad_Util.waiters.shift() : undefined;
80
+ if (next) {
81
+ next();
82
+ }
83
+ else {
84
+ DyNTS_McpToolLoad_Util.running--;
85
+ }
86
+ }
87
+ /** The heavy concurrency limit (at least 1). */
88
+ static limit(settings) {
89
+ return Math.max(1, Math.floor(settings?.heavyToolConcurrency ?? 1));
90
+ }
91
+ }
92
+ exports.DyNTS_McpToolLoad_Util = DyNTS_McpToolLoad_Util;
93
+ //# sourceMappingURL=mcp-tool-load.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-tool-load.util.js","sourceRoot":"","sources":["../../../../src/_modules/mcp/_collections/mcp-tool-load.util.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AAEnD,uFAAoF;AACpF,uFAAiF;AAKjF;;;;;;;;;;;;;;;GAeG;AACH,MAAa,sBAAsB;IACjC,+BAA+B;IACvB,MAAM,CAAC,OAAO,GAAW,CAAC,CAAC;IAEnC,8DAA8D;IACtD,MAAM,CAAU,OAAO,GAAmB,EAAE,CAAC;IAErD;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,GAAG,CACd,IAA0B,EAC1B,IAAsB,EACtB,WAAsC,6CAAqB,CAAC,YAAY;QAExE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO,IAAI,EAAE,CAAC;QAChB,CAAC;QAED,sBAAsB,CAAC,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAE5D,MAAM,sBAAsB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE/C,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,EAAE,CAAC;QACtB,CAAC;gBAAS,CAAC;YACT,sBAAsB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAED,wEAAwE;IACxE,MAAM,CAAC,KAAK;QACV,OAAO,EAAE,OAAO,EAAE,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,sBAAsB,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IACpG,CAAC;IAED,gFAAgF;IACxE,MAAM,CAAC,oBAAoB,CAAC,IAA0B,EAAE,QAAmC;QACjG,MAAM,KAAK,GAAsB,wCAAiB,CAAC,WAAW,EAAE,CAAC;QAEj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KAAK,CAAC,QAAmC;QACtD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,oBAAoB,IAAI,CAAC,CAAC,CAAC,CAAC;IACtE,CAAC;;AArFH,wDAsFC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * JSON-RPC error codes of the MCP layer (HP-DOPL MP-3.6, DMCP-006) — lifted from the organizer MCP server, where they
3
+ * are in production. The standard JSON-RPC codes plus two server-defined codes (-32000…-32099 range).
4
+ */
5
+ export declare enum DyNTS_McpErrorCode_Type {
6
+ /** JSON-RPC: the method does not exist. */
7
+ methodNotFound = -32601,
8
+ /** JSON-RPC: invalid method parameters (also used for a missing entity, as in the organizer). */
9
+ invalidParams = -32602,
10
+ /** JSON-RPC: internal error. */
11
+ internal = -32603,
12
+ /** Server-defined: optimistic concurrency conflict (etag / If-Match mismatch). */
13
+ conflict = -32001,
14
+ /** Server-defined: the caller is not allowed (unauthenticated, missing scope, protected entity). */
15
+ forbidden = -32002
16
+ }
17
+ //# sourceMappingURL=mcp-error-code.type-enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-error-code.type-enum.d.ts","sourceRoot":"","sources":["../../../../src/_modules/mcp/_enums/mcp-error-code.type-enum.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,uBAAuB;IACjC,2CAA2C;IAC3C,cAAc,SAAS;IACvB,iGAAiG;IACjG,aAAa,SAAS;IACtB,gCAAgC;IAChC,QAAQ,SAAS;IACjB,kFAAkF;IAClF,QAAQ,SAAS;IACjB,oGAAoG;IACpG,SAAS,SAAS;CACnB"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyNTS_McpErrorCode_Type = void 0;
4
+ /**
5
+ * JSON-RPC error codes of the MCP layer (HP-DOPL MP-3.6, DMCP-006) — lifted from the organizer MCP server, where they
6
+ * are in production. The standard JSON-RPC codes plus two server-defined codes (-32000…-32099 range).
7
+ */
8
+ var DyNTS_McpErrorCode_Type;
9
+ (function (DyNTS_McpErrorCode_Type) {
10
+ /** JSON-RPC: the method does not exist. */
11
+ DyNTS_McpErrorCode_Type[DyNTS_McpErrorCode_Type["methodNotFound"] = -32601] = "methodNotFound";
12
+ /** JSON-RPC: invalid method parameters (also used for a missing entity, as in the organizer). */
13
+ DyNTS_McpErrorCode_Type[DyNTS_McpErrorCode_Type["invalidParams"] = -32602] = "invalidParams";
14
+ /** JSON-RPC: internal error. */
15
+ DyNTS_McpErrorCode_Type[DyNTS_McpErrorCode_Type["internal"] = -32603] = "internal";
16
+ /** Server-defined: optimistic concurrency conflict (etag / If-Match mismatch). */
17
+ DyNTS_McpErrorCode_Type[DyNTS_McpErrorCode_Type["conflict"] = -32001] = "conflict";
18
+ /** Server-defined: the caller is not allowed (unauthenticated, missing scope, protected entity). */
19
+ DyNTS_McpErrorCode_Type[DyNTS_McpErrorCode_Type["forbidden"] = -32002] = "forbidden";
20
+ })(DyNTS_McpErrorCode_Type || (exports.DyNTS_McpErrorCode_Type = DyNTS_McpErrorCode_Type = {}));
21
+ //# sourceMappingURL=mcp-error-code.type-enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-error-code.type-enum.js","sourceRoot":"","sources":["../../../../src/_modules/mcp/_enums/mcp-error-code.type-enum.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,uBAWX;AAXD,WAAY,uBAAuB;IACjC,2CAA2C;IAC3C,8FAAuB,CAAA;IACvB,iGAAiG;IACjG,4FAAsB,CAAA;IACtB,gCAAgC;IAChC,kFAAiB,CAAA;IACjB,kFAAkF;IAClF,kFAAiB,CAAA;IACjB,oGAAoG;IACpG,oFAAkB,CAAA;AACpB,CAAC,EAXW,uBAAuB,uCAAvB,uBAAuB,QAWlC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * How an operation is exposed as an MCP tool (HP-DOPL MP-3.2, DMCP-001/018).
3
+ *
4
+ * - `default` — advertised in `tools/list`, except on a read-only MCP server (`mcp_settings.readOnly`);
5
+ * - `none` — never advertised (the operation stays REST/CLI only; the coverage review counts it as deliberate);
6
+ * - `read-only` — the tool has no side effects: advertised on a read-only server too, with the MCP
7
+ * `readOnlyHint` annotation.
8
+ */
9
+ export declare enum DyNTS_McpToolExposure_Type {
10
+ default = "default",
11
+ none = "none",
12
+ readOnly = "read-only"
13
+ }
14
+ //# sourceMappingURL=mcp-tool-exposure.type-enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-tool-exposure.type-enum.d.ts","sourceRoot":"","sources":["../../../../src/_modules/mcp/_enums/mcp-tool-exposure.type-enum.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,oBAAY,0BAA0B;IACpC,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,QAAQ,cAAc;CACvB"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyNTS_McpToolExposure_Type = void 0;
4
+ /**
5
+ * How an operation is exposed as an MCP tool (HP-DOPL MP-3.2, DMCP-001/018).
6
+ *
7
+ * - `default` — advertised in `tools/list`, except on a read-only MCP server (`mcp_settings.readOnly`);
8
+ * - `none` — never advertised (the operation stays REST/CLI only; the coverage review counts it as deliberate);
9
+ * - `read-only` — the tool has no side effects: advertised on a read-only server too, with the MCP
10
+ * `readOnlyHint` annotation.
11
+ */
12
+ var DyNTS_McpToolExposure_Type;
13
+ (function (DyNTS_McpToolExposure_Type) {
14
+ DyNTS_McpToolExposure_Type["default"] = "default";
15
+ DyNTS_McpToolExposure_Type["none"] = "none";
16
+ DyNTS_McpToolExposure_Type["readOnly"] = "read-only";
17
+ })(DyNTS_McpToolExposure_Type || (exports.DyNTS_McpToolExposure_Type = DyNTS_McpToolExposure_Type = {}));
18
+ //# sourceMappingURL=mcp-tool-exposure.type-enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-tool-exposure.type-enum.js","sourceRoot":"","sources":["../../../../src/_modules/mcp/_enums/mcp-tool-exposure.type-enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACpC,iDAAmB,CAAA;IACnB,2CAAa,CAAA;IACb,oDAAsB,CAAA;AACxB,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC"}
@@ -0,0 +1,81 @@
1
+ import { DyFM_Operation_Context, DyFM_Operation_JsonSchema, DyFM_Operation_Settings } from '@futdevpro/fsm-dynamo';
2
+ import { DyNTS_McpToolExposure_Type } from '../../_enums/mcp-tool-exposure.type-enum';
3
+ import { DyNTS_Mcp_Settings } from '../interfaces/mcp-settings.interface';
4
+ /**
5
+ * An operation exposed as an MCP tool (HP-DOPL MP-3.2, decision B+C): the MCP-specific settings on top of a
6
+ * transport-independent `DyFM_Operation_Settings` — the tool name, the exposure, an optional input schema override
7
+ * and the load protection flag. The operation stays the single source of the implementation (`run`).
8
+ *
9
+ * Follows the Dynamo settings pattern: a `set` constructor, defaults applied in the constructor, construction-time
10
+ * validation with a coded `DyFM_Error` that carries the construction location.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const getNoteTool: DyNTS_McpTool_Params = new DyNTS_McpTool_Params({
15
+ * operation: getNote, // name: 'notes.get'
16
+ * exposure: DyNTS_McpToolExposure_Type.readOnly,
17
+ * // agent-friendly output (DMCP-011): may be async and use the caller context, e.g. for a parent name lookup
18
+ * outputMapper: async (note: Note, ctx: DyFM_Operation_Context): Promise<NoteResult> =>
19
+ * NoteMapper.toResult(note, await loadParentName(note, ctx.issuer)),
20
+ * });
21
+ * // getNoteTool.getToolName() === 'notes.get' (or 'organizer.notes.get' with mcp_settings.toolPrefix)
22
+ * ```
23
+ */
24
+ export declare class DyNTS_McpTool_Params {
25
+ /** The operation this tool runs. */
26
+ readonly operation: DyFM_Operation_Settings<unknown, unknown[], unknown>;
27
+ /** The tool name without the server prefix; default: the operation name (`<domain>.<action>`). */
28
+ readonly tool: string;
29
+ /** The tool description for the agent; default: the operation description. */
30
+ readonly description: string;
31
+ /** How the tool is advertised; default: `default`. */
32
+ readonly exposure: DyNTS_McpToolExposure_Type;
33
+ /** The input schema; default: generated from the operation (`DyFM_OperationSchema_Util.inputSchema`). */
34
+ readonly inputSchema: DyFM_Operation_JsonSchema;
35
+ /** A heavy tool is serialized and shed under memory pressure (DMCP-013); default: `false`. */
36
+ readonly isHeavy: boolean;
37
+ /** Source location of the construction, for debugging a misconfigured tool. */
38
+ readonly stackLocation: string;
39
+ /**
40
+ * Maps the operation result to the agent-facing tool output (HP-DOPL MP-3.3, DMCP-011, D-8) — e.g. an entity to
41
+ * `{ ref, etag, summary }`. May be async and may use the caller context (`ctx.issuer`) for lookups; missing = the
42
+ * operation result goes out unchanged. REST is never affected: the mapper runs only on the MCP path.
43
+ * Method syntax on purpose: a typed mapper stays assignable under `strictFunctionTypes`.
44
+ */
45
+ outputMapper?(result: unknown, ctx: DyFM_Operation_Context): unknown;
46
+ /**
47
+ * Validates the settings and applies the defaults.
48
+ * @param set - the tool settings; throws a coded `DyFM_Error` when invalid
49
+ */
50
+ constructor(set: {
51
+ operation: DyFM_Operation_Settings<unknown, unknown[], unknown>;
52
+ tool?: string;
53
+ description?: string;
54
+ exposure?: DyNTS_McpToolExposure_Type;
55
+ inputSchema?: DyFM_Operation_JsonSchema;
56
+ isHeavy?: boolean;
57
+ outputMapper?(result: unknown, ctx: DyFM_Operation_Context): unknown;
58
+ stackLocation?: string;
59
+ });
60
+ /**
61
+ * The tool output of an operation result: the `outputMapper` result, or the operation result unchanged.
62
+ * @param result - the operation result
63
+ * @param ctx - the context of the call
64
+ * @throws the mapper's coded `DyFM_Error` unchanged · 500 `DyNTS-MTP-MAP` for any other mapper failure
65
+ */
66
+ mapOutput(result: unknown, ctx: DyFM_Operation_Context): Promise<unknown>;
67
+ /**
68
+ * The advertised tool name: the server prefix (`mcp_settings.toolPrefix`) + the tool name.
69
+ * @param settings - the MCP settings (default: `DyNTS_global_settings.mcp_settings`)
70
+ * @throws `DyNTS-MTP-PFX` when the prefixed name is not a valid tool name
71
+ */
72
+ getToolName(settings?: DyNTS_Mcp_Settings | null): string;
73
+ /**
74
+ * Whether the tool appears in `tools/list`: never for `none`; on a read-only server only for `read-only`.
75
+ * @param settings - the MCP settings (default: `DyNTS_global_settings.mcp_settings`)
76
+ */
77
+ isAdvertised(settings?: DyNTS_Mcp_Settings | null): boolean;
78
+ /** Builds the construction error with a stable error code and the construction location. */
79
+ private static invalid;
80
+ }
81
+ //# sourceMappingURL=mcp-tool-params.control-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-tool-params.control-model.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/mcp/_models/control-models/mcp-tool-params.control-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAC0C,sBAAsB,EAAE,yBAAyB,EAChG,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAM1E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,oBAAoB;IAC/B,oCAAoC;IACpC,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,kGAAkG;IAClG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC;IAC9C,yGAAyG;IACzG,QAAQ,CAAC,WAAW,EAAE,yBAAyB,CAAC;IAChD,8FAA8F;IAC9F,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,+EAA+E;IAC/E,QAAQ,CAAC,a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