@lerianstudio/matcher-mcp 5.0.0-beta.7 → 5.0.0-beta.71

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 (273) hide show
  1. package/README.md +28 -13
  2. package/dist/auth/request-token.js +11 -69
  3. package/dist/auth/request-token.js.map +1 -1
  4. package/dist/config.js +6 -21
  5. package/dist/config.js.map +1 -1
  6. package/dist/copilot/agent.js +5 -9
  7. package/dist/copilot/agent.js.map +1 -1
  8. package/dist/copilot/provider-anthropic.js +75 -23
  9. package/dist/copilot/provider-anthropic.js.map +1 -1
  10. package/dist/copilot/provider-openrouter.js +5 -18
  11. package/dist/copilot/provider-openrouter.js.map +1 -1
  12. package/dist/copilot/provider-shared.js +11 -0
  13. package/dist/copilot/provider-shared.js.map +1 -1
  14. package/dist/copilot/speech-provider.js +84 -0
  15. package/dist/copilot/speech-provider.js.map +1 -0
  16. package/dist/copilot/sse.js +5 -0
  17. package/dist/copilot/sse.js.map +1 -1
  18. package/dist/copilot/tools.js +14 -65
  19. package/dist/copilot/tools.js.map +1 -1
  20. package/dist/copilot/transcribe-handler.js +8 -93
  21. package/dist/copilot/transcribe-handler.js.map +1 -1
  22. package/dist/copilot/turn-request.js +76 -0
  23. package/dist/copilot/turn-request.js.map +1 -0
  24. package/dist/copilot/turns-handler.js +11 -102
  25. package/dist/copilot/turns-handler.js.map +1 -1
  26. package/dist/matcher/client.js +14 -0
  27. package/dist/matcher/client.js.map +1 -1
  28. package/dist/matcher/idempotency.js +94 -0
  29. package/dist/matcher/idempotency.js.map +1 -0
  30. package/dist/observability/otel.js +7 -29
  31. package/dist/observability/otel.js.map +1 -1
  32. package/dist/server.js +12 -81
  33. package/dist/server.js.map +1 -1
  34. package/dist/spec/curated-operations.js +111 -95
  35. package/dist/spec/curated-operations.js.map +1 -1
  36. package/dist/spec/enum-policy.js +21 -26
  37. package/dist/spec/enum-policy.js.map +1 -1
  38. package/dist/spec/openapi.yaml +841 -56
  39. package/dist/spec/schema-parity.js +23 -28
  40. package/dist/spec/schema-parity.js.map +1 -1
  41. package/dist/tools/context/create.js +3 -2
  42. package/dist/tools/context/create.js.map +1 -1
  43. package/dist/tools/context/index.js +137 -17
  44. package/dist/tools/context/index.js.map +1 -1
  45. package/dist/tools/context/list.js +9 -35
  46. package/dist/tools/context/list.js.map +1 -1
  47. package/dist/tools/context/setup-progress.js +3 -2
  48. package/dist/tools/context/setup-progress.js.map +1 -1
  49. package/dist/tools/context/shared.js +7 -48
  50. package/dist/tools/context/shared.js.map +1 -1
  51. package/dist/tools/context/update.js +5 -5
  52. package/dist/tools/context/update.js.map +1 -1
  53. package/dist/tools/curated-tool.js +39 -0
  54. package/dist/tools/curated-tool.js.map +1 -0
  55. package/dist/tools/dashboard/index.js +124 -19
  56. package/dist/tools/dashboard/index.js.map +1 -1
  57. package/dist/tools/dashboard/shared.js +9 -68
  58. package/dist/tools/dashboard/shared.js.map +1 -1
  59. package/dist/tools/dispute/close.js +5 -5
  60. package/dist/tools/dispute/close.js.map +1 -1
  61. package/dist/tools/dispute/index.js +34 -6
  62. package/dist/tools/dispute/index.js.map +1 -1
  63. package/dist/tools/dispute/list.js +18 -47
  64. package/dist/tools/dispute/list.js.map +1 -1
  65. package/dist/tools/dispute/shared.js +4 -43
  66. package/dist/tools/dispute/shared.js.map +1 -1
  67. package/dist/tools/dispute/submit-evidence.js +5 -5
  68. package/dist/tools/dispute/submit-evidence.js.map +1 -1
  69. package/dist/tools/exception/add-comment.js +3 -2
  70. package/dist/tools/exception/add-comment.js.map +1 -1
  71. package/dist/tools/exception/adjust-entry.js +5 -5
  72. package/dist/tools/exception/adjust-entry.js.map +1 -1
  73. package/dist/tools/exception/bulk-assign.js +3 -2
  74. package/dist/tools/exception/bulk-assign.js.map +1 -1
  75. package/dist/tools/exception/bulk-dispatch.js +12 -4
  76. package/dist/tools/exception/bulk-dispatch.js.map +1 -1
  77. package/dist/tools/exception/bulk-resolve.js +3 -2
  78. package/dist/tools/exception/bulk-resolve.js.map +1 -1
  79. package/dist/tools/exception/dispatch.js +13 -5
  80. package/dist/tools/exception/dispatch.js.map +1 -1
  81. package/dist/tools/exception/force-match.js +3 -2
  82. package/dist/tools/exception/force-match.js.map +1 -1
  83. package/dist/tools/exception/history.js +8 -24
  84. package/dist/tools/exception/history.js.map +1 -1
  85. package/dist/tools/exception/index.js +88 -18
  86. package/dist/tools/exception/index.js.map +1 -1
  87. package/dist/tools/exception/list.js +14 -57
  88. package/dist/tools/exception/list.js.map +1 -1
  89. package/dist/tools/exception/open-dispute.js +3 -2
  90. package/dist/tools/exception/open-dispute.js.map +1 -1
  91. package/dist/tools/exception/shared.js +10 -46
  92. package/dist/tools/exception/shared.js.map +1 -1
  93. package/dist/tools/fee-rule/create.js +5 -5
  94. package/dist/tools/fee-rule/create.js.map +1 -1
  95. package/dist/tools/fee-rule/index.js +50 -8
  96. package/dist/tools/fee-rule/index.js.map +1 -1
  97. package/dist/tools/fee-rule/list.js +9 -29
  98. package/dist/tools/fee-rule/list.js.map +1 -1
  99. package/dist/tools/fee-rule/shared.js +5 -47
  100. package/dist/tools/fee-rule/shared.js.map +1 -1
  101. package/dist/tools/fee-rule/update.js +5 -5
  102. package/dist/tools/fee-rule/update.js.map +1 -1
  103. package/dist/tools/fee-schedule/create.js +8 -3
  104. package/dist/tools/fee-schedule/create.js.map +1 -1
  105. package/dist/tools/fee-schedule/index.js +62 -11
  106. package/dist/tools/fee-schedule/index.js.map +1 -1
  107. package/dist/tools/fee-schedule/list.js +8 -24
  108. package/dist/tools/fee-schedule/list.js.map +1 -1
  109. package/dist/tools/fee-schedule/shared.js +5 -44
  110. package/dist/tools/fee-schedule/shared.js.map +1 -1
  111. package/dist/tools/fee-schedule/simulate.js +5 -5
  112. package/dist/tools/fee-schedule/simulate.js.map +1 -1
  113. package/dist/tools/fee-schedule/update.js +5 -5
  114. package/dist/tools/fee-schedule/update.js.map +1 -1
  115. package/dist/tools/field-map/create.js +3 -2
  116. package/dist/tools/field-map/create.js.map +1 -1
  117. package/dist/tools/field-map/index.js +65 -11
  118. package/dist/tools/field-map/index.js.map +1 -1
  119. package/dist/tools/field-map/list.js +9 -29
  120. package/dist/tools/field-map/list.js.map +1 -1
  121. package/dist/tools/field-map/shared.js +6 -42
  122. package/dist/tools/field-map/shared.js.map +1 -1
  123. package/dist/tools/field-map/update.js +3 -2
  124. package/dist/tools/field-map/update.js.map +1 -1
  125. package/dist/tools/generic/invoke.js +16 -39
  126. package/dist/tools/generic/invoke.js.map +1 -1
  127. package/dist/tools/ingestion/index.js +100 -12
  128. package/dist/tools/ingestion/index.js.map +1 -1
  129. package/dist/tools/ingestion/job-transactions-list.js +10 -40
  130. package/dist/tools/ingestion/job-transactions-list.js.map +1 -1
  131. package/dist/tools/ingestion/jobs-list.js +9 -35
  132. package/dist/tools/ingestion/jobs-list.js.map +1 -1
  133. package/dist/tools/ingestion/shared.js +4 -41
  134. package/dist/tools/ingestion/shared.js.map +1 -1
  135. package/dist/tools/ingestion/transactions-search.js +9 -44
  136. package/dist/tools/ingestion/transactions-search.js.map +1 -1
  137. package/dist/tools/ingestion/upload-begin.js +5 -2
  138. package/dist/tools/ingestion/upload-begin.js.map +1 -1
  139. package/dist/tools/ingestion/upload.js +3 -2
  140. package/dist/tools/ingestion/upload.js.map +1 -1
  141. package/dist/tools/input-fields.js +51 -0
  142. package/dist/tools/input-fields.js.map +1 -0
  143. package/dist/tools/match-rule/index.js +130 -13
  144. package/dist/tools/match-rule/index.js.map +1 -1
  145. package/dist/tools/match-rule/list.js +9 -33
  146. package/dist/tools/match-rule/list.js.map +1 -1
  147. package/dist/tools/match-rule/shared.js +16 -46
  148. package/dist/tools/match-rule/shared.js.map +1 -1
  149. package/dist/tools/match-rule/update.js +7 -11
  150. package/dist/tools/match-rule/update.js.map +1 -1
  151. package/dist/tools/matching/get.js +5 -5
  152. package/dist/tools/matching/get.js.map +1 -1
  153. package/dist/tools/matching/groups.js +6 -14
  154. package/dist/tools/matching/groups.js.map +1 -1
  155. package/dist/tools/matching/index.js +77 -5
  156. package/dist/tools/matching/index.js.map +1 -1
  157. package/dist/tools/matching/list.js +9 -32
  158. package/dist/tools/matching/list.js.map +1 -1
  159. package/dist/tools/matching/shared.js +5 -46
  160. package/dist/tools/matching/shared.js.map +1 -1
  161. package/dist/tools/query-handler.js +9 -0
  162. package/dist/tools/query-handler.js.map +1 -0
  163. package/dist/tools/report/index.js +260 -30
  164. package/dist/tools/report/index.js.map +1 -1
  165. package/dist/tools/report/shared.js +24 -98
  166. package/dist/tools/report/shared.js.map +1 -1
  167. package/dist/tools/request-fields.js +17 -0
  168. package/dist/tools/request-fields.js.map +1 -0
  169. package/dist/tools/shared-dispatch.js +38 -0
  170. package/dist/tools/shared-dispatch.js.map +1 -0
  171. package/dist/tools/source/create.js +146 -23
  172. package/dist/tools/source/create.js.map +1 -1
  173. package/dist/tools/source/index.js +101 -13
  174. package/dist/tools/source/index.js.map +1 -1
  175. package/dist/tools/source/list.js +9 -32
  176. package/dist/tools/source/list.js.map +1 -1
  177. package/dist/tools/source/shared.js +5 -42
  178. package/dist/tools/source/shared.js.map +1 -1
  179. package/dist/tools/source/update.js +16 -33
  180. package/dist/tools/source/update.js.map +1 -1
  181. package/dist/tools/workspace/usage.js +12 -40
  182. package/dist/tools/workspace/usage.js.map +1 -1
  183. package/package.json +4 -4
  184. package/dist/tools/context/archive.js +0 -37
  185. package/dist/tools/context/archive.js.map +0 -1
  186. package/dist/tools/context/get.js +0 -31
  187. package/dist/tools/context/get.js.map +0 -1
  188. package/dist/tools/context/next-step.js +0 -99
  189. package/dist/tools/context/next-step.js.map +0 -1
  190. package/dist/tools/context/restore.js +0 -34
  191. package/dist/tools/context/restore.js.map +0 -1
  192. package/dist/tools/dashboard/aggregates.js +0 -37
  193. package/dist/tools/dashboard/aggregates.js.map +0 -1
  194. package/dist/tools/dashboard/cash-impact.js +0 -37
  195. package/dist/tools/dashboard/cash-impact.js.map +0 -1
  196. package/dist/tools/dashboard/match-rate.js +0 -37
  197. package/dist/tools/dashboard/match-rate.js.map +0 -1
  198. package/dist/tools/dashboard/metrics.js +0 -37
  199. package/dist/tools/dashboard/metrics.js.map +0 -1
  200. package/dist/tools/dashboard/sla.js +0 -34
  201. package/dist/tools/dashboard/sla.js.map +0 -1
  202. package/dist/tools/dashboard/source-breakdown.js +0 -37
  203. package/dist/tools/dashboard/source-breakdown.js.map +0 -1
  204. package/dist/tools/dashboard/volume.js +0 -37
  205. package/dist/tools/dashboard/volume.js.map +0 -1
  206. package/dist/tools/dispute/get.js +0 -27
  207. package/dist/tools/dispute/get.js.map +0 -1
  208. package/dist/tools/exception/delete-comment.js +0 -40
  209. package/dist/tools/exception/delete-comment.js.map +0 -1
  210. package/dist/tools/exception/get.js +0 -34
  211. package/dist/tools/exception/get.js.map +0 -1
  212. package/dist/tools/exception/list-comments.js +0 -35
  213. package/dist/tools/exception/list-comments.js.map +0 -1
  214. package/dist/tools/fee-rule/delete.js +0 -27
  215. package/dist/tools/fee-rule/delete.js.map +0 -1
  216. package/dist/tools/fee-rule/get.js +0 -27
  217. package/dist/tools/fee-rule/get.js.map +0 -1
  218. package/dist/tools/fee-schedule/delete.js +0 -32
  219. package/dist/tools/fee-schedule/delete.js.map +0 -1
  220. package/dist/tools/fee-schedule/get.js +0 -30
  221. package/dist/tools/fee-schedule/get.js.map +0 -1
  222. package/dist/tools/field-map/delete.js +0 -37
  223. package/dist/tools/field-map/delete.js.map +0 -1
  224. package/dist/tools/field-map/get.js +0 -43
  225. package/dist/tools/field-map/get.js.map +0 -1
  226. package/dist/tools/ingestion/job-errors-list.js +0 -45
  227. package/dist/tools/ingestion/job-errors-list.js.map +0 -1
  228. package/dist/tools/ingestion/job-get.js +0 -42
  229. package/dist/tools/ingestion/job-get.js.map +0 -1
  230. package/dist/tools/ingestion/transaction-ignore.js +0 -51
  231. package/dist/tools/ingestion/transaction-ignore.js.map +0 -1
  232. package/dist/tools/match-rule/create.js +0 -67
  233. package/dist/tools/match-rule/create.js.map +0 -1
  234. package/dist/tools/match-rule/delete.js +0 -35
  235. package/dist/tools/match-rule/delete.js.map +0 -1
  236. package/dist/tools/match-rule/get.js +0 -32
  237. package/dist/tools/match-rule/get.js.map +0 -1
  238. package/dist/tools/match-rule/reorder.js +0 -45
  239. package/dist/tools/match-rule/reorder.js.map +0 -1
  240. package/dist/tools/matching/start.js +0 -81
  241. package/dist/tools/matching/start.js.map +0 -1
  242. package/dist/tools/report/count-exceptions.js +0 -46
  243. package/dist/tools/report/count-exceptions.js.map +0 -1
  244. package/dist/tools/report/count-matched.js +0 -47
  245. package/dist/tools/report/count-matched.js.map +0 -1
  246. package/dist/tools/report/count-transactions.js +0 -45
  247. package/dist/tools/report/count-transactions.js.map +0 -1
  248. package/dist/tools/report/count-unmatched.js +0 -45
  249. package/dist/tools/report/count-unmatched.js.map +0 -1
  250. package/dist/tools/report/export-exceptions.js +0 -48
  251. package/dist/tools/report/export-exceptions.js.map +0 -1
  252. package/dist/tools/report/export-matched.js +0 -49
  253. package/dist/tools/report/export-matched.js.map +0 -1
  254. package/dist/tools/report/export-summary.js +0 -49
  255. package/dist/tools/report/export-summary.js.map +0 -1
  256. package/dist/tools/report/export-unmatched.js +0 -49
  257. package/dist/tools/report/export-unmatched.js.map +0 -1
  258. package/dist/tools/report/export-variance.js +0 -48
  259. package/dist/tools/report/export-variance.js.map +0 -1
  260. package/dist/tools/report/matched.js +0 -48
  261. package/dist/tools/report/matched.js.map +0 -1
  262. package/dist/tools/report/summary.js +0 -43
  263. package/dist/tools/report/summary.js.map +0 -1
  264. package/dist/tools/report/unmatched.js +0 -48
  265. package/dist/tools/report/unmatched.js.map +0 -1
  266. package/dist/tools/report/variance.js +0 -48
  267. package/dist/tools/report/variance.js.map +0 -1
  268. package/dist/tools/source/archive.js +0 -46
  269. package/dist/tools/source/archive.js.map +0 -1
  270. package/dist/tools/source/get.js +0 -57
  271. package/dist/tools/source/get.js.map +0 -1
  272. package/dist/tools/source/restore.js +0 -39
  273. package/dist/tools/source/restore.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/matching/index.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,+EAA+E;AAC/E,8EAA8E;AAC9E,iFAAiF;AACjF,gFAAgF;AAChF,0EAA0E;AAC1E,+DAA+D;AAI/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAEtD,qEAAqE;AACrE,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,yBAAyB,CAAC,MAAM,CAAC,CAAA;IACjC,wBAAwB,CAAC,MAAM,CAAC,CAAA;IAChC,uBAAuB,CAAC,MAAM,CAAC,CAAA;IAC/B,0BAA0B,CAAC,MAAM,CAAC,CAAA;AACpC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/matching/index.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,+EAA+E;AAC/E,8EAA8E;AAC9E,iFAAiF;AACjF,gFAAgF;AAChF,0EAA0E;AAC1E,+DAA+D;AAC/D,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,gFAAgF;AAChF,kFAAkF;AAElF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,oBAAoB,EAAqB,MAAM,oBAAoB,CAAA;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;;;;GAKG;AACH,MAAM,SAAS,GA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AAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,oBAAoB,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;AAC9C,CAAC"}
