@cesteral/dbm-mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/LICENSE.md +201 -0
  2. package/README.md +197 -0
  3. package/dist/config/index.d.ts +112 -0
  4. package/dist/config/index.d.ts.map +1 -0
  5. package/dist/config/index.js +55 -0
  6. package/dist/config/index.js.map +1 -0
  7. package/dist/generated/compatibility-rules.d.ts +26 -0
  8. package/dist/generated/compatibility-rules.d.ts.map +1 -0
  9. package/dist/generated/compatibility-rules.js +142 -0
  10. package/dist/generated/compatibility-rules.js.map +1 -0
  11. package/dist/generated/filters.d.ts +19 -0
  12. package/dist/generated/filters.d.ts.map +1 -0
  13. package/dist/generated/filters.js +2541 -0
  14. package/dist/generated/filters.js.map +1 -0
  15. package/dist/generated/index.d.ts +5 -0
  16. package/dist/generated/index.d.ts.map +1 -0
  17. package/dist/generated/index.js +5 -0
  18. package/dist/generated/index.js.map +1 -0
  19. package/dist/generated/metrics.d.ts +28 -0
  20. package/dist/generated/metrics.d.ts.map +1 -0
  21. package/dist/generated/metrics.js +961 -0
  22. package/dist/generated/metrics.js.map +1 -0
  23. package/dist/generated/report-types.d.ts +14 -0
  24. package/dist/generated/report-types.d.ts.map +1 -0
  25. package/dist/generated/report-types.js +94 -0
  26. package/dist/generated/report-types.js.map +1 -0
  27. package/dist/index.d.ts +3 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +51 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/mcp-server/prompts/definitions/cross-platform-campaign-setup.prompt.d.ts +4 -0
  32. package/dist/mcp-server/prompts/definitions/cross-platform-campaign-setup.prompt.d.ts.map +1 -0
  33. package/dist/mcp-server/prompts/definitions/cross-platform-campaign-setup.prompt.js +299 -0
  34. package/dist/mcp-server/prompts/definitions/cross-platform-campaign-setup.prompt.js.map +1 -0
  35. package/dist/mcp-server/prompts/definitions/cross-platform-performance.prompt.d.ts +4 -0
  36. package/dist/mcp-server/prompts/definitions/cross-platform-performance.prompt.d.ts.map +1 -0
  37. package/dist/mcp-server/prompts/definitions/cross-platform-performance.prompt.js +170 -0
  38. package/dist/mcp-server/prompts/definitions/cross-platform-performance.prompt.js.map +1 -0
  39. package/dist/mcp-server/prompts/definitions/custom-query-workflow.prompt.d.ts +4 -0
  40. package/dist/mcp-server/prompts/definitions/custom-query-workflow.prompt.d.ts.map +1 -0
  41. package/dist/mcp-server/prompts/definitions/custom-query-workflow.prompt.js +164 -0
  42. package/dist/mcp-server/prompts/definitions/custom-query-workflow.prompt.js.map +1 -0
  43. package/dist/mcp-server/prompts/definitions/pacing-performance-analysis.prompt.d.ts +4 -0
  44. package/dist/mcp-server/prompts/definitions/pacing-performance-analysis.prompt.d.ts.map +1 -0
  45. package/dist/mcp-server/prompts/definitions/pacing-performance-analysis.prompt.js +204 -0
  46. package/dist/mcp-server/prompts/definitions/pacing-performance-analysis.prompt.js.map +1 -0
  47. package/dist/mcp-server/prompts/definitions/tool-schema-exploration.prompt.d.ts +4 -0
  48. package/dist/mcp-server/prompts/definitions/tool-schema-exploration.prompt.d.ts.map +1 -0
  49. package/dist/mcp-server/prompts/definitions/tool-schema-exploration.prompt.js +66 -0
  50. package/dist/mcp-server/prompts/definitions/tool-schema-exploration.prompt.js.map +1 -0
  51. package/dist/mcp-server/prompts/definitions/troubleshoot-report.prompt.d.ts +4 -0
  52. package/dist/mcp-server/prompts/definitions/troubleshoot-report.prompt.d.ts.map +1 -0
  53. package/dist/mcp-server/prompts/definitions/troubleshoot-report.prompt.js +179 -0
  54. package/dist/mcp-server/prompts/definitions/troubleshoot-report.prompt.js.map +1 -0
  55. package/dist/mcp-server/prompts/definitions/types.d.ts +15 -0
  56. package/dist/mcp-server/prompts/definitions/types.d.ts.map +1 -0
  57. package/dist/mcp-server/prompts/definitions/types.js +2 -0
  58. package/dist/mcp-server/prompts/definitions/types.js.map +1 -0
  59. package/dist/mcp-server/prompts/index.d.ts +6 -0
  60. package/dist/mcp-server/prompts/index.d.ts.map +1 -0
  61. package/dist/mcp-server/prompts/index.js +57 -0
  62. package/dist/mcp-server/prompts/index.js.map +1 -0
  63. package/dist/mcp-server/resources/definitions/compatibility-rules.resource.d.ts +3 -0
  64. package/dist/mcp-server/resources/definitions/compatibility-rules.resource.d.ts.map +1 -0
  65. package/dist/mcp-server/resources/definitions/compatibility-rules.resource.js +130 -0
  66. package/dist/mcp-server/resources/definitions/compatibility-rules.resource.js.map +1 -0
  67. package/dist/mcp-server/resources/definitions/filter-types.resource.d.ts +4 -0
  68. package/dist/mcp-server/resources/definitions/filter-types.resource.d.ts.map +1 -0
  69. package/dist/mcp-server/resources/definitions/filter-types.resource.js +198 -0
  70. package/dist/mcp-server/resources/definitions/filter-types.resource.js.map +1 -0
  71. package/dist/mcp-server/resources/definitions/index.d.ts +8 -0
  72. package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -0
  73. package/dist/mcp-server/resources/definitions/index.js +49 -0
  74. package/dist/mcp-server/resources/definitions/index.js.map +1 -0
  75. package/dist/mcp-server/resources/definitions/metric-types.resource.d.ts +4 -0
  76. package/dist/mcp-server/resources/definitions/metric-types.resource.d.ts.map +1 -0
  77. package/dist/mcp-server/resources/definitions/metric-types.resource.js +221 -0
  78. package/dist/mcp-server/resources/definitions/metric-types.resource.js.map +1 -0
  79. package/dist/mcp-server/resources/definitions/query-examples.resource.d.ts +169 -0
  80. package/dist/mcp-server/resources/definitions/query-examples.resource.d.ts.map +1 -0
  81. package/dist/mcp-server/resources/definitions/query-examples.resource.js +261 -0
  82. package/dist/mcp-server/resources/definitions/query-examples.resource.js.map +1 -0
  83. package/dist/mcp-server/resources/definitions/report-types.resource.d.ts +3 -0
  84. package/dist/mcp-server/resources/definitions/report-types.resource.d.ts.map +1 -0
  85. package/dist/mcp-server/resources/definitions/report-types.resource.js +198 -0
  86. package/dist/mcp-server/resources/definitions/report-types.resource.js.map +1 -0
  87. package/dist/mcp-server/resources/index.d.ts +3 -0
  88. package/dist/mcp-server/resources/index.d.ts.map +1 -0
  89. package/dist/mcp-server/resources/index.js +2 -0
  90. package/dist/mcp-server/resources/index.js.map +1 -0
  91. package/dist/mcp-server/resources/types.d.ts +16 -0
  92. package/dist/mcp-server/resources/types.d.ts.map +1 -0
  93. package/dist/mcp-server/resources/types.js +2 -0
  94. package/dist/mcp-server/resources/types.js.map +1 -0
  95. package/dist/mcp-server/server.d.ts +5 -0
  96. package/dist/mcp-server/server.d.ts.map +1 -0
  97. package/dist/mcp-server/server.js +115 -0
  98. package/dist/mcp-server/server.js.map +1 -0
  99. package/dist/mcp-server/tools/definitions/get-campaign-delivery.tool.d.ts +89 -0
  100. package/dist/mcp-server/tools/definitions/get-campaign-delivery.tool.d.ts.map +1 -0
  101. package/dist/mcp-server/tools/definitions/get-campaign-delivery.tool.js +128 -0
  102. package/dist/mcp-server/tools/definitions/get-campaign-delivery.tool.js.map +1 -0
  103. package/dist/mcp-server/tools/definitions/get-historical-metrics.tool.d.ts +155 -0
  104. package/dist/mcp-server/tools/definitions/get-historical-metrics.tool.d.ts.map +1 -0
  105. package/dist/mcp-server/tools/definitions/get-historical-metrics.tool.js +160 -0
  106. package/dist/mcp-server/tools/definitions/get-historical-metrics.tool.js.map +1 -0
  107. package/dist/mcp-server/tools/definitions/get-pacing-status.tool.d.ts +138 -0
  108. package/dist/mcp-server/tools/definitions/get-pacing-status.tool.d.ts.map +1 -0
  109. package/dist/mcp-server/tools/definitions/get-pacing-status.tool.js +171 -0
  110. package/dist/mcp-server/tools/definitions/get-pacing-status.tool.js.map +1 -0
  111. package/dist/mcp-server/tools/definitions/get-performance-metrics.tool.d.ts +122 -0
  112. package/dist/mcp-server/tools/definitions/get-performance-metrics.tool.d.ts.map +1 -0
  113. package/dist/mcp-server/tools/definitions/get-performance-metrics.tool.js +143 -0
  114. package/dist/mcp-server/tools/definitions/get-performance-metrics.tool.js.map +1 -0
  115. package/dist/mcp-server/tools/definitions/index.d.ts +8 -0
  116. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
  117. package/dist/mcp-server/tools/definitions/index.js +23 -0
  118. package/dist/mcp-server/tools/definitions/index.js.map +1 -0
  119. package/dist/mcp-server/tools/definitions/run-custom-query-async.tool.d.ts +4 -0
  120. package/dist/mcp-server/tools/definitions/run-custom-query-async.tool.d.ts.map +1 -0
  121. package/dist/mcp-server/tools/definitions/run-custom-query-async.tool.js +46 -0
  122. package/dist/mcp-server/tools/definitions/run-custom-query-async.tool.js.map +1 -0
  123. package/dist/mcp-server/tools/definitions/run-custom-query.tool.d.ts +186 -0
  124. package/dist/mcp-server/tools/definitions/run-custom-query.tool.d.ts.map +1 -0
  125. package/dist/mcp-server/tools/definitions/run-custom-query.tool.js +202 -0
  126. package/dist/mcp-server/tools/definitions/run-custom-query.tool.js.map +1 -0
  127. package/dist/mcp-server/tools/index.d.ts +2 -0
  128. package/dist/mcp-server/tools/index.d.ts.map +1 -0
  129. package/dist/mcp-server/tools/index.js +2 -0
  130. package/dist/mcp-server/tools/index.js.map +1 -0
  131. package/dist/mcp-server/tools/utils/query-validation.d.ts +44 -0
  132. package/dist/mcp-server/tools/utils/query-validation.d.ts.map +1 -0
  133. package/dist/mcp-server/tools/utils/query-validation.js +107 -0
  134. package/dist/mcp-server/tools/utils/query-validation.js.map +1 -0
  135. package/dist/mcp-server/tools/utils/resolve-session.d.ts +4 -0
  136. package/dist/mcp-server/tools/utils/resolve-session.d.ts.map +1 -0
  137. package/dist/mcp-server/tools/utils/resolve-session.js +6 -0
  138. package/dist/mcp-server/tools/utils/resolve-session.js.map +1 -0
  139. package/dist/mcp-server/transports/streamable-http-transport.d.ts +55 -0
  140. package/dist/mcp-server/transports/streamable-http-transport.d.ts.map +1 -0
  141. package/dist/mcp-server/transports/streamable-http-transport.js +55 -0
  142. package/dist/mcp-server/transports/streamable-http-transport.js.map +1 -0
  143. package/dist/services/bid-manager/BidManagerService.d.ts +68 -0
  144. package/dist/services/bid-manager/BidManagerService.d.ts.map +1 -0
  145. package/dist/services/bid-manager/BidManagerService.js +464 -0
  146. package/dist/services/bid-manager/BidManagerService.js.map +1 -0
  147. package/dist/services/bid-manager/auth-bridge.d.ts +6 -0
  148. package/dist/services/bid-manager/auth-bridge.d.ts.map +1 -0
  149. package/dist/services/bid-manager/auth-bridge.js +13 -0
  150. package/dist/services/bid-manager/auth-bridge.js.map +1 -0
  151. package/dist/services/bid-manager/client.d.ts +4 -0
  152. package/dist/services/bid-manager/client.d.ts.map +1 -0
  153. package/dist/services/bid-manager/client.js +2 -0
  154. package/dist/services/bid-manager/client.js.map +1 -0
  155. package/dist/services/bid-manager/index.d.ts +6 -0
  156. package/dist/services/bid-manager/index.d.ts.map +1 -0
  157. package/dist/services/bid-manager/index.js +4 -0
  158. package/dist/services/bid-manager/index.js.map +1 -0
  159. package/dist/services/bid-manager/report-parser.d.ts +26 -0
  160. package/dist/services/bid-manager/report-parser.d.ts.map +1 -0
  161. package/dist/services/bid-manager/report-parser.js +141 -0
  162. package/dist/services/bid-manager/report-parser.js.map +1 -0
  163. package/dist/services/bid-manager/types.d.ts +668 -0
  164. package/dist/services/bid-manager/types.d.ts.map +1 -0
  165. package/dist/services/bid-manager/types.js +256 -0
  166. package/dist/services/bid-manager/types.js.map +1 -0
  167. package/dist/services/session-services.d.ts +12 -0
  168. package/dist/services/session-services.d.ts.map +1 -0
  169. package/dist/services/session-services.js +18 -0
  170. package/dist/services/session-services.js.map +1 -0
  171. package/dist/types-global/bid-manager.d.ts +76 -0
  172. package/dist/types-global/bid-manager.d.ts.map +1 -0
  173. package/dist/types-global/bid-manager.js +2 -0
  174. package/dist/types-global/bid-manager.js.map +1 -0
  175. package/dist/types-global/index.d.ts +2 -0
  176. package/dist/types-global/index.d.ts.map +1 -0
  177. package/dist/types-global/index.js +2 -0
  178. package/dist/types-global/index.js.map +1 -0
  179. package/dist/types-global/mcp.d.ts +2 -0
  180. package/dist/types-global/mcp.d.ts.map +1 -0
  181. package/dist/types-global/mcp.js +2 -0
  182. package/dist/types-global/mcp.js.map +1 -0
  183. package/dist/utils/date.d.ts +2 -0
  184. package/dist/utils/date.d.ts.map +1 -0
  185. package/dist/utils/date.js +7 -0
  186. package/dist/utils/date.js.map +1 -0
  187. package/dist/utils/errors/bid-manager-errors.d.ts +57 -0
  188. package/dist/utils/errors/bid-manager-errors.d.ts.map +1 -0
  189. package/dist/utils/errors/bid-manager-errors.js +119 -0
  190. package/dist/utils/errors/bid-manager-errors.js.map +1 -0
  191. package/dist/utils/errors/index.d.ts +3 -0
  192. package/dist/utils/errors/index.d.ts.map +1 -0
  193. package/dist/utils/errors/index.js +3 -0
  194. package/dist/utils/errors/index.js.map +1 -0
  195. package/dist/utils/index.d.ts +4 -0
  196. package/dist/utils/index.d.ts.map +1 -0
  197. package/dist/utils/index.js +4 -0
  198. package/dist/utils/index.js.map +1 -0
  199. package/dist/utils/math.d.ts +9 -0
  200. package/dist/utils/math.d.ts.map +1 -0
  201. package/dist/utils/math.js +38 -0
  202. package/dist/utils/math.js.map +1 -0
  203. package/dist/utils/metrics.d.ts +21 -0
  204. package/dist/utils/metrics.d.ts.map +1 -0
  205. package/dist/utils/metrics.js +92 -0
  206. package/dist/utils/metrics.js.map +1 -0
  207. package/dist/utils/platform.d.ts +3 -0
  208. package/dist/utils/platform.d.ts.map +1 -0
  209. package/dist/utils/platform.js +5 -0
  210. package/dist/utils/platform.js.map +1 -0
  211. package/dist/utils/security/index.d.ts +2 -0
  212. package/dist/utils/security/index.d.ts.map +1 -0
  213. package/dist/utils/security/index.js +2 -0
  214. package/dist/utils/security/index.js.map +1 -0
  215. package/dist/utils/security/rate-limiter.d.ts +3 -0
  216. package/dist/utils/security/rate-limiter.d.ts.map +1 -0
  217. package/dist/utils/security/rate-limiter.js +5 -0
  218. package/dist/utils/security/rate-limiter.js.map +1 -0
  219. package/dist/utils/telemetry/index.d.ts +2 -0
  220. package/dist/utils/telemetry/index.d.ts.map +1 -0
  221. package/dist/utils/telemetry/index.js +2 -0
  222. package/dist/utils/telemetry/index.js.map +1 -0
  223. package/dist/utils/telemetry/tracing.d.ts +3 -0
  224. package/dist/utils/telemetry/tracing.d.ts.map +1 -0
  225. package/dist/utils/telemetry/tracing.js +4 -0
  226. package/dist/utils/telemetry/tracing.js.map +1 -0
  227. package/package.json +60 -0