@@ -8,7 +8,11 @@
8
8
  // `contextId` is a routing path param matcher scopes to the relayed token's
9
9
  // tenant; no tenant field is accepted.
10
10
  import { z } from 'zod';
11
- import { contextRunsPath, dispatchMatching } from './shared.js';
11
+ import { nextCursor, pageLimit } from '../input-fields.js';
12
+ import { queryHandler } from '../query-handler.js';
13
+ import { pickQuery } from '../request-fields.js';
14
+ import { dispatchToolRequest } from '../shared-dispatch.js';
15
+ import { contextRunsPath } from './shared.js';
12
16
  /** Sort orders matcher accepts for the run-history listing. */
13
17
  export const SORT_ORDERS = ['asc', 'desc'];
14
18
  /** Zod raw shape for `match_run_list` input — contextId (path) + pagination/sort. */
@@ -18,18 +22,8 @@ export const listMatchRunsInputShape = {
18
22
  .min(1)
19
23
  .describe('The reconciliation context id (UUID) whose run history to list. Routing ' +
20
24
  'param; matcher validates it belongs to your tenant.'),
21
- limit: z
22
- .number()
23
- .int()
24
- .min(1)
25
- .max(200)
26
- .optional()
27
- .describe('Maximum number of records to return (1–200, default 20).'),
28
- cursor: z
29
- .string()
30
- .optional()
31
- .describe('Opaque pagination cursor from a prior response. Re-call with the ' +
32
- 'returned nextCursor to page forward (there is no auto-pagination).'),
25
+ limit: pageLimit,
26
+ cursor: nextCursor,
33
27
  sort_order: z
34
28
  .enum(SORT_ORDERS)
35
29
  .optional()
@@ -38,17 +32,7 @@ export const listMatchRunsInputShape = {
38
32
  };
39
33
  /** Build the list query, omitting unset knobs so the request stays minimal. */
40
34
  function buildListQuery(args) {
41
- const query = {};
42
- if (args.limit !== undefined) {
43
- query.limit = args.limit;
44
- }
45
- if (args.cursor !== undefined) {
46
- query.cursor = args.cursor;
47
- }
48
- if (args.sort_order !== undefined) {
49
- query.sort_order = args.sort_order;
50
- }
51
- return Object.keys(query).length > 0 ? query : undefined;
35
+ return pickQuery(args, ['limit', 'cursor', 'sort_order']);
52
36
  }
53
37
  /**
54
38
  * Register `match_run_list`. Passes limit/cursor/sort_order through and returns
@@ -64,13 +48,6 @@ export function registerMatchRunListTool(server) {
64
48
  'contextId is a routing param scoped to your token; no tenant field is ' +
65
49
  'accepted.',
66
50
  inputSchema: listMatchRunsInputShape,
67
- }, async (args, extra) => {
68
- const query = buildListQuery(args);
69
- return dispatchMatching({
70
- method: 'GET',
71
- path: contextRunsPath(args.contextId),
72
- ...(query !== undefined ? { query } : {}),
73
- }, extra);
74
- });
51
+ }, queryHandler(buildListQuery, (args) => contextRunsPath(args.contextId), dispatchToolRequest));
75
52
  }
76
53
  //# sourceMappingURL=list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/tools/matching/list.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,kFAAkF;AAClF,4EAA4E;AAC5E,EAAE;AACF,4EAA4E;AAC5E,uCAAuC;AAEvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE/D,+DAA+D;AAC/D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,MAAM,CAAU,CAAA;AAEnD,qFAAqF;AACrF,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,0EAA0E;QACxE,qDAAqD,CACxD;IACH,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,0DAA0D,CAAC;IACvE,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ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H,MAAM,UAAU,wBAAwB,CAAC,MAAiB;IACxD,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB;QACE,WAAW,EACT,uEAAuE;YACvE,0EAA0E;YAC1E,mEAAmE;YACnE,sEAAsE;YACtE,wEAAwE;YACxE,WAAW;QACb,WAAW,EAAE,uBAAuB;KACrC,EACD,YAAY,CACV,cAAc,EACd,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,EACzC,mBAAmB,CACpB,CACF,CAAA;AACH,CAAC"}
@@ -3,12 +3,11 @@
3
3
  // Unlike the configuration resources (fee schedules, rules, contexts, sources),
4
4
  // the match-run family is NOT CRUD — it is a set of action/read verbs over the
5
5
  // matcher engine: start a run, list a context's runs, read one run's results,
6
- // and page its match groups. They share the same relay shape as every other
7
- // curated tool: fail-closed auth via requireMatcherClient, dispatch one
8
- // assembled MatcherRequest, then return matcher's JSON on success or the SHARED
9
- // toToolError on a MatcherApiError. This module factors that boilerplate once so
10
- // the four tools stay thin (just "build the request") and so curated + generic
11
- // surfaces map matcher errors through the identical path (toToolError).
6
+ // and page its match groups. This module holds the path helpers and the run
7
+ // stats projection, and nothing else, factored exactly once so the four tools
8
+ // address the same URLs. The relay itself lives in shared-dispatch.ts, so
9
+ // curated and generic surfaces map matcher errors through the identical path
10
+ // (toToolError).
12
11
  //
13
12
  // Two path families exist (mirroring the spec): runs are triggered/listed under
14
13
  // the context (`/v1/matching/contexts/{contextId}/...`), while a run's detail and
@@ -20,8 +19,6 @@
20
19
  // provided. No tenant identifier is ever read or injected (matcher derives
21
20
  // tenant from the relayed JWT); no match-run tool input carries one. `contextId`
22
21
  // is a routing param matcher validates ownership of, not a tenant field.
23
- import { requireMatcherClient, UnauthenticatedError, } from '../../auth/request-token.js';
24
- import { isMatcherApiError, toToolError } from '../tool-error.js';
25
22
  /** Trigger path for a context's matching run: POST starts a run. */
26
23
  export function contextRunPath(contextId) {
27
24
  return `/v1/matching/contexts/${encodeURIComponent(contextId)}/run`;
@@ -66,42 +63,4 @@ export function stripRuleStatKeys(stats) {
66
63
  }
67
64
  return cleaned;
68
65
  }
69
- /**
70
- * Run one assembled request through the relay: fail-closed auth, dispatch, and
71
- * RFC 9457 → tool-error mapping — identical to the generic invoke's dispatch so
72
- * both surfaces produce the same structured error shape.
73
- *
74
- * `clientFor` is injectable for tests; production callers pass nothing and get
75
- * the request-scoped, fail-closed `requireMatcherClient`.
76
- */
77
- export async function dispatchMatching(request, extra, clientFor = requireMatcherClient, transform) {
78
- let client;
79
- try {
80
- // Fail-closed on a missing / empty / non-Bearer credential.
81
- client = clientFor(extra);
82
- }
83
- catch (err) {
84
- if (err instanceof UnauthenticatedError) {
85
- return { isError: true, content: [{ type: 'text', text: err.message }] };
86
- }
87
- throw err;
88
- }
89
- try {
90
- const result = await client.request(request);
91
- // Success → matcher's run payload returned as-is (202 { runId, status },
92
- // run detail status/stats/ruleStats, or the group pagination envelope),
93
- // unless a caller-supplied transform post-processes the body first.
94
- const output = transform ? transform(result) : result;
95
- return { content: [{ type: 'text', text: JSON.stringify(output ?? null) }] };
96
- }
97
- catch (err) {
98
- // RFC 9457 problem → the SHARED structured tool error (status/title/detail/
99
- // code preserved). A non-matcher error is a bug, not a matcher failure, and
100
- // is re-thrown rather than masqueraded as one.
101
- if (isMatcherApiError(err)) {
102
- return toToolError(err);
103
- }
104
- throw err;
105
- }
106
- }
107
66
  //# sourceMappingURL=shared.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/tools/matching/shared.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,8EAA8E;AAC9E,4EAA4E;AAC5E,wEAAwE;AACxE,gFAAgF;AAChF,iFAAiF;AACjF,+EAA+E;AAC/E,wEAAwE;AACxE,EAAE;AACF,gFAAgF;AAChF,kFAAkF;AAClF,6EAA6E;AAC7E,kFAAkF;AAClF,EAAE;AACF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AI,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;YACrE,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;QACtB,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { withQuery } from './curated-tool.js';
2
+ /** Assemble one curated GET, leaving auth, errors and output with its family relay. */
3
+ export function queryHandler(buildQuery, path, dispatch) {
4
+ return async (args, extra) => {
5
+ const query = buildQuery(args);
6
+ return dispatch({ method: 'GET', path: path(args), ...withQuery(query) }, extra);
7
+ };
8
+ }
9
+ //# sourceMappingURL=query-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-handler.js","sourceRoot":"","sources":["../../src/tools/query-handler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAO7C,uFAAuF;AACvF,MAAM,UAAU,YAAY,CAC1B,UAAmD,EACnD,IAA4B,EAC5B,QAAuB;IAEvB,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;QAC9B,OAAO,QAAQ,CACb,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,EAAE,EACxD,KAAK,CACN,CAAA;IACH,CAAC,CAAA;AACH,CAAC"}
@@ -1,40 +1,270 @@
1
- // Curated report vertical: thirteen typed tools over the matcher synchronous
1
+ // Curated report vertical: thirteen typed reads over the matcher synchronous
2
2
  // reporting surface — the three paginated reads (matched/unmatched/variance),
3
3
  // the summary read, the four counts (exceptions/matched/unmatched/transactions),
4
4
  // and the five base64 exports (exceptions/matched/summary/unmatched/variance).
5
- // Every op is a context-nested HTTP GET under /v1/reports/contexts/{contextId}.
6
- // Each tool shares the fail-closed relay (shared.ts) and the RFC 9457 →
7
- // tool-error mapping (toToolError) with the generic surface, so curated and
5
+ // Every op is a context-nested HTTP GET under /v1/reports/contexts/{contextId}
6
+ // and differs from its siblings only in its name, its path suffix, which query
7
+ // builder it picks and which input fragment it spreads, so the thirteen are
8
+ // declared as thirteen rows and registered by the one shared loop. Each row
9
+ // dispatches through the fail-closed relay (shared-dispatch.ts) and the RFC 9457
10
+ // → tool-error mapping (toToolError) the generic surface uses, so curated and
8
11
  // generic map matcher errors identically. No tool carries a tenant field;
9
12
  // contextId is a routing path param matcher validates against the relayed
10
13
  // token's tenant.
11
- import { registerReportCountExceptionsTool } from './count-exceptions.js';
12
- import { registerReportCountMatchedTool } from './count-matched.js';
13
- import { registerReportCountTransactionsTool } from './count-transactions.js';
14
- import { registerReportCountUnmatchedTool } from './count-unmatched.js';
15
- import { registerReportExportExceptionsTool } from './export-exceptions.js';
16
- import { registerReportExportMatchedTool } from './export-matched.js';
17
- import { registerReportExportSummaryTool } from './export-summary.js';
18
- import { registerReportExportUnmatchedTool } from './export-unmatched.js';
19
- import { registerReportExportVarianceTool } from './export-variance.js';
20
- import { registerReportMatchedTool } from './matched.js';
21
- import { registerReportSummaryTool } from './summary.js';
22
- import { registerReportUnmatchedTool } from './unmatched.js';
23
- import { registerReportVarianceTool } from './variance.js';
14
+ import { registerCuratedTools, withQuery, } from '../curated-tool.js';
15
+ import { buildReportExportQuery, buildReportFilterQuery, buildReportPaginatedQuery, contextIdField, contextReportPath, reportFilterInputShape, reportFormatInputShape, reportPaginationInputShape, REPORT_EXPORT_FORMATS, REPORT_SORT_ORDERS, } from './shared.js';
16
+ /**
17
+ * Build a row's request: the context-scoped GET plus that group's query.
18
+ * `suffix` is a fixed literal owned by the table, never caller input.
19
+ */
20
+ function reportRequest(suffix, buildQuery) {
21
+ return (args) => {
22
+ const input = args;
23
+ return {
24
+ method: 'GET',
25
+ path: contextReportPath(input.contextId, suffix),
26
+ ...withQuery(buildQuery(input)),
27
+ };
28
+ };
29
+ }
30
+ /**
31
+ * The thirteen curated report reads. Every description string is the
32
+ * hand-tuned LLM guidance a client sees verbatim; the published-surface golden
33
+ * is what proves an edit here did not drop a character.
34
+ */
35
+ const REPORT_TOOLS = [
36
+ {
37
+ name: 'report_matched',
38
+ description: 'List matched transactions for a context within a date window ' +
39
+ '(cursor-paginated). Pass contextId (UUID path param — not a tenant ' +
40
+ 'field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ 90 ' +
41
+ 'days; if omitted, defaults to the last ~30 days and SILENTLY EXCLUDES ' +
42
+ 'older matches — pass an explicit range for a full picture), source_id, ' +
43
+ 'limit (1–200), sort_order (asc|desc), and/or cursor. The response ' +
44
+ 'carries { items, pagination: { next, prev } } — paginate by re-calling ' +
45
+ 'with cursor set to the returned pagination.next (empty when exhausted). ' +
46
+ 'No tenant field is accepted.',
47
+ inputShape: {
48
+ contextId: contextIdField('The reconciliation context id (UUID) whose matched transactions to ' +
49
+ 'report. Routing path param, not a tenant field.'),
50
+ ...reportFilterInputShape,
51
+ ...reportPaginationInputShape,
52
+ },
53
+ request: reportRequest('matched', buildReportPaginatedQuery),
54
+ },
55
+ {
56
+ name: 'report_unmatched',
57
+ description: 'List unmatched transactions for a context within a date window ' +
58
+ '(cursor-paginated). Pass contextId (UUID path param — not a tenant ' +
59
+ 'field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ 90 ' +
60
+ 'days; if omitted, defaults to the last ~30 days and SILENTLY EXCLUDES ' +
61
+ 'older unmatched items — pass an explicit range for a full picture), ' +
62
+ 'source_id, limit (1–200), sort_order (asc|desc), and/or cursor. The ' +
63
+ 'response carries { items, pagination: { next, prev } } — paginate by ' +
64
+ 're-calling with cursor set to the returned pagination.next (empty when ' +
65
+ 'exhausted). No tenant field is accepted.',
66
+ inputShape: {
67
+ contextId: contextIdField('The reconciliation context id (UUID) whose unmatched transactions to ' +
68
+ 'report. Routing path param, not a tenant field.'),
69
+ ...reportFilterInputShape,
70
+ ...reportPaginationInputShape,
71
+ },
72
+ request: reportRequest('unmatched', buildReportPaginatedQuery),
73
+ },
74
+ {
75
+ name: 'report_variance',
76
+ description: 'List variance report rows for a context within a date window ' +
77
+ '(cursor-paginated). Pass contextId (UUID path param — not a tenant ' +
78
+ 'field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ 90 ' +
79
+ 'days; if omitted, defaults to the last ~30 days and SILENTLY EXCLUDES ' +
80
+ 'older rows — pass an explicit range for a full picture), source_id, ' +
81
+ 'limit (1–200), sort_order (asc|desc), and/or cursor. The response ' +
82
+ 'carries { items, pagination: { next, prev } } — paginate by re-calling ' +
83
+ 'with cursor set to the returned pagination.next (empty when exhausted). ' +
84
+ 'No tenant field is accepted.',
85
+ inputShape: {
86
+ contextId: contextIdField('The reconciliation context id (UUID) whose variance rows to report. ' +
87
+ 'Routing path param, not a tenant field.'),
88
+ ...reportFilterInputShape,
89
+ ...reportPaginationInputShape,
90
+ },
91
+ request: reportRequest('variance', buildReportPaginatedQuery),
92
+ },
93
+ {
94
+ name: 'report_summary',
95
+ description: 'Get aggregated reconciliation summary statistics for a context within ' +
96
+ 'a date window. Pass contextId (UUID path param — not a tenant field), ' +
97
+ 'and optionally date_from/date_to (YYYY-MM-DD, window ≤ 90 days; if ' +
98
+ 'omitted, defaults to the last ~30 days and SILENTLY EXCLUDES older ' +
99
+ 'data — pass an explicit range for a full picture) and source_id. ' +
100
+ 'Returns the summary totals, or a structured RFC 9457 error. No tenant ' +
101
+ 'field is accepted.',
102
+ inputShape: {
103
+ contextId: contextIdField('The reconciliation context id (UUID) to summarize. Routing path param, ' +
104
+ 'not a tenant field.'),
105
+ ...reportFilterInputShape,
106
+ },
107
+ request: reportRequest('summary', buildReportFilterQuery),
108
+ },
109
+ {
110
+ name: 'report_count_exceptions',
111
+ description: 'Count exceptions for a context within a date window — use it to decide ' +
112
+ 'between a sync download (<1000 rows) and an async export. The date ' +
113
+ "filter applies to each exception's created_at. Pass contextId (UUID " +
114
+ 'path param — not a tenant field), and optionally date_from/date_to ' +
115
+ '(YYYY-MM-DD, window ≤ 90 days; if omitted, defaults to the last ~30 ' +
116
+ 'days and SILENTLY EXCLUDES older exceptions — pass an explicit range ' +
117
+ 'for a full picture) and source_id. No tenant field is accepted.',
118
+ inputShape: {
119
+ contextId: contextIdField('The reconciliation context id (UUID) whose exceptions to count. Routing ' +
120
+ 'path param, not a tenant field.'),
121
+ ...reportFilterInputShape,
122
+ },
123
+ request: reportRequest('exceptions/count', buildReportFilterQuery),
124
+ },
125
+ {
126
+ // The spec path is `matches/count` (plural), NOT `matched/count` — the
127
+ // one genuine asymmetry in this family. Carried from count-matched.ts.
128
+ name: 'report_count_matched',
129
+ description: 'Count matched records for a context within a date window — use it to ' +
130
+ 'decide between a sync download (<1000 rows) and an async export. The ' +
131
+ 'date filter applies to the transaction date. Pass contextId (UUID path ' +
132
+ 'param — not a tenant field), and optionally date_from/date_to ' +
133
+ '(YYYY-MM-DD, window ≤ 90 days; if omitted, defaults to the last ~30 ' +
134
+ 'days and SILENTLY EXCLUDES older matches — pass an explicit range for ' +
135
+ 'a full picture) and source_id. No tenant field is accepted.',
136
+ inputShape: {
137
+ contextId: contextIdField('The reconciliation context id (UUID) whose matched records to count. ' +
138
+ 'Routing path param, not a tenant field.'),
139
+ ...reportFilterInputShape,
140
+ },
141
+ request: reportRequest('matches/count', buildReportFilterQuery),
142
+ },
143
+ {
144
+ name: 'report_count_unmatched',
145
+ description: 'Count unmatched records for a context within a date window — use it to ' +
146
+ 'decide between a sync download (<1000 rows) and an async export. The ' +
147
+ 'date filter applies to the transaction date. Pass contextId (UUID path ' +
148
+ 'param — not a tenant field), and optionally date_from/date_to ' +
149
+ '(YYYY-MM-DD, window ≤ 90 days; if omitted, defaults to the last ~30 ' +
150
+ 'days and SILENTLY EXCLUDES older unmatched records — pass an explicit ' +
151
+ 'range for a full picture) and source_id. No tenant field is accepted.',
152
+ inputShape: {
153
+ contextId: contextIdField('The reconciliation context id (UUID) whose unmatched records to count. ' +
154
+ 'Routing path param, not a tenant field.'),
155
+ ...reportFilterInputShape,
156
+ },
157
+ request: reportRequest('unmatched/count', buildReportFilterQuery),
158
+ },
159
+ {
160
+ name: 'report_count_transactions',
161
+ description: 'Count all transactions for a context within a date window — use it to ' +
162
+ 'decide between a sync download (<1000 rows) and an async export. The ' +
163
+ 'date filter applies to the transaction date. Pass contextId (UUID path ' +
164
+ 'param — not a tenant field), and optionally date_from/date_to ' +
165
+ '(YYYY-MM-DD, window ≤ 90 days; if omitted, defaults to the last ~30 ' +
166
+ 'days and SILENTLY EXCLUDES older transactions — pass an explicit range ' +
167
+ 'for a full picture) and source_id. No tenant field is accepted.',
168
+ inputShape: {
169
+ contextId: contextIdField('The reconciliation context id (UUID) whose transactions to count. ' +
170
+ 'Routing path param, not a tenant field.'),
171
+ ...reportFilterInputShape,
172
+ },
173
+ request: reportRequest('transactions/count', buildReportFilterQuery),
174
+ },
175
+ {
176
+ name: 'report_export_exceptions',
177
+ description: 'Export the exceptions report for a context within a date window as a ' +
178
+ 'CSV or PDF file. Pass contextId (UUID path param — not a tenant field), ' +
179
+ 'and optionally date_from/date_to (YYYY-MM-DD, window ≤ 90 days; if ' +
180
+ 'omitted, defaults to the last ~30 days and SILENTLY EXCLUDES older ' +
181
+ 'exceptions — pass an explicit range for a full picture), source_id, ' +
182
+ 'and format (csv|pdf, default csv). The result is a base64-encoded ' +
183
+ 'string — decode it to recover the file bytes. No tenant field is ' +
184
+ 'accepted.',
185
+ inputShape: {
186
+ contextId: contextIdField('The reconciliation context id (UUID) whose exceptions to export. ' +
187
+ 'Routing path param, not a tenant field.'),
188
+ ...reportFilterInputShape,
189
+ ...reportFormatInputShape,
190
+ },
191
+ request: reportRequest('exceptions/export', buildReportExportQuery),
192
+ },
193
+ {
194
+ name: 'report_export_matched',
195
+ description: 'Export the matched-transactions report for a context within a date ' +
196
+ 'window as a CSV or PDF file. Pass contextId (UUID path param — not a ' +
197
+ 'tenant field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ ' +
198
+ '90 days; if omitted, defaults to the last ~30 days and SILENTLY ' +
199
+ 'EXCLUDES older matches — pass an explicit range for a full picture), ' +
200
+ 'source_id, and format (csv|pdf, default csv). The result is a ' +
201
+ 'base64-encoded string — decode it to recover the file bytes. No tenant ' +
202
+ 'field is accepted.',
203
+ inputShape: {
204
+ contextId: contextIdField('The reconciliation context id (UUID) whose matched transactions to ' +
205
+ 'export. Routing path param, not a tenant field.'),
206
+ ...reportFilterInputShape,
207
+ ...reportFormatInputShape,
208
+ },
209
+ request: reportRequest('matched/export', buildReportExportQuery),
210
+ },
211
+ {
212
+ name: 'report_export_summary',
213
+ description: 'Export the reconciliation summary report for a context within a date ' +
214
+ 'window as a CSV or PDF file. Pass contextId (UUID path param — not a ' +
215
+ 'tenant field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ ' +
216
+ '90 days; if omitted, defaults to the last ~30 days and SILENTLY ' +
217
+ 'EXCLUDES older data — pass an explicit range for a full picture), ' +
218
+ 'source_id, and format (csv|pdf, default csv). The result is a ' +
219
+ 'base64-encoded string — decode it to recover the file bytes. No tenant ' +
220
+ 'field is accepted.',
221
+ inputShape: {
222
+ contextId: contextIdField('The reconciliation context id (UUID) to export the summary for. Routing ' +
223
+ 'path param, not a tenant field.'),
224
+ ...reportFilterInputShape,
225
+ ...reportFormatInputShape,
226
+ },
227
+ request: reportRequest('summary/export', buildReportExportQuery),
228
+ },
229
+ {
230
+ name: 'report_export_unmatched',
231
+ description: 'Export the unmatched-transactions report for a context within a date ' +
232
+ 'window as a CSV or PDF file. Pass contextId (UUID path param — not a ' +
233
+ 'tenant field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ ' +
234
+ '90 days; if omitted, defaults to the last ~30 days and SILENTLY ' +
235
+ 'EXCLUDES older unmatched items — pass an explicit range for a full ' +
236
+ 'picture), source_id, and format (csv|pdf, default csv). The result is ' +
237
+ 'a base64-encoded string — decode it to recover the file bytes. No ' +
238
+ 'tenant field is accepted.',
239
+ inputShape: {
240
+ contextId: contextIdField('The reconciliation context id (UUID) whose unmatched transactions to ' +
241
+ 'export. Routing path param, not a tenant field.'),
242
+ ...reportFilterInputShape,
243
+ ...reportFormatInputShape,
244
+ },
245
+ request: reportRequest('unmatched/export', buildReportExportQuery),
246
+ },
247
+ {
248
+ name: 'report_export_variance',
249
+ description: 'Export the variance analysis report for a context within a date ' +
250
+ 'window as a CSV or PDF file. Pass contextId (UUID path param — not a ' +
251
+ 'tenant field), and optionally date_from/date_to (YYYY-MM-DD, window ≤ ' +
252
+ '90 days; if omitted, defaults to the last ~30 days and SILENTLY ' +
253
+ 'EXCLUDES older rows — pass an explicit range for a full picture), ' +
254
+ 'source_id, and format (csv|pdf, default csv). The result is a ' +
255
+ 'base64-encoded string — decode it to recover the file bytes. No tenant ' +
256
+ 'field is accepted.',
257
+ inputShape: {
258
+ contextId: contextIdField('The reconciliation context id (UUID) whose variance rows to export. ' +
259
+ 'Routing path param, not a tenant field.'),
260
+ ...reportFilterInputShape,
261
+ ...reportFormatInputShape,
262
+ },
263
+ request: reportRequest('variance/export', buildReportExportQuery),
264
+ },
265
+ ];
24
266
  /** Register all thirteen curated report tools on the given server. */
25
267
  export function registerReportTools(server) {
26
- registerReportMatchedTool(server);
27
- registerReportUnmatchedTool(server);
28
- registerReportVarianceTool(server);
29
- registerReportSummaryTool(server);
30
- registerReportCountExceptionsTool(server);
31
- registerReportCountMatchedTool(server);
32
- registerReportCountUnmatchedTool(server);
33
- registerReportCountTransactionsTool(server);
34
- registerReportExportExceptionsTool(server);
35
- registerReportExportMatchedTool(server);
36
- registerReportExportSummaryTool(server);
37
- registerReportExportUnmatchedTool(server);
38
- registerReportExportVarianceTool(server);
268
+ registerCuratedTools(server, REPORT_TOOLS);
39
269
  }
40
270
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/report/index.ts"],"names":[],"m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,CAAC,CAAA;IAC1C,+BAA+B,CAAC,MAAM,CAAC,CAAA;IACvC,+BAA+B,CAAC,MAAM,CAAC,CAAA;IACvC,iCAAiC,CAAC,MAAM,CAAC,CAAA;IACzC,gCAAgC,CAAC,MAAM,CAAC,CAAA;AAC1C,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/report/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,8EAA8E;AAC9E,iFAAiF;AACjF,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,4EAA4E;AAC5E,4EAA4E;AAC5E,iFAAiF;AACjF,8EAA8E;AAC9E,0EAA0E;AAC1E,0EAA0E;AAC1E,kBAAkB;AAKlB,OAAO,EACL,oBAAoB,EACpB,SAAS,GAEV,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,aAAa,CAAA;AAkBpB;;;GAGG;AACH,SAAS,aAAa,CACpB,MAAc,EACd,UAAyD;IAEzD,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,KAAK,GAAG,IAAkB,CAAA;QAChC,OAAO;YACL,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC;YAChD,GAAG,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;SAChC,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,YAAY,GAA2B;IAC3C;QACE,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,+DAA+D;YAC/D,qEAAqE;YACrE,oEAAoE;YACpE,wEAAwE;YACxE,yEAAyE;YACzE,oEAAoE;YACpE,yEAAyE;YACzE,0EAA0E;YAC1E,8B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