package/LICENSE.md ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,197 @@
1
+ # @cesteral/dbm-mcp
2
+
3
+ DBM MCP Server - Generic cross-platform reporting and metrics server.
4
+
5
+ ## Purpose
6
+
7
+ Read-only reporting server that provides delivery metrics, performance calculations, time-series data, and pacing status. Platform-agnostic design supports DV360, Google Ads, Meta, The Trade Desk, and Amazon DSP.
8
+
9
+ ## Features
10
+
11
+ - **Per-session Google auth** via `GoogleAuthAdapter` with `X-DV360-*` request headers
12
+ - **Streamable HTTP + stdio transports** via Hono + `@hono/mcp`
13
+ - **OpenTelemetry** instrumentation for traces and metrics
14
+ - **Rate limiting** via shared `RateLimiter` class
15
+ - **Structured logging** via Pino
16
+ - **Read-only reporting** -- no write operations, no entity mutation
17
+
18
+ ## MCP Tools
19
+
20
+ ### 1. `dbm_get_campaign_delivery`
21
+
22
+ Fetch delivery metrics (impressions, clicks, spend, conversions) for a campaign within a date range.
23
+
24
+ **Parameters:**
25
+
26
+ - `campaignId` (string): Campaign ID
27
+ - `advertiserId` (string): DV360 Advertiser ID
28
+ - `startDate` (string): Start date (YYYY-MM-DD)
29
+ - `endDate` (string): End date (YYYY-MM-DD)
30
+
31
+ ### 2. `dbm_get_performance_metrics`
32
+
33
+ Calculate performance KPIs (CPM, CTR, CPA, ROAS) from delivery data.
34
+
35
+ **Parameters:**
36
+
37
+ - `campaignId` (string): Campaign ID
38
+ - `startDate` (string): Start date (YYYY-MM-DD)
39
+ - `endDate` (string): End date (YYYY-MM-DD)
40
+
41
+ ### 3. `dbm_get_historical_metrics`
42
+
43
+ Fetch time-series historical metrics for trend analysis.
44
+
45
+ **Parameters:**
46
+
47
+ - `campaignId` (string): Campaign ID
48
+ - `startDate` (string): Start date (YYYY-MM-DD)
49
+ - `endDate` (string): End date (YYYY-MM-DD)
50
+ - `granularity` (string, optional): "daily" or "hourly" (default: "daily")
51
+
52
+ ### 4. `dbm_get_pacing_status`
53
+
54
+ Get real-time pacing status for a campaign (actual vs expected delivery).
55
+
56
+ **Parameters:**
57
+
58
+ - `campaignId` (string): Campaign ID
59
+
60
+ ### 5. `dbm_run_custom_query`
61
+
62
+ Compose and execute a custom Bid Manager report with specified metrics, dimensions, and filters.
63
+
64
+ **Parameters:**
65
+
66
+ - `reportType` (string): Report type
67
+ - `timeRange` (object): Time range for the report
68
+ - `metrics` (string[]): Metrics to include
69
+ - `dimensions` (string[]): Dimensions for grouping
70
+ - `filters` (object[], optional): Filter conditions
71
+ - `advertiserId` (string): DV360 Advertiser ID
72
+ - `mode`, `columns`, `offset`, `maxRows` (optional): Bounded report-view params — `mode` is `"summary"` (default — headers + counts + 10-row preview) or `"rows"` (paginated rows page); `columns` projects to selected columns; `offset` paginates; `maxRows` caps page size (default 10/50; hard cap 200).
73
+
74
+ ### 6. `dbm_run_custom_query_async`
75
+
76
+ Submit a custom Bid Manager report without waiting for completion (non-blocking). Uses MCP Tasks to return a task handle immediately; clients poll via `tasks/getTask` and retrieve results via `tasks/getTaskResult`.
77
+
78
+ **Parameters:** Same as `dbm_run_custom_query` (including the bounded report-view params).
79
+
80
+ ## Authentication Modes
81
+
82
+ | Mode | Header | Description |
83
+ | -------------------------- | ----------------------------- | ----------------------------------------------- |
84
+ | `google-headers` (default) | `X-DV360-*` | Google OAuth2 credentials via request headers |
85
+ | `jwt` | `Authorization: Bearer <JWT>` | JWT token authentication for hosted deployments |
86
+ | `none` | — | No authentication (development only) |
87
+
88
+ Set via `MCP_AUTH_MODE` environment variable.
89
+
90
+ ## Context Efficiency Notes
91
+
92
+ - Tools with `outputSchema` provide full typed payloads in `structuredContent`; text output is intentionally summary-focused.
93
+ - Use scoped resources when possible to reduce context size:
94
+ - `metric-types://category/{slug}`
95
+ - `filter-types://category/{slug}`
96
+ - Full catalogs remain available at `metric-types://all` and `filter-types://all`.
97
+
98
+ ## Architecture
99
+
100
+ ### Key Components
101
+
102
+ - **`BidManagerService`** - Core service for Bid Manager API v2: query creation, execution, polling, and CSV report parsing
103
+ - **`BidManagerClient`** - googleapis-based client for the Bid Manager API v2
104
+ - **`auth-bridge.ts`** - Adapts shared `GoogleAuthAdapter` to the googleapis `OAuth2Client` shape
105
+ - **`SessionServiceStore`** - Per-session service instances keyed by session ID
106
+ - **`report-parser.ts`** - CSV-to-JSON parser for Bid Manager report results
107
+
108
+ ### Transport
109
+
110
+ - **Streamable HTTP**: MCP protocol via Streamable HTTP transport at `/mcp`
111
+ - **Health check**: `/health` endpoint
112
+
113
+ ### Key Gotchas
114
+
115
+ - Reports are async: create query → run query → poll status → fetch results
116
+ - Report results are CSV-formatted; the server parses them into structured JSON
117
+ - `advertiserId` is required for all reporting tools
118
+ - Rate limits apply per Google Cloud project, not per advertiser
119
+ - Read-only server — no entity mutation; use `dv360-mcp` for write operations
120
+
121
+ ### Data Sources
122
+
123
+ - Bid Manager API v2: DV360 reporting queries
124
+
125
+ ### Current Status
126
+
127
+ **Phase: Production-Ready**
128
+
129
+ The reporting and query tools are fully implemented using Bid Manager API v2 for
130
+ DV360 reporting. Entity retrieval is handled by the separate
131
+ `@cesteral/dv360-mcp` server.
132
+
133
+ ## Development
134
+
135
+ ```bash
136
+ # Install dependencies
137
+ pnpm install
138
+
139
+ # Run in development mode
140
+ pnpm run dev:http
141
+
142
+ # Build
143
+ pnpm run build
144
+
145
+ # Start production server
146
+ pnpm run start
147
+
148
+ # Type check
149
+ pnpm run typecheck
150
+
151
+ # Lint
152
+ pnpm run lint
153
+ ```
154
+
155
+ ## Environment Variables
156
+
157
+ See root `.env.example` for all required variables:
158
+
159
+ - `DBM_MCP_PORT`: Server port (default: 3001)
160
+ - `DBM_MCP_HOST`: Server host (default: 0.0.0.0)
161
+ - `GCP_PROJECT_ID`: Google Cloud project ID
162
+ - `BIGQUERY_DATASET_ID`: BigQuery dataset name
163
+
164
+ ## Testing with MCP Inspector
165
+
166
+ ```bash
167
+ # Start the server
168
+ pnpm run dev:http
169
+
170
+ # In another terminal, use MCP Inspector
171
+ npx @modelcontextprotocol/inspector http://localhost:3001/mcp
172
+ ```
173
+
174
+ ## API Endpoints
175
+
176
+ - `GET /health` - Health check
177
+ - `POST /mcp` - MCP protocol via Streamable HTTP transport
178
+
179
+ ## Contributing
180
+
181
+ See root [CLAUDE.md](../../CLAUDE.md) for development guidelines, build system details, and monorepo conventions. See the [root README](../../README.md) for full architecture context.
182
+
183
+ ---
184
+
185
+ ## Get Started
186
+
187
+ **Self-host**: Follow the [deployment guide](../../docs/guides/deployment-instructions.md) to run this server on your own infrastructure.
188
+
189
+ **Cesteral Intelligence**: [Request access](https://cesteral.com/integrations/bid-manager?utm_source=github&utm_medium=package-readme&utm_campaign=dbm-mcp) -- governed execution with credential brokering, approvals, audit, and multi-tenant access.
190
+
191
+ **Book a workflow demo**: [See it in action](mailto:sales@cesteral.com?subject=Workflow%20demo%20-%20Bid%20Manager%20MCP) with your own ad accounts.
192
+
193
+ **Compare options**: [OSS connectors vs Cesteral Intelligence](https://cesteral.com/compare?utm_source=github&utm_medium=package-readme&utm_campaign=dbm-mcp)
194
+
195
+ ## License
196
+
197
+ Apache License 2.0 — see [LICENSE](../../LICENSE.md) for details. This package is part of Cesteral's open-source connector layer; managed hosting and higher-level governance features live outside this repository.
@@ -0,0 +1,112 @@
1
+ import { z } from "zod";
2
+ declare const ConfigSchema: z.ZodObject<{
3
+ host: z.ZodDefault<z.ZodString>;
4
+ nodeEnv: z.ZodDefault<z.ZodEnum<["development", "production", "test"]>>;
5
+ mcpStatefulSessionTimeoutMs: z.ZodDefault<z.ZodNumber>;
6
+ mcpAuthSecretKey: z.ZodOptional<z.ZodString>;
7
+ mcpAllowedOrigins: z.ZodOptional<z.ZodString>;
8
+ logLevel: z.ZodDefault<z.ZodEnum<["debug", "info", "notice", "warning", "error"]>>;
9
+ mcpLogLevel: z.ZodDefault<z.ZodEnum<["debug", "info", "notice", "warning", "error"]>>;
10
+ otelEnabled: z.ZodDefault<z.ZodBoolean>;
11
+ otelExporterOtlpTracesEndpoint: z.ZodOptional<z.ZodString>;
12
+ otelExporterOtlpMetricsEndpoint: z.ZodOptional<z.ZodString>;
13
+ gcsBucketName: z.ZodOptional<z.ZodString>;
14
+ } & {
15
+ serviceName: z.ZodDefault<z.ZodString>;
16
+ port: z.ZodDefault<z.ZodNumber>;
17
+ otelServiceName: z.ZodDefault<z.ZodString>;
18
+ mcpAuthMode: z.ZodDefault<z.ZodEnum<["google-headers", "jwt", "none"]>>;
19
+ gcpProjectId: z.ZodOptional<z.ZodString>;
20
+ serviceAccountJson: z.ZodOptional<z.ZodString>;
21
+ serviceAccountFile: z.ZodOptional<z.ZodString>;
22
+ rateLimitPerMinute: z.ZodDefault<z.ZodNumber>;
23
+ reportCacheTtlMs: z.ZodDefault<z.ZodNumber>;
24
+ reportPollMaxRetries: z.ZodDefault<z.ZodNumber>;
25
+ reportPollInitialDelayMs: z.ZodDefault<z.ZodNumber>;
26
+ reportPollMaxDelayMs: z.ZodDefault<z.ZodNumber>;
27
+ reportQueryRetries: z.ZodDefault<z.ZodNumber>;
28
+ reportRetryCooldownMs: z.ZodDefault<z.ZodNumber>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ serviceName: string;
31
+ port: number;
32
+ otelServiceName: string;
33
+ mcpAuthMode: "google-headers" | "jwt" | "none";
34
+ rateLimitPerMinute: number;
35
+ reportCacheTtlMs: number;
36
+ reportPollMaxRetries: number;
37
+ reportPollInitialDelayMs: number;
38
+ reportPollMaxDelayMs: number;
39
+ reportQueryRetries: number;
40
+ reportRetryCooldownMs: number;
41
+ host: string;
42
+ nodeEnv: "development" | "production" | "test";
43
+ mcpStatefulSessionTimeoutMs: number;
44
+ logLevel: "debug" | "info" | "notice" | "warning" | "error";
45
+ mcpLogLevel: "debug" | "info" | "notice" | "warning" | "error";
46
+ otelEnabled: boolean;
47
+ gcpProjectId?: string | undefined;
48
+ serviceAccountJson?: string | undefined;
49
+ serviceAccountFile?: string | undefined;
50
+ mcpAuthSecretKey?: string | undefined;
51
+ mcpAllowedOrigins?: string | undefined;
52
+ otelExporterOtlpTracesEndpoint?: string | undefined;
53
+ otelExporterOtlpMetricsEndpoint?: string | undefined;
54
+ gcsBucketName?: string | undefined;
55
+ }, {
56
+ serviceName?: string | undefined;
57
+ port?: number | undefined;
58
+ otelServiceName?: string | undefined;
59
+ mcpAuthMode?: "google-headers" | "jwt" | "none" | undefined;
60
+ gcpProjectId?: string | undefined;
61
+ serviceAccountJson?: string | undefined;
62
+ serviceAccountFile?: string | undefined;
63
+ rateLimitPerMinute?: number | undefined;
64
+ reportCacheTtlMs?: number | undefined;
65
+ reportPollMaxRetries?: number | undefined;
66
+ reportPollInitialDelayMs?: number | undefined;
67
+ reportPollMaxDelayMs?: number | undefined;
68
+ reportQueryRetries?: number | undefined;
69
+ reportRetryCooldownMs?: number | undefined;
70
+ host?: string | undefined;
71
+ nodeEnv?: "development" | "production" | "test" | undefined;
72
+ mcpStatefulSessionTimeoutMs?: number | undefined;
73
+ mcpAuthSecretKey?: string | undefined;
74
+ mcpAllowedOrigins?: string | undefined;
75
+ logLevel?: "debug" | "info" | "notice" | "warning" | "error" | undefined;
76
+ mcpLogLevel?: "debug" | "info" | "notice" | "warning" | "error" | undefined;
77
+ otelEnabled?: boolean | undefined;
78
+ otelExporterOtlpTracesEndpoint?: string | undefined;
79
+ otelExporterOtlpMetricsEndpoint?: string | undefined;
80
+ gcsBucketName?: string | undefined;
81
+ }>;
82
+ export type AppConfig = z.infer<typeof ConfigSchema>;
83
+ export declare function parseConfig(): AppConfig;
84
+ export declare const mcpConfig: {
85
+ serviceName: string;
86
+ port: number;
87
+ otelServiceName: string;
88
+ mcpAuthMode: "google-headers" | "jwt" | "none";
89
+ rateLimitPerMinute: number;
90
+ reportCacheTtlMs: number;
91
+ reportPollMaxRetries: number;
92
+ reportPollInitialDelayMs: number;
93
+ reportPollMaxDelayMs: number;
94
+ reportQueryRetries: number;
95
+ reportRetryCooldownMs: number;
96
+ host: string;
97
+ nodeEnv: "development" | "production" | "test";
98
+ mcpStatefulSessionTimeoutMs: number;
99
+ logLevel: "debug" | "info" | "notice" | "warning" | "error";
100
+ mcpLogLevel: "debug" | "info" | "notice" | "warning" | "error";
101
+ otelEnabled: boolean;
102
+ gcpProjectId?: string | undefined;
103
+ serviceAccountJson?: string | undefined;
104
+ serviceAccountFile?: string | undefined;
105
+ mcpAuthSecretKey?: string | undefined;
106
+ mcpAllowedOrigins?: string | undefined;
107
+ otelExporterOtlpTracesEndpoint?: string | undefined;
108
+ otelExporterOtlpMetricsEndpoint?: string | undefined;
109
+ gcsBucketName?: string | undefined;
110
+ };
111
+ export {};
112
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BhB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAKrD,wBAAgB,WAAW,IAAI,SAAS,CA6CvC;AAKD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgB,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { z } from "zod";
2
+ import { loadDotEnv, BaseConfigSchema, getBaseEnvConfig, parseConfigWithSchema, getDefaultHost, } from "@cesteral/shared";
3
+ loadDotEnv();
4
+ const ConfigSchema = BaseConfigSchema.extend({
5
+ serviceName: z.string().default("dbm-mcp"),
6
+ port: z.number().int().min(1).max(65535).default(3001),
7
+ otelServiceName: z.string().default("dbm-mcp"),
8
+ mcpAuthMode: z.enum(["google-headers", "jwt", "none"]).default("google-headers"),
9
+ gcpProjectId: z.string().optional(),
10
+ serviceAccountJson: z.string().optional(),
11
+ serviceAccountFile: z.string().optional(),
12
+ rateLimitPerMinute: z.number().default(10),
13
+ reportCacheTtlMs: z.number().default(300000),
14
+ reportPollMaxRetries: z.number().default(30),
15
+ reportPollInitialDelayMs: z.number().default(5000),
16
+ reportPollMaxDelayMs: z.number().default(30000),
17
+ reportQueryRetries: z.number().default(5),
18
+ reportRetryCooldownMs: z.number().default(60000),
19
+ });
20
+ export function parseConfig() {
21
+ const defaultHost = getDefaultHost();
22
+ const rawConfig = {
23
+ ...getBaseEnvConfig(defaultHost),
24
+ serviceName: process.env.SERVICE_NAME,
25
+ ...(process.env.DBM_MCP_PORT ? { port: Number(process.env.DBM_MCP_PORT) } : {}),
26
+ host: process.env.DBM_MCP_HOST || defaultHost,
27
+ gcpProjectId: process.env.GCP_PROJECT_ID,
28
+ serviceAccountJson: process.env.SERVICE_ACCOUNT_JSON,
29
+ serviceAccountFile: process.env.SERVICE_ACCOUNT_FILE,
30
+ rateLimitPerMinute: process.env.RATE_LIMIT_PER_MINUTE
31
+ ? Number(process.env.RATE_LIMIT_PER_MINUTE)
32
+ : undefined,
33
+ reportCacheTtlMs: process.env.REPORT_CACHE_TTL_MS
34
+ ? Number(process.env.REPORT_CACHE_TTL_MS)
35
+ : undefined,
36
+ reportPollMaxRetries: process.env.REPORT_POLL_MAX_RETRIES
37
+ ? Number(process.env.REPORT_POLL_MAX_RETRIES)
38
+ : undefined,
39
+ reportPollInitialDelayMs: process.env.REPORT_POLL_INITIAL_DELAY_MS
40
+ ? Number(process.env.REPORT_POLL_INITIAL_DELAY_MS)
41
+ : undefined,
42
+ reportPollMaxDelayMs: process.env.REPORT_POLL_MAX_DELAY_MS
43
+ ? Number(process.env.REPORT_POLL_MAX_DELAY_MS)
44
+ : undefined,
45
+ reportQueryRetries: process.env.REPORT_QUERY_RETRIES
46
+ ? Number(process.env.REPORT_QUERY_RETRIES)
47
+ : undefined,
48
+ reportRetryCooldownMs: process.env.REPORT_RETRY_COOLDOWN_MS
49
+ ? Number(process.env.REPORT_RETRY_COOLDOWN_MS)
50
+ : undefined,
51
+ };
52
+ return parseConfigWithSchema(ConfigSchema, rawConfig);
53
+ }
54
+ export const mcpConfig = parseConfig();
55
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,26 @@
1
+ import type { ReportType } from "./report-types.js";
2
+ export interface CompatibilityRule {
3
+ description: string;
4
+ metricsPattern?: RegExp;
5
+ filtersPattern?: RegExp;
6
+ reportTypes: ReportType[];
7
+ exclusive?: boolean;
8
+ }
9
+ export declare const REPORT_TYPE_RESTRICTIONS: CompatibilityRule[];
10
+ export interface IncompatibleCombination {
11
+ description: string;
12
+ incompatibleItems: {
13
+ metrics?: string[];
14
+ filters?: string[];
15
+ };
16
+ reason: string;
17
+ }
18
+ export declare const INCOMPATIBLE_COMBINATIONS: IncompatibleCombination[];
19
+ export declare const GROUP_BY_ONLY_FILTERS: string[];
20
+ export declare function getCompatibilityWarnings(reportType: string, metrics: string[], filters: string[], groupBys: string[]): string[];
21
+ export declare function getMetricsForReportType(reportType: ReportType): {
22
+ exclusive: string[];
23
+ general: string[];
24
+ };
25
+ export declare const BEST_PRACTICES: string[];
26
+ //# sourceMappingURL=compatibility-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compatibility-rules.d.ts","sourceRoot":"","sources":["../../src/generated/compatibility-rules.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAKpD,MAAM,WAAW,iBAAiB;IAEhC,WAAW,EAAE,MAAM,CAAC;IAEpB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,WAAW,EAAE,UAAU,EAAE,CAAC;IAE1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAOD,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,EA0DvD,CAAC;AAKF,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE;QACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,yBAAyB,EAAE,uBAAuB,EAe9D,CAAC;AAKF,eAAO,MAAM,qBAAqB,UASjC,CAAC;AAQF,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EAAE,EACjB,QAAQ,EAAE,MAAM,EAAE,GACjB,MAAM,EAAE,CA2DV;AAKD,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,UAAU,GAAG;IAC/D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAaA;AAKD,eAAO,MAAM,cAAc,UAO1B,CAAC"}