@memberjunction/ng-dashboards 6.2.0-edge.5 → 6.2.0-edge.7

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 (293) hide show
  1. package/README.md +35 -0
  2. package/dist/AI/components/analytics/agent-runs/agent-run-analysis.component.js +2 -2
  3. package/dist/AI/components/analytics/agent-runs/agent-run-analysis.component.js.map +1 -1
  4. package/dist/AI/components/analytics/realtime/realtime-management.component.d.ts.map +1 -1
  5. package/dist/AI/components/analytics/realtime/realtime-management.component.js +3 -1
  6. package/dist/AI/components/analytics/realtime/realtime-management.component.js.map +1 -1
  7. package/dist/AI/components/analytics/realtime/realtime-overview.component.d.ts +1 -1
  8. package/dist/AI/components/analytics/realtime/realtime-overview.component.js +3 -3
  9. package/dist/AI/components/analytics/realtime/realtime-overview.component.js.map +1 -1
  10. package/dist/AI/components/analytics/realtime/realtime-session-data.d.ts +6 -4
  11. package/dist/AI/components/analytics/realtime/realtime-session-data.d.ts.map +1 -1
  12. package/dist/AI/components/analytics/realtime/realtime-session-data.js +8 -2
  13. package/dist/AI/components/analytics/realtime/realtime-session-data.js.map +1 -1
  14. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts +1 -1
  15. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
  16. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +21 -13
  17. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
  18. package/dist/AI/components/autotagging/components/classify-item-grid.component.js +1 -1
  19. package/dist/AI/components/autotagging/components/classify-item-grid.component.js.map +1 -1
  20. package/dist/AI/components/autotagging/components/classify-org-context-editor.component.d.ts.map +1 -1
  21. package/dist/AI/components/autotagging/components/classify-org-context-editor.component.js +1 -0
  22. package/dist/AI/components/autotagging/components/classify-org-context-editor.component.js.map +1 -1
  23. package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.d.ts.map +1 -1
  24. package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.js +1 -0
  25. package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.js.map +1 -1
  26. package/dist/AI/components/autotagging/tabs/sources-tab.component.d.ts.map +1 -1
  27. package/dist/AI/components/autotagging/tabs/sources-tab.component.js +1 -0
  28. package/dist/AI/components/autotagging/tabs/sources-tab.component.js.map +1 -1
  29. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts +7 -1
  30. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
  31. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +210 -57
  32. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
  33. package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts +12 -11
  34. package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts.map +1 -1
  35. package/dist/AI/components/duplicates/duplicate-detection-run-scope.js +15 -15
  36. package/dist/AI/components/duplicates/duplicate-detection-run-scope.js.map +1 -1
  37. package/dist/AI/components/execution-monitoring.component.d.ts.map +1 -1
  38. package/dist/AI/components/execution-monitoring.component.js +28 -16
  39. package/dist/AI/components/execution-monitoring.component.js.map +1 -1
  40. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +1 -0
  41. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
  42. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +32 -8
  43. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
  44. package/dist/AI/components/tags/tags-resource.component.d.ts +1 -1
  45. package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
  46. package/dist/AI/components/tags/tags-resource.component.js +18 -9
  47. package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
  48. package/dist/AI/components/vectors/sensitive-fields.d.ts +9 -4
  49. package/dist/AI/components/vectors/sensitive-fields.d.ts.map +1 -1
  50. package/dist/AI/components/vectors/sensitive-fields.js +39 -14
  51. package/dist/AI/components/vectors/sensitive-fields.js.map +1 -1
  52. package/dist/AI/components/vectors/vector-document-rules.d.ts +13 -0
  53. package/dist/AI/components/vectors/vector-document-rules.d.ts.map +1 -1
  54. package/dist/AI/components/vectors/vector-document-rules.js +14 -0
  55. package/dist/AI/components/vectors/vector-document-rules.js.map +1 -1
  56. package/dist/AI/components/vectors/vector-management-resource.component.d.ts +34 -14
  57. package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
  58. package/dist/AI/components/vectors/vector-management-resource.component.js +134 -51
  59. package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
  60. package/dist/AI/components/vectors/vector-store-selection.d.ts +32 -0
  61. package/dist/AI/components/vectors/vector-store-selection.d.ts.map +1 -0
  62. package/dist/AI/components/vectors/vector-store-selection.js +57 -0
  63. package/dist/AI/components/vectors/vector-store-selection.js.map +1 -0
  64. package/dist/AI/services/ai-instrumentation.service.d.ts.map +1 -1
  65. package/dist/AI/services/ai-instrumentation.service.js +4 -2
  66. package/dist/AI/services/ai-instrumentation.service.js.map +1 -1
  67. package/dist/Actions/action-result-code.d.ts +80 -0
  68. package/dist/Actions/action-result-code.d.ts.map +1 -0
  69. package/dist/Actions/action-result-code.js +163 -0
  70. package/dist/Actions/action-result-code.js.map +1 -0
  71. package/dist/Actions/components/actions-overview.component.d.ts +8 -0
  72. package/dist/Actions/components/actions-overview.component.d.ts.map +1 -1
  73. package/dist/Actions/components/actions-overview.component.js +12 -9
  74. package/dist/Actions/components/actions-overview.component.js.map +1 -1
  75. package/dist/Actions/components/execution-monitoring.component.d.ts +29 -9
  76. package/dist/Actions/components/execution-monitoring.component.d.ts.map +1 -1
  77. package/dist/Actions/components/execution-monitoring.component.js +65 -42
  78. package/dist/Actions/components/execution-monitoring.component.js.map +1 -1
  79. package/dist/Actions/components/explorer/action-card.component.d.ts.map +1 -1
  80. package/dist/Actions/components/explorer/action-card.component.js +5 -4
  81. package/dist/Actions/components/explorer/action-card.component.js.map +1 -1
  82. package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts +198 -0
  83. package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts.map +1 -0
  84. package/dist/ChiefOfStaff/chief-of-staff-agent-context.js +289 -0
  85. package/dist/ChiefOfStaff/chief-of-staff-agent-context.js.map +1 -0
  86. package/dist/ChiefOfStaff/chief-of-staff-approvals.component.d.ts +29 -0
  87. package/dist/ChiefOfStaff/chief-of-staff-approvals.component.d.ts.map +1 -0
  88. package/dist/ChiefOfStaff/chief-of-staff-approvals.component.js +666 -0
  89. package/dist/ChiefOfStaff/chief-of-staff-approvals.component.js.map +1 -0
  90. package/dist/ChiefOfStaff/chief-of-staff-governance.component.d.ts +56 -0
  91. package/dist/ChiefOfStaff/chief-of-staff-governance.component.d.ts.map +1 -0
  92. package/dist/ChiefOfStaff/chief-of-staff-governance.component.js +515 -0
  93. package/dist/ChiefOfStaff/chief-of-staff-governance.component.js.map +1 -0
  94. package/dist/ChiefOfStaff/chief-of-staff-live-refresh.d.ts +14 -0
  95. package/dist/ChiefOfStaff/chief-of-staff-live-refresh.d.ts.map +1 -0
  96. package/dist/ChiefOfStaff/chief-of-staff-live-refresh.js +39 -0
  97. package/dist/ChiefOfStaff/chief-of-staff-live-refresh.js.map +1 -0
  98. package/dist/ChiefOfStaff/chief-of-staff-overview.component.d.ts +17 -0
  99. package/dist/ChiefOfStaff/chief-of-staff-overview.component.d.ts.map +1 -0
  100. package/dist/ChiefOfStaff/chief-of-staff-overview.component.js +485 -0
  101. package/dist/ChiefOfStaff/chief-of-staff-overview.component.js.map +1 -0
  102. package/dist/ChiefOfStaff/chief-of-staff-page-base.d.ts +139 -0
  103. package/dist/ChiefOfStaff/chief-of-staff-page-base.d.ts.map +1 -0
  104. package/dist/ChiefOfStaff/chief-of-staff-page-base.js +602 -0
  105. package/dist/ChiefOfStaff/chief-of-staff-page-base.js.map +1 -0
  106. package/dist/ChiefOfStaff/index.d.ts +6 -0
  107. package/dist/ChiefOfStaff/index.d.ts.map +1 -0
  108. package/dist/ChiefOfStaff/index.js +6 -0
  109. package/dist/ChiefOfStaff/index.js.map +1 -0
  110. package/dist/Communication/communication-logs-resource.component.d.ts.map +1 -1
  111. package/dist/Communication/communication-logs-resource.component.js +2 -1
  112. package/dist/Communication/communication-logs-resource.component.js.map +1 -1
  113. package/dist/Communication/communication-monitor-resource.component.d.ts.map +1 -1
  114. package/dist/Communication/communication-monitor-resource.component.js +26 -21
  115. package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
  116. package/dist/Communication/communication-runs-resource.component.d.ts.map +1 -1
  117. package/dist/Communication/communication-runs-resource.component.js +14 -13
  118. package/dist/Communication/communication-runs-resource.component.js.map +1 -1
  119. package/dist/ComponentStudio/component-studio-dashboard.component.d.ts.map +1 -1
  120. package/dist/ComponentStudio/component-studio-dashboard.component.js +1 -0
  121. package/dist/ComponentStudio/component-studio-dashboard.component.js.map +1 -1
  122. package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts.map +1 -1
  123. package/dist/ComponentStudio/components/artifact-selection-dialog.component.js +2 -1
  124. package/dist/ComponentStudio/components/artifact-selection-dialog.component.js.map +1 -1
  125. package/dist/ComponentStudio/services/component-version.service.d.ts.map +1 -1
  126. package/dist/ComponentStudio/services/component-version.service.js +3 -0
  127. package/dist/ComponentStudio/services/component-version.service.js.map +1 -1
  128. package/dist/DashboardEditor/dashboard-editor.component.d.ts +17 -2
  129. package/dist/DashboardEditor/dashboard-editor.component.d.ts.map +1 -1
  130. package/dist/DashboardEditor/dashboard-editor.component.js +94 -43
  131. package/dist/DashboardEditor/dashboard-editor.component.js.map +1 -1
  132. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +45 -2
  133. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
  134. package/dist/DataExplorer/data-explorer-dashboard.component.js +178 -55
  135. package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
  136. package/dist/DataExplorer/models/explorer-state.interface.d.ts +2 -0
  137. package/dist/DataExplorer/models/explorer-state.interface.d.ts.map +1 -1
  138. package/dist/DataExplorer/models/explorer-state.interface.js.map +1 -1
  139. package/dist/DevTools/graphql-console.component.js +2 -2
  140. package/dist/DevTools/lazy-module-status.component.js +2 -2
  141. package/dist/FormBuilder/form-builder-resource.component.d.ts.map +1 -1
  142. package/dist/FormBuilder/form-builder-resource.component.js +5 -0
  143. package/dist/FormBuilder/form-builder-resource.component.js.map +1 -1
  144. package/dist/Integration/components/connections/connections.component.js +2 -2
  145. package/dist/Integration/services/integration-data.service.d.ts +1 -1
  146. package/dist/Integration/services/integration-data.service.d.ts.map +1 -1
  147. package/dist/Integration/services/integration-data.service.js +4 -3
  148. package/dist/Integration/services/integration-data.service.js.map +1 -1
  149. package/dist/Lists/components/lists-browse-resource.component.js +1 -1
  150. package/dist/Lists/components/lists-browse-resource.component.js.map +1 -1
  151. package/dist/Lists/components/lists-my-lists-resource.component.js +1 -1
  152. package/dist/Lists/components/lists-my-lists-resource.component.js.map +1 -1
  153. package/dist/LoginStudio/login-studio-resource.component.d.ts +10 -2
  154. package/dist/LoginStudio/login-studio-resource.component.d.ts.map +1 -1
  155. package/dist/LoginStudio/login-studio-resource.component.js +111 -77
  156. package/dist/LoginStudio/login-studio-resource.component.js.map +1 -1
  157. package/dist/MCP/mcp-dashboard.component.d.ts +24 -4
  158. package/dist/MCP/mcp-dashboard.component.d.ts.map +1 -1
  159. package/dist/MCP/mcp-dashboard.component.js +118 -65
  160. package/dist/MCP/mcp-dashboard.component.js.map +1 -1
  161. package/dist/PredictiveStudio/business-predictions.view-models.d.ts +1 -1
  162. package/dist/PredictiveStudio/business-predictions.view-models.d.ts.map +1 -1
  163. package/dist/PredictiveStudio/business-predictions.view-models.js +3 -3
  164. package/dist/PredictiveStudio/business-predictions.view-models.js.map +1 -1
  165. package/dist/PredictiveStudio/components/ps-experiments.component.d.ts +6 -63
  166. package/dist/PredictiveStudio/components/ps-experiments.component.d.ts.map +1 -1
  167. package/dist/PredictiveStudio/components/ps-experiments.component.js +257 -521
  168. package/dist/PredictiveStudio/components/ps-experiments.component.js.map +1 -1
  169. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts +0 -18
  170. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts.map +1 -1
  171. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js +124 -251
  172. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js.map +1 -1
  173. package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts +5 -9
  174. package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts.map +1 -1
  175. package/dist/PredictiveStudio/components/ps-pipelines.component.js +98 -130
  176. package/dist/PredictiveStudio/components/ps-pipelines.component.js.map +1 -1
  177. package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts +53 -4
  178. package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts.map +1 -1
  179. package/dist/PredictiveStudio/components/ps-predictions-grid.component.js +338 -326
  180. package/dist/PredictiveStudio/components/ps-predictions-grid.component.js.map +1 -1
  181. package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts +19 -0
  182. package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts.map +1 -0
  183. package/dist/PredictiveStudio/components/ps-row-drivers.component.js +85 -0
  184. package/dist/PredictiveStudio/components/ps-row-drivers.component.js.map +1 -0
  185. package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts +19 -1
  186. package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts.map +1 -1
  187. package/dist/PredictiveStudio/engine/predictive-studio.engine.js +52 -2
  188. package/dist/PredictiveStudio/engine/predictive-studio.engine.js.map +1 -1
  189. package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts +3 -1
  190. package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts.map +1 -1
  191. package/dist/PredictiveStudio/predictive-studio-agent-context.js +3 -0
  192. package/dist/PredictiveStudio/predictive-studio-agent-context.js.map +1 -1
  193. package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts +27 -4
  194. package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts.map +1 -1
  195. package/dist/PredictiveStudio/predictive-studio-score-history.service.js +94 -61
  196. package/dist/PredictiveStudio/predictive-studio-score-history.service.js.map +1 -1
  197. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts +29 -5
  198. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts.map +1 -1
  199. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js +186 -103
  200. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js.map +1 -1
  201. package/dist/PredictiveStudio/resources/ps-studio-resource.component.js +1 -1
  202. package/dist/PredictiveStudio/resources/ps-studio-resource.component.js.map +1 -1
  203. package/dist/QueryBrowser/query-browser-resource.component.d.ts +26 -0
  204. package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
  205. package/dist/QueryBrowser/query-browser-resource.component.js +375 -252
  206. package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
  207. package/dist/UserRoutines/user-routines-resource.component.d.ts +8 -1
  208. package/dist/UserRoutines/user-routines-resource.component.d.ts.map +1 -1
  209. package/dist/UserRoutines/user-routines-resource.component.js +22 -4
  210. package/dist/UserRoutines/user-routines-resource.component.js.map +1 -1
  211. package/dist/VersionHistory/components/diff-resource.component.d.ts.map +1 -1
  212. package/dist/VersionHistory/components/diff-resource.component.js +1 -0
  213. package/dist/VersionHistory/components/diff-resource.component.js.map +1 -1
  214. package/dist/VideoStudio/components/vs-archetype-editor.component.d.ts +162 -0
  215. package/dist/VideoStudio/components/vs-archetype-editor.component.d.ts.map +1 -0
  216. package/dist/VideoStudio/components/vs-archetype-editor.component.js +1105 -0
  217. package/dist/VideoStudio/components/vs-archetype-editor.component.js.map +1 -0
  218. package/dist/VideoStudio/components/vs-audio-options.component.d.ts +27 -0
  219. package/dist/VideoStudio/components/vs-audio-options.component.d.ts.map +1 -0
  220. package/dist/VideoStudio/components/vs-audio-options.component.js +119 -0
  221. package/dist/VideoStudio/components/vs-audio-options.component.js.map +1 -0
  222. package/dist/VideoStudio/components/vs-copilot-panel.component.d.ts +105 -0
  223. package/dist/VideoStudio/components/vs-copilot-panel.component.d.ts.map +1 -0
  224. package/dist/VideoStudio/components/vs-copilot-panel.component.js +560 -0
  225. package/dist/VideoStudio/components/vs-copilot-panel.component.js.map +1 -0
  226. package/dist/VideoStudio/components/vs-production-brief.component.d.ts +163 -0
  227. package/dist/VideoStudio/components/vs-production-brief.component.d.ts.map +1 -0
  228. package/dist/VideoStudio/components/vs-production-brief.component.js +1054 -0
  229. package/dist/VideoStudio/components/vs-production-brief.component.js.map +1 -0
  230. package/dist/VideoStudio/components/vs-setup-health-card.component.d.ts +43 -0
  231. package/dist/VideoStudio/components/vs-setup-health-card.component.d.ts.map +1 -0
  232. package/dist/VideoStudio/components/vs-setup-health-card.component.js +412 -0
  233. package/dist/VideoStudio/components/vs-setup-health-card.component.js.map +1 -0
  234. package/dist/VideoStudio/components/vs-studio-slide-in.component.d.ts +73 -0
  235. package/dist/VideoStudio/components/vs-studio-slide-in.component.d.ts.map +1 -0
  236. package/dist/VideoStudio/components/vs-studio-slide-in.component.js +271 -0
  237. package/dist/VideoStudio/components/vs-studio-slide-in.component.js.map +1 -0
  238. package/dist/VideoStudio/index.d.ts +12 -0
  239. package/dist/VideoStudio/index.d.ts.map +1 -0
  240. package/dist/VideoStudio/index.js +12 -0
  241. package/dist/VideoStudio/index.js.map +1 -0
  242. package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.d.ts +118 -0
  243. package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.d.ts.map +1 -0
  244. package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.js +964 -0
  245. package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.js.map +1 -0
  246. package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.d.ts +70 -0
  247. package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.d.ts.map +1 -0
  248. package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.js +600 -0
  249. package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.js.map +1 -0
  250. package/dist/VideoStudio/resources/video-studio-productions-resource.component.d.ts +182 -0
  251. package/dist/VideoStudio/resources/video-studio-productions-resource.component.d.ts.map +1 -0
  252. package/dist/VideoStudio/resources/video-studio-productions-resource.component.js +1481 -0
  253. package/dist/VideoStudio/resources/video-studio-productions-resource.component.js.map +1 -0
  254. package/dist/VideoStudio/services/vs-studio-slide-in-state.service.d.ts +102 -0
  255. package/dist/VideoStudio/services/vs-studio-slide-in-state.service.d.ts.map +1 -0
  256. package/dist/VideoStudio/services/vs-studio-slide-in-state.service.js +240 -0
  257. package/dist/VideoStudio/services/vs-studio-slide-in-state.service.js.map +1 -0
  258. package/dist/VideoStudio/video-studio-agent-context.d.ts +495 -0
  259. package/dist/VideoStudio/video-studio-agent-context.d.ts.map +1 -0
  260. package/dist/VideoStudio/video-studio-agent-context.js +992 -0
  261. package/dist/VideoStudio/video-studio-agent-context.js.map +1 -0
  262. package/dist/ai-dashboards.module.d.ts +25 -21
  263. package/dist/ai-dashboards.module.d.ts.map +1 -1
  264. package/dist/ai-dashboards.module.js +25 -3
  265. package/dist/ai-dashboards.module.js.map +1 -1
  266. package/dist/module.d.ts +13 -12
  267. package/dist/module.d.ts.map +1 -1
  268. package/dist/module.js +7 -0
  269. package/dist/module.js.map +1 -1
  270. package/dist/public-api.d.ts +8 -0
  271. package/dist/public-api.d.ts.map +1 -1
  272. package/dist/public-api.js +10 -0
  273. package/dist/public-api.js.map +1 -1
  274. package/dist/shared/action-scheduled-job.d.ts.map +1 -1
  275. package/dist/shared/action-scheduled-job.js +2 -0
  276. package/dist/shared/action-scheduled-job.js.map +1 -1
  277. package/dist/video-studio-dashboards.module.d.ts +40 -0
  278. package/dist/video-studio-dashboards.module.d.ts.map +1 -0
  279. package/dist/video-studio-dashboards.module.js +159 -0
  280. package/dist/video-studio-dashboards.module.js.map +1 -0
  281. package/package.json +77 -71
  282. package/dist/PredictiveStudio/at-risk.view-models.d.ts +0 -120
  283. package/dist/PredictiveStudio/at-risk.view-models.d.ts.map +0 -1
  284. package/dist/PredictiveStudio/at-risk.view-models.js +0 -261
  285. package/dist/PredictiveStudio/at-risk.view-models.js.map +0 -1
  286. package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts +0 -109
  287. package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts.map +0 -1
  288. package/dist/PredictiveStudio/components/ps-confirm-modal.component.js +0 -323
  289. package/dist/PredictiveStudio/components/ps-confirm-modal.component.js.map +0 -1
  290. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts +0 -137
  291. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts.map +0 -1
  292. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js +0 -826
  293. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js.map +0 -1
@@ -0,0 +1,32 @@
1
+ /** A vector index as the Vectors tab lists it. */
2
+ export interface VectorIndexOption {
3
+ ID: string;
4
+ Name: string;
5
+ VectorDatabaseID: string;
6
+ EmbeddingModelID: string;
7
+ }
8
+ /** The three dropdowns' values. An empty `VectorIndexID` is "Auto (create/find matching index)". */
9
+ export interface VectorStoreSelection {
10
+ EmbeddingModelID: string;
11
+ VectorDatabaseID: string;
12
+ VectorIndexID: string;
13
+ }
14
+ /** True when the index stores vectors in this database with this embedding model. */
15
+ export declare function IndexMatchesSelection(index: VectorIndexOption, databaseID: string, embeddingModelID: string): boolean;
16
+ /**
17
+ * The indexes the Vector Index dropdown offers: those in the selected database built with the
18
+ * selected embedding model. An index built with another model would override the model shown.
19
+ */
20
+ export declare function IndexesForSelection(indexes: VectorIndexOption[], databaseID: string, embeddingModelID: string): VectorIndexOption[];
21
+ /** The selection after the user picks an index: the model and database dropdowns follow it. */
22
+ export declare function SelectIndex(selection: VectorStoreSelection, indexes: VectorIndexOption[], indexID: string): VectorStoreSelection;
23
+ /** The selection after the user changes the database: a chosen index from another database goes back to Auto. */
24
+ export declare function SelectDatabase(selection: VectorStoreSelection, indexes: VectorIndexOption[], databaseID: string): VectorStoreSelection;
25
+ /** The selection after the user changes the model: a chosen index built with another model goes back to Auto. */
26
+ export declare function SelectEmbeddingModel(selection: VectorStoreSelection, indexes: VectorIndexOption[], embeddingModelID: string): VectorStoreSelection;
27
+ /**
28
+ * The index Save may use as chosen: the selected one, only when it matches the database and model
29
+ * shown. Null means Auto (find or create the index for that database and model).
30
+ */
31
+ export declare function ChosenIndexForSave(selection: VectorStoreSelection, indexes: VectorIndexOption[]): VectorIndexOption | null;
32
+ //# sourceMappingURL=vector-store-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-store-selection.d.ts","sourceRoot":"","sources":["../../../../src/AI/components/vectors/vector-store-selection.ts"],"names":[],"mappings":"AAgBA,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;CAC5B;AAED,oGAAoG;AACpG,MAAM,WAAW,oBAAoB;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,qFAAqF;AACrF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAErH;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAEnI;AAED,+FAA+F;AAC/F,wBAAgB,WAAW,CAAC,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,oBAAoB,CAMhI;AAED,iHAAiH;AACjH,wBAAgB,cAAc,CAAC,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,oBAAoB,CAEtI;AAED,iHAAiH;AACjH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,gBAAgB,EAAE,MAAM,GAAG,oBAAoB,CAElJ;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,iBAAiB,EAAE,GAAG,iBAAiB,GAAG,IAAI,CAM1H"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * The Vectors tab's "where do this document's vectors go" choice: an embedding model, a vector
3
+ * database and an index. The three dropdowns must always show what Save will store.
4
+ *
5
+ * They did not. Save used a chosen index's database and model in place of the dropdowns' values,
6
+ * and the index stayed chosen when the database or model dropdown changed (the index list was
7
+ * filtered to the new database, so the stale choice was no longer even visible). With the first
8
+ * index pre-selected on load, a document saved with "gte-small" and the in-memory store showing
9
+ * was stored with another index's Pinecone database and Gemini model.
10
+ *
11
+ * These functions keep the three consistent: an index is offered only when it matches both the
12
+ * database and model shown, choosing one moves both dropdowns to its values, and changing either
13
+ * dropdown drops an index that no longer matches back to Auto.
14
+ */
15
+ import { UUIDsEqual } from '@memberjunction/global';
16
+ /** True when the index stores vectors in this database with this embedding model. */
17
+ export function IndexMatchesSelection(index, databaseID, embeddingModelID) {
18
+ return UUIDsEqual(index.VectorDatabaseID, databaseID) && UUIDsEqual(index.EmbeddingModelID, embeddingModelID);
19
+ }
20
+ /**
21
+ * The indexes the Vector Index dropdown offers: those in the selected database built with the
22
+ * selected embedding model. An index built with another model would override the model shown.
23
+ */
24
+ export function IndexesForSelection(indexes, databaseID, embeddingModelID) {
25
+ return indexes.filter(i => IndexMatchesSelection(i, databaseID, embeddingModelID));
26
+ }
27
+ /** The selection after the user picks an index: the model and database dropdowns follow it. */
28
+ export function SelectIndex(selection, indexes, indexID) {
29
+ const index = indexID ? indexes.find(i => UUIDsEqual(i.ID, indexID)) : undefined;
30
+ if (!index) {
31
+ return { ...selection, VectorIndexID: '' };
32
+ }
33
+ return { EmbeddingModelID: index.EmbeddingModelID, VectorDatabaseID: index.VectorDatabaseID, VectorIndexID: index.ID };
34
+ }
35
+ /** The selection after the user changes the database: a chosen index from another database goes back to Auto. */
36
+ export function SelectDatabase(selection, indexes, databaseID) {
37
+ return keepIndexOnlyIfItMatches({ ...selection, VectorDatabaseID: databaseID }, indexes);
38
+ }
39
+ /** The selection after the user changes the model: a chosen index built with another model goes back to Auto. */
40
+ export function SelectEmbeddingModel(selection, indexes, embeddingModelID) {
41
+ return keepIndexOnlyIfItMatches({ ...selection, EmbeddingModelID: embeddingModelID }, indexes);
42
+ }
43
+ /**
44
+ * The index Save may use as chosen: the selected one, only when it matches the database and model
45
+ * shown. Null means Auto (find or create the index for that database and model).
46
+ */
47
+ export function ChosenIndexForSave(selection, indexes) {
48
+ if (!selection.VectorIndexID) {
49
+ return null;
50
+ }
51
+ const index = indexes.find(i => UUIDsEqual(i.ID, selection.VectorIndexID));
52
+ return index && IndexMatchesSelection(index, selection.VectorDatabaseID, selection.EmbeddingModelID) ? index : null;
53
+ }
54
+ function keepIndexOnlyIfItMatches(selection, indexes) {
55
+ return ChosenIndexForSave(selection, indexes) ? selection : { ...selection, VectorIndexID: '' };
56
+ }
57
+ //# sourceMappingURL=vector-store-selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-store-selection.js","sourceRoot":"","sources":["../../../../src/AI/components/vectors/vector-store-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAiBpD,qFAAqF;AACrF,MAAM,UAAU,qBAAqB,CAAC,KAAwB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AE,gBAAgB,EAAE,gBAAgB,EAAE,EAAE,OAAO,CAAC,CAAC;AACnG,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAA+B,EAAE,OAA4B;IAC5F,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;IAC3E,OAAO,KAAK,IAAI,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,gBAAgB,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AACxH,CAAC;AAED,SAAS,wBAAwB,CAAC,SAA+B,EAAE,OAA4B;IAC3F,OAAO,kBAAkB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC;AACpG,CAAC","sourcesContent":["/**\n * The Vectors tab's \"where do this document's vectors go\" choice: an embedding model, a vector\n * database and an index. The three dropdowns must always show what Save will store.\n *\n * They did not. Save used a chosen index's database and model in place of the dropdowns' values,\n * and the index stayed chosen when the database or model dropdown changed (the index list was\n * filtered to the new database, so the stale choice was no longer even visible). With the first\n * index pre-selected on load, a document saved with \"gte-small\" and the in-memory store showing\n * was stored with another index's Pinecone database and Gemini model.\n *\n * These functions keep the three consistent: an index is offered only when it matches both the\n * database and model shown, choosing one moves both dropdowns to its values, and changing either\n * dropdown drops an index that no longer matches back to Auto.\n */\nimport { UUIDsEqual } from '@memberjunction/global';\n\n/** A vector index as the Vectors tab lists it. */\nexport interface VectorIndexOption {\n ID: string;\n Name: string;\n VectorDatabaseID: string;\n EmbeddingModelID: string;\n}\n\n/** The three dropdowns' values. An empty `VectorIndexID` is \"Auto (create/find matching index)\". */\nexport interface VectorStoreSelection {\n EmbeddingModelID: string;\n VectorDatabaseID: string;\n VectorIndexID: string;\n}\n\n/** True when the index stores vectors in this database with this embedding model. */\nexport function IndexMatchesSelection(index: VectorIndexOption, databaseID: string, embeddingModelID: string): boolean {\n return UUIDsEqual(index.VectorDatabaseID, databaseID) && UUIDsEqual(index.EmbeddingModelID, embeddingModelID);\n}\n\n/**\n * The indexes the Vector Index dropdown offers: those in the selected database built with the\n * selected embedding model. An index built with another model would override the model shown.\n */\nexport function IndexesForSelection(indexes: VectorIndexOption[], databaseID: string, embeddingModelID: string): VectorIndexOption[] {\n return indexes.filter(i => IndexMatchesSelection(i, databaseID, embeddingModelID));\n}\n\n/** The selection after the user picks an index: the model and database dropdowns follow it. */\nexport function SelectIndex(selection: VectorStoreSelection, indexes: VectorIndexOption[], indexID: string): VectorStoreSelection {\n const index = indexID ? indexes.find(i => UUIDsEqual(i.ID, indexID)) : undefined;\n if (!index) {\n return { ...selection, VectorIndexID: '' };\n }\n return { EmbeddingModelID: index.EmbeddingModelID, VectorDatabaseID: index.VectorDatabaseID, VectorIndexID: index.ID };\n}\n\n/** The selection after the user changes the database: a chosen index from another database goes back to Auto. */\nexport function SelectDatabase(selection: VectorStoreSelection, indexes: VectorIndexOption[], databaseID: string): VectorStoreSelection {\n return keepIndexOnlyIfItMatches({ ...selection, VectorDatabaseID: databaseID }, indexes);\n}\n\n/** The selection after the user changes the model: a chosen index built with another model goes back to Auto. */\nexport function SelectEmbeddingModel(selection: VectorStoreSelection, indexes: VectorIndexOption[], embeddingModelID: string): VectorStoreSelection {\n return keepIndexOnlyIfItMatches({ ...selection, EmbeddingModelID: embeddingModelID }, indexes);\n}\n\n/**\n * The index Save may use as chosen: the selected one, only when it matches the database and model\n * shown. Null means Auto (find or create the index for that database and model).\n */\nexport function ChosenIndexForSave(selection: VectorStoreSelection, indexes: VectorIndexOption[]): VectorIndexOption | null {\n if (!selection.VectorIndexID) {\n return null;\n }\n const index = indexes.find(i => UUIDsEqual(i.ID, selection.VectorIndexID));\n return index && IndexMatchesSelection(index, selection.VectorDatabaseID, selection.EmbeddingModelID) ? index : null;\n}\n\nfunction keepIndexOnlyIfItMatches(selection: VectorStoreSelection, indexes: VectorIndexOption[]): VectorStoreSelection {\n return ChosenIndexForSave(selection, indexes) ? selection : { ...selection, VectorIndexID: '' };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ai-instrumentation.service.d.ts","sourceRoot":"","sources":["../../../src/AI/services/ai-instrumentation.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,iBAAiB,EAAE,iBAAiB,EAAiB,MAAM,sBAAsB,CAAC;AAG9G,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAC1I,OAAO,EACL,aAAa,EACb,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EASjB,MAAM,8BAA8B,CAAC;;AAEtC,OAAO,EACL,aAAa,EACb,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACV,CAAC;AAiBF;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,gBAAgB,EAAE,MAAM,GAA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E,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAIvE;;OAEG;IACG,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAI3E;;OAEG;IACG,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;IAiCtF;;OAEG;IACG,wBAAwB,IAAI,OAAO,CAAC;QACxC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC5B,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAC7B,CAAC;IAgDF;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;yCA7hB3C,wBAAwB;6CAAxB,wBAAwB;CAylBpC"}
1
+ {"version":3,"file":"ai-instrumentation.service.d.ts","sourceRoot":"","sources":["../../../src/AI/services/ai-instrumentation.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,iBAAiB,EAAE,iBAAiB,EAAiB,MAAM,sBAAsB,CAAC;AAG9G,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAC1I,OAAO,EACL,aAAa,EACb,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EASjB,MAAM,8BAA8B,CAAC;;AAEtC,OAAO,EACL,aAAa,EACb,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,gBAAgB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S,
279
279
  ResultType: 'simple',
280
- MaxRows: 1
280
+ MaxRows: 1,
281
+ SkipTotalRowCount: true
281
282
  },
282
283
  ...(loadChildren ? [{
283
284
  EntityName: 'MJ: AI Prompt Runs',
@@ -324,7 +325,8 @@ export class AIInstrumentationService {
324
325
  ExtraFilter: `ID = '${agentRunId}'`,
325
326
  Fields: AGENT_RUN_FIELDS,
326
327
  ResultType: 'simple',
327
- MaxRows: 1
328
+ MaxRows: 1,
329
+ SkipTotalRowCount: true
328
330
  },
329
331
  ...(loadChildren ? [{
330
332
  EntityName: 'MJ: AI Agent Runs',
@@ -1 +1 @@
1
- {"version":3,"file":"ai-instrumentation.service.js","sourceRoot":"","sources":["../../../src/AI/services/ai-instrumentation.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAuD,MAAM,sBAAsB,CAAC;AAC9G,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAGhF,OAAO,EAML,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;;AAEtC,OAAO,EAWL,gBAAgB,EAEjB,CAAC;AAEF;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,QAA2B;IACrD,OAAO,UAAU,IAAI,QAAQ,IAAI,OAAO,QAAQ,CAAC,QAAQ,KAAK,UAAU;WACnE,YAAY,IAAI,QAAQ,I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AAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC,MAAM,CAAC;YACpG,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;YACnC,MAAM,aAAa,GAAG,KAAK,GAAG,OAAO,CAAC;YACtC,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;YACxC,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,KAAK,IAAI,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACrF,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,KAAK,IAAI,IAAI,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;YACzF,MAAM,GAAG,GAAG,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnE,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC,CAAC;QAC9G,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;kHAxlBU,wBAAwB;gEAAxB,wBAAwB,WAAxB,wBAAwB,mBAFvB,MAAM;;iFAEP,wBAAwB;cAHpC,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject, from, combineLatest, of } from 'rxjs';\nimport { switchMap, shareReplay, tap, map, catchError } from 'rxjs/operators';\nimport { RunView, RunQuery, IMetadataProvider, IRunQueryProvider, RunViewResult } from '@memberjunction/core';\nimport { NormalizeUUID } from '@memberjunction/global';\nimport { TOKEN_PRICE_UNIT_TYPE_DIVISORS } from '@memberjunction/ai-engine-base';\nimport { CacheRate } from './cache-metrics';\nimport { AIUsageCoverage, AIUsageHourlyRow, AIUsageDailyRow, AIUsageByModelRow, AIAgentRunSubtreeCost } from './ai-usage-analytics.types';\nimport {\n DashboardKPIs,\n TrendData,\n LiveExecution,\n LiveExecutionStatus,\n CostInputRow,\n ComputeTotalCost,\n ComputeKPIs,\n ComputeTrends,\n ComputeLiveExecutions,\n ComputeCostByModel,\n ComputePerformanceMatrix,\n ComputeTokenEfficiency,\n CountActiveExecutions,\n ResolveCostCurrency\n} from './ai-usage-analytics.compute';\n\nexport {\n DashboardKPIs,\n TrendData,\n LiveExecution,\n LiveExecutionStatus,\n AIUsageCoverage,\n AIUsageHourlyRow,\n AIUsageDailyRow,\n AIUsageByModelRow,\n AIAgentRunSubtreeCost,\n CostInputRow,\n ComputeTotalCost,\n CacheRate\n};\n\n/**\n * True when a metadata provider can also run saved queries. At runtime MJ's providers (ProviderBase\n * subclasses) implement both interfaces, but IMetadataProvider does not extend IRunQueryProvider, so\n * this is checked rather than asserted — a provider that cannot run queries fails loudly here\n * instead of at the first RunQuery call.\n */\nfunction IsRunQueryProvider(provider: IMetadataProvider): provider is IMetadataProvider & IRunQueryProvider {\n return 'RunQuery' in provider && typeof provider.RunQuery === 'function'\n && 'RunQueries' in provider && typeof provider.RunQueries === 'function';\n}\n\n/** How deep an execution drill-down follows child runs, and how many it will load in total. */\nconst EXECUTION_DETAIL_MAX_DEPTH = 4;\nconst EXECUTION_DETAIL_MAX_NODES = 200;\n\n/**\n * Lightweight record types for live run monitoring and execution drill-down.\n * We use ResultType: 'simple' with explicit Fields and MaxRows bounds\n * to avoid unbounded reads and large payload transfers.\n */\nexport interface PromptRunRecord {\n ID: string;\n RunAt: string;\n CompletedAt: string | null;\n Success: boolean;\n Cost: number | null;\n TokensUsed: number | null;\n TokensPrompt: number | null;\n TokensCompletion: number | null;\n TokensCacheRead: number | null;\n TokensCacheWrite: number | null;\n ExecutionTimeMS: number | null;\n ModelID: string | null;\n Model: string | null;\n AgentID: string | null;\n Agent: string | null;\n Prompt: string | null;\n ErrorMessage: string | null;\n}\n\nexport interface AgentRunRecord {\n ID: string;\n StartedAt: string;\n CompletedAt: string | null;\n Status: string;\n Success: boolean;\n TotalCost: number | null;\n TotalTokensUsed: number | null;\n AgentID: string | null;\n Agent: string | null;\n ErrorMessage: string | null;\n}\n\n/** Fields to request for prompt runs — only what is needed for drilldown and live monitoring */\nexport const PROMPT_RUN_FIELDS = [\n 'ID', 'RunAt', 'CompletedAt', 'Success', 'Cost', 'TokensUsed',\n 'TokensPrompt', 'TokensCompletion', 'TokensCacheRead', 'TokensCacheWrite', 'ExecutionTimeMS',\n 'ModelID', 'Model', 'AgentID', 'Agent', 'Prompt', 'ErrorMessage'\n];\n\n/** Fields to request for agent runs — only what is needed for drilldown and live monitoring */\nexport const AGENT_RUN_FIELDS = [\n 'ID', 'StartedAt', 'CompletedAt', 'Status', 'Success',\n 'TotalCost', 'TotalTokensUsed', 'AgentID', 'Agent', 'ErrorMessage'\n];\n\nexport interface ExecutionDetails {\n id: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n type: 'prompt' | 'agent'; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n name: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n status: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n startTime: Date; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n endTime?: Date; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n cost: number | null; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n tokens: number; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n success: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n errorMessage?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n parentId?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n children: ExecutionDetails[]; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n model?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n vendor?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n}\n\nexport interface ChartData {\n executionTrends: TrendData[]; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n costByModel: { model: string; cost: number | null; tokens: number }[]; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n performanceMatrix: { agent: string; model: string; avgTime: number; successRate: number; FailedRuns: number }[]; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n tokenEfficiency: { inputTokens: number; outputTokens: number; cost: number | null; model: string }[]; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n}\n\n/** Internal shape for the single data load that all derived streams share */\ninterface DashboardRawData {\n hourlyRows: AIUsageHourlyRow[];\n livePromptRuns: PromptRunRecord[];\n liveAgentRuns: AgentRunRecord[];\n modelNames: Map<string, string>;\n agentNames: Map<string, string>;\n start: Date;\n end: Date;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AIInstrumentationService {\n private _provider: IMetadataProvider | null = null;\n\n /** Set the metadata provider this service should use. Components should call this after injection. */\n public set Provider(value: IMetadataProvider | null) {\n this._provider = value;\n }\n\n public get Provider(): IMetadataProvider {\n if (this._provider) {\n return this._provider;\n }\n throw new Error('AIInstrumentationService: MetadataProvider must be set before use');\n }\n\n public get ProviderToUse(): IMetadataProvider {\n return this.Provider;\n }\n\n public get RunQueryToUse(): IRunQueryProvider {\n const provider = this.ProviderToUse;\n if (IsRunQueryProvider(provider)) {\n return provider;\n }\n throw new Error('AIInstrumentationService: the configured MetadataProvider cannot run queries');\n }\n\n private readonly _dateRange$ = new BehaviorSubject<{ start: Date; end: Date }>({\n start: new Date(Date.now() - 24 * 60 * 60 * 1000), // Last 24 hours\n end: new Date()\n });\n\n private readonly _refreshTrigger$ = new BehaviorSubject<number>(0);\n private readonly _isLoading$ = new BehaviorSubject<boolean>(false);\n\n // Expose loading state as observable\n readonly IsLoading$ = this._isLoading$.asObservable();\n\n /** @deprecated Use {@link IsLoading$}. */\n get isLoading$() {\n return this.IsLoading$;\n }\n\n constructor() {}\n\n /**\n * Single data load: fetches aggregated hourly facts via RunQuery and\n * live runs via bounded RunViews once per refresh or date-range change.\n *\n * A failed load is contained INSIDE the switchMap. Left to reach shareReplay, one rejected load\n * (a transient network blip, a RunQuery 500) terminates the shared subject for the life of this\n * root-provided service: every derived stream replays the error, Refresh() and SetDateRange()\n * push into a combineLatest nobody is subscribed to any more, and IsLoading$ sticks at true.\n */\n private readonly rawData$ = combineLatest([this._refreshTrigger$, this._dateRange$]).pipe(\n tap(() => this._isLoading$.next(true)),\n switchMap(([, range]) => from(this.loadAllData()).pipe(\n catchError((error: unknown) => {\n console.error('AI analytics: dashboard data failed to load; showing an empty period until the next refresh.', error);\n return of(this.emptyRawData(range.start, range.end));\n })\n )),\n tap(() => this._isLoading$.next(false)),\n shareReplay(1)\n );\n\n // Derived streams — pure in-memory transforms via ai-usage-analytics.compute.ts\n readonly Kpis$ = this.rawData$.pipe(\n map(data => {\n const activeExecutions = CountActiveExecutions(data.livePromptRuns, data.liveAgentRuns);\n return ComputeKPIs(data.hourlyRows, activeExecutions, data.modelNames, data.agentNames);\n }),\n shareReplay(1)\n );\n\n /** @deprecated Use {@link Kpis$}. */\n get kpis$() {\n return this.Kpis$;\n }\n\n readonly Trends$ = this.rawData$.pipe(\n map(data => ComputeTrends(data.hourlyRows, data.start, data.end, ResolveCostCurrency(data.hourlyRows).Currency)),\n shareReplay(1)\n );\n\n /** @deprecated Use {@link Trends$}. */\n get trends$() {\n return this.Trends$;\n }\n\n readonly LiveExecutions$ = this.rawData$.pipe(\n map(data => ComputeLiveExecutions(data.livePromptRuns, data.liveAgentRuns)),\n shareReplay(1)\n );\n\n /** @deprecated Use {@link LiveExecutions$}. */\n get liveExecutions$() {\n return this.LiveExecutions$;\n }\n\n readonly ChartData$ = combineLatest([this.rawData$, this.Trends$]).pipe(\n map(([data, executionTrends]) => {\n // One currency for every cost on the page — the same one the KPIs report in.\n const currency = ResolveCostCurrency(data.hourlyRows).Currency;\n return {\n executionTrends,\n costByModel: ComputeCostByModel(data.hourlyRows, data.modelNames, currency),\n performanceMatrix: ComputePerformanceMatrix(data.hourlyRows, data.modelNames, data.agentNames),\n tokenEfficiency: ComputeTokenEfficiency(data.hourlyRows, data.modelNames, currency)\n };\n }),\n shareReplay(1)\n );\n\n /** @deprecated Use {@link ChartData$}. */\n get chartData$() {\n return this.ChartData$;\n }\n\n SetDateRange(start: Date, end: Date): void {\n this._dateRange$.next({ start, end });\n }\n\n /** @deprecated Use {@link SetDateRange}. */\n setDateRange(start: Date, end: Date): void {\n return this.SetDateRange(start, end);\n }\n\n Refresh(): void {\n this._refreshTrigger$.next(this._refreshTrigger$.value + 1);\n }\n\n /** @deprecated Use {@link Refresh}. */\n refresh(): void {\n return this.Refresh();\n }\n\n /**\n * Single batch query that loads all data needed by every dashboard widget.\n * AIUsageHourly runs through RunQuery.\n * Live runs and dimension names are loaded with explicit MaxRows bounds.\n */\n private async loadAllData(): Promise<DashboardRawData> {\n const { start, end } = this._dateRange$.value;\n const now = new Date();\n const recentTime = new Date(now.getTime() - 5 * 60 * 1000);\n\n const rq = new RunQuery(this.RunQueryToUse);\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n\n const [queryResult, rvResults] = await Promise.all([\n rq.RunQuery({\n QueryName: 'AIUsageHourly',\n CategoryPath: '/MJ/AI/',\n Parameters: {\n start: start.toISOString(),\n end: end.toISOString()\n }\n }),\n rv.RunViews<PromptRunRecord | AgentRunRecord | { ID: string; Name: string }>([\n {\n EntityName: 'MJ: AI Prompt Runs',\n ExtraFilter: `RunAt >= '${recentTime.toISOString()}'`,\n OrderBy: 'RunAt DESC',\n Fields: PROMPT_RUN_FIELDS,\n ResultType: 'simple',\n MaxRows: 50\n },\n {\n EntityName: 'MJ: AI Agent Runs',\n ExtraFilter: `StartedAt >= '${recentTime.toISOString()}'`,\n OrderBy: 'StartedAt DESC',\n Fields: AGENT_RUN_FIELDS,\n ResultType: 'simple',\n MaxRows: 50\n },\n {\n EntityName: 'MJ: AI Models',\n Fields: ['ID', 'Name'],\n ResultType: 'simple',\n MaxRows: 500\n },\n {\n EntityName: 'MJ: AI Agents',\n Fields: ['ID', 'Name'],\n ResultType: 'simple',\n MaxRows: 500\n }\n ])\n ]);\n\n if (!queryResult.Success) {\n // A failed aggregate read is not an empty period. Say so rather than let every KPI read zero.\n console.error(`AI analytics: AIUsageHourly failed to load; usage figures will be empty. ${queryResult.ErrorMessage}`);\n }\n const hourlyRows = (queryResult.Success && Array.isArray(queryResult.Results) ? queryResult.Results : []) as AIUsageHourlyRow[];\n\n const livePromptRuns = this.resultRows<PromptRunRecord>(rvResults[0], 'live prompt runs');\n const liveAgentRuns = this.resultRows<AgentRunRecord>(rvResults[1], 'live agent runs');\n\n const modelNames = new Map<string, string>();\n for (const m of this.resultRows<{ ID: string; Name: string }>(rvResults[2], 'model names')) {\n if (m && m.ID && m.Name) {\n modelNames.set(m.ID, m.Name);\n }\n }\n\n const agentNames = new Map<string, string>();\n for (const a of this.resultRows<{ ID: string; Name: string }>(rvResults[3], 'agent names')) {\n if (a && a.ID && a.Name) {\n agentNames.set(a.ID, a.Name);\n }\n }\n\n return {\n hourlyRows,\n livePromptRuns,\n liveAgentRuns,\n modelNames,\n agentNames,\n start,\n end\n };\n }\n\n /** The payload a failed load degrades to: an empty period over the requested range. */\n private emptyRawData(start: Date, end: Date): DashboardRawData {\n return {\n hourlyRows: [],\n livePromptRuns: [],\n liveAgentRuns: [],\n modelNames: new Map<string, string>(),\n agentNames: new Map<string, string>(),\n start,\n end\n };\n }\n\n /**\n * The rows of a RunView result, logging when the view FAILED. A failed view and an empty one both\n * yield no rows, but only the empty one means \"nothing there\" — without the log, a failure reads\n * as a confident zero on whatever figure the rows feed.\n */\n private resultRows<T>(result: RunViewResult<unknown> | undefined, what: string): T[] {\n if (!result) {\n console.error(`AI analytics: no result returned for ${what}`);\n return [];\n }\n if (!result.Success) {\n console.error(`AI analytics: ${what} failed to load. ${result.ErrorMessage}`);\n return [];\n }\n return (Array.isArray(result.Results) ? result.Results : []) as T[];\n }\n\n // ─── Execution Details (on-demand, not part of initial load) ──────\n\n async GetExecutionDetails(executionId: string, type: 'prompt' | 'agent'): Promise<ExecutionDetails | null> {\n try {\n const budget = { visited: new Set<string>(), remaining: EXECUTION_DETAIL_MAX_NODES };\n if (type === 'prompt') {\n return await this.getPromptExecutionDetails(executionId, 0, budget);\n } else {\n return await this.getAgentExecutionDetails(executionId, 0, budget);\n }\n } catch (error) {\n console.error('Error loading execution details:', error);\n return null;\n }\n }\n\n /** @deprecated Use {@link GetExecutionDetails}. */\n async getExecutionDetails(executionId: string, type: 'prompt' | 'agent'): Promise<ExecutionDetails | null> {\n return this.GetExecutionDetails(executionId, type);\n }\n\n /**\n * Claims a node for the drill-down: false when it was already visited (a ParentID cycle) or the\n * total node budget is spent. Bounded because each node costs a RunViews round trip and children\n * fan out — an uncapped 3-level tree of 20 children each is thousands of requests from one click.\n */\n private claimDetailNode(id: string, budget: { visited: Set<string>; remaining: number }): boolean {\n const key = NormalizeUUID(id);\n if (budget.visited.has(key) || budget.remaining <= 0) {\n return false;\n }\n budget.visited.add(key);\n budget.remaining--;\n return true;\n }\n\n private async getPromptExecutionDetails(\n promptRunId: string,\n depth: number,\n budget: { visited: Set<string>; remaining: number }\n ): Promise<ExecutionDetails> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const loadChildren = depth < EXECUTION_DETAIL_MAX_DEPTH;\n const [result, childrenResult] = await rv.RunViews<PromptRunRecord>([\n {\n EntityName: 'MJ: AI Prompt Runs',\n ExtraFilter: `ID = '${promptRunId}'`,\n Fields: PROMPT_RUN_FIELDS,\n ResultType: 'simple',\n MaxRows: 1\n },\n ...(loadChildren ? [{\n EntityName: 'MJ: AI Prompt Runs',\n ExtraFilter: `ParentID = '${promptRunId}'`,\n Fields: PROMPT_RUN_FIELDS,\n ResultType: 'simple' as const,\n MaxRows: 100\n }] : [])\n ]);\n\n const run = this.resultRows<PromptRunRecord>(result, 'prompt run detail')[0];\n if (!run) throw new Error('Prompt run not found');\n\n const childrenList = loadChildren ? this.resultRows<PromptRunRecord>(childrenResult, 'prompt run children') : [];\n const children = await Promise.all(\n childrenList\n .filter(child => this.claimDetailNode(child.ID, budget))\n .map(child => this.getPromptExecutionDetails(child.ID, depth + 1, budget))\n );\n\n const costVal = run.Cost !== null && run.Cost !== undefined ? run.Cost : null;\n const tokensVal = typeof run.TokensUsed === 'number' ? run.TokensUsed : 0;\n const promptName = run.Prompt ? run.Prompt : 'Unnamed Prompt';\n const statusStr = run.Success ? 'completed' : 'failed';\n const errMsg = run.ErrorMessage ? run.ErrorMessage : undefined;\n const modelStr = run.Model ? run.Model : undefined;\n\n return {\n id: run.ID,\n type: 'prompt',\n name: promptName,\n status: statusStr,\n startTime: new Date(run.RunAt),\n endTime: run.CompletedAt ? new Date(run.CompletedAt) : undefined,\n cost: costVal,\n tokens: tokensVal,\n success: run.Success ? true : false,\n errorMessage: errMsg,\n children,\n model: modelStr\n };\n }\n\n private async getAgentExecutionDetails(\n agentRunId: string,\n depth: number,\n budget: { visited: Set<string>; remaining: number }\n ): Promise<ExecutionDetails> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const loadChildren = depth < EXECUTION_DETAIL_MAX_DEPTH;\n const [result, childrenResult] = await rv.RunViews<AgentRunRecord>([\n {\n EntityName: 'MJ: AI Agent Runs',\n ExtraFilter: `ID = '${agentRunId}'`,\n Fields: AGENT_RUN_FIELDS,\n ResultType: 'simple',\n MaxRows: 1\n },\n ...(loadChildren ? [{\n EntityName: 'MJ: AI Agent Runs',\n ExtraFilter: `ParentRunID = '${agentRunId}'`,\n Fields: AGENT_RUN_FIELDS,\n ResultType: 'simple' as const,\n MaxRows: 100\n }] : [])\n ]);\n\n const run = this.resultRows<AgentRunRecord>(result, 'agent run detail')[0];\n if (!run) throw new Error('Agent run not found');\n\n const childrenList = loadChildren ? this.resultRows<AgentRunRecord>(childrenResult, 'agent run children') : [];\n const children = await Promise.all(\n childrenList\n .filter(child => this.claimDetailNode(child.ID, budget))\n .map(child => this.getAgentExecutionDetails(child.ID, depth + 1, budget))\n );\n\n const costVal = run.TotalCost !== null && run.TotalCost !== undefined ? run.TotalCost : null;\n const tokensVal = typeof run.TotalTokensUsed === 'number' ? run.TotalTokensUsed : 0;\n const agentName = run.Agent ? run.Agent : 'Unnamed Agent';\n const statusStr = run.Status ? run.Status.toLowerCase() : 'unknown';\n const errMsg = run.ErrorMessage ? run.ErrorMessage : undefined;\n\n return {\n id: run.ID,\n type: 'agent',\n name: agentName,\n status: statusStr,\n startTime: new Date(run.StartedAt),\n endTime: run.CompletedAt ? new Date(run.CompletedAt) : undefined,\n cost: costVal,\n tokens: tokensVal,\n success: run.Success ? true : false,\n errorMessage: errMsg,\n parentId: undefined,\n children\n };\n }\n\n /**\n * Runs one of the AI usage aggregate queries, logging a failure rather than letting it read as an\n * empty (zero-usage) period.\n */\n private async runUsageQuery<T>(queryName: string, start: Date, end: Date): Promise<T[]> {\n const rq = new RunQuery(this.RunQueryToUse);\n const res = await rq.RunQuery({\n QueryName: queryName,\n CategoryPath: '/MJ/AI/',\n Parameters: {\n start: start.toISOString(),\n end: end.toISOString()\n }\n });\n if (!res.Success) {\n console.error(`AI analytics: ${queryName} failed to load. ${res.ErrorMessage}`);\n return [];\n }\n return (Array.isArray(res.Results) ? res.Results : []) as T[];\n }\n\n /**\n * Fetch hourly aggregate usage for a date range via stored query AIUsageHourly.\n */\n async GetUsageHourly(start: Date, end: Date): Promise<AIUsageHourlyRow[]> {\n return this.runUsageQuery<AIUsageHourlyRow>('AIUsageHourly', start, end);\n }\n\n /**\n * Fetch daily aggregate usage for a date range via stored query AIUsageDaily.\n */\n async GetUsageDaily(start: Date, end: Date): Promise<AIUsageDailyRow[]> {\n return this.runUsageQuery<AIUsageDailyRow>('AIUsageDaily', start, end);\n }\n\n /**\n * Fetch model-level aggregate usage for a date range via stored query AIUsageByModel.\n */\n async GetUsageByModel(start: Date, end: Date): Promise<AIUsageByModelRow[]> {\n return this.runUsageQuery<AIUsageByModelRow>('AIUsageByModel', start, end);\n }\n\n /**\n * Calculate recursive subtree cost and token metrics for an agent run via CalculateRunCost.\n */\n async CalculateAgentRunCost(agentRunId: string): Promise<AIAgentRunSubtreeCost | null> {\n const rq = new RunQuery(this.RunQueryToUse);\n const res = await rq.RunQuery({\n QueryName: 'CalculateRunCost',\n CategoryPath: '/MJ/AI/Agents/',\n Parameters: {\n AIAgentRunID: agentRunId,\n AgentRunID: agentRunId\n }\n });\n if (!res.Success) {\n console.error(`AI analytics: CalculateRunCost failed for agent run ${agentRunId}. ${res.ErrorMessage}`);\n return null;\n }\n if (Array.isArray(res.Results) && res.Results.length > 0) {\n const raw = res.Results[0] as AIAgentRunSubtreeCost;\n const cost = raw.TotalCost !== null && raw.TotalCost !== undefined ? Number(raw.TotalCost) : null;\n const toFiniteNum = (v: unknown): number => {\n const n = Number(v);\n return Number.isFinite(n) ? n : 0;\n };\n return {\n AgentRunID: raw.AgentRunID,\n TotalCost: cost,\n TotalPrompts: toFiniteNum(raw.TotalPrompts),\n TotalTokensInput: toFiniteNum(raw.TotalTokensInput),\n TotalTokensOutput: toFiniteNum(raw.TotalTokensOutput),\n TotalTokens: toFiniteNum(raw.TotalTokens)\n };\n }\n return null;\n }\n\n /**\n * Fetch model and vendor lookups for mapping IDs to display names.\n */\n async GetModelAndVendorLookups(): Promise<{\n models: Map<string, string>;\n modelVendors: Map<string, string>;\n vendors: Map<string, string>;\n agents: Map<string, string>;\n }> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const [modelsRes, vendorsRes, agentsRes] = await rv.RunViews([\n {\n EntityName: 'MJ: AI Models',\n Fields: ['ID', 'Name', 'VendorID'],\n MaxRows: 500,\n ResultType: 'simple'\n },\n {\n EntityName: 'MJ: AI Vendors',\n Fields: ['ID', 'Name'],\n MaxRows: 500,\n ResultType: 'simple'\n },\n {\n EntityName: 'MJ: AI Agents',\n Fields: ['ID', 'Name'],\n MaxRows: 500,\n ResultType: 'simple'\n }\n ]);\n const models = new Map<string, string>();\n const modelVendors = new Map<string, string>();\n const vendors = new Map<string, string>();\n const agents = new Map<string, string>();\n\n for (const m of this.resultRows<{ ID: string; Name: string; VendorID?: string | null }>(modelsRes, 'model names')) {\n if (m.ID) {\n models.set(m.ID.toLowerCase(), m.Name);\n if (m.VendorID) {\n modelVendors.set(m.ID.toLowerCase(), m.VendorID);\n }\n }\n }\n for (const v of this.resultRows<{ ID: string; Name: string }>(vendorsRes, 'vendor names')) {\n if (v.ID) {\n vendors.set(v.ID.toLowerCase(), v.Name);\n }\n }\n for (const a of this.resultRows<{ ID: string; Name: string }>(agentsRes, 'agent names')) {\n if (a.ID) {\n agents.set(a.ID.toLowerCase(), a.Name);\n }\n }\n return { models, modelVendors, vendors, agents };\n }\n\n /**\n * Fetch active realtime model pricing rates and compute currency-per-token divisors.\n */\n async GetCacheRates(): Promise<Map<string, CacheRate>> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const [rateResult, unitTypeResult] = await rv.RunViews([\n {\n EntityName: 'MJ: AI Model Costs',\n ExtraFilter: `Status='Active' AND ProcessingType='Realtime'`,\n Fields: ['ModelID', 'VendorID', 'InputPricePerUnit', 'OutputPricePerUnit', 'CacheReadPricePerUnit', 'CacheWritePricePerUnit', 'UnitTypeID'],\n ResultType: 'simple'\n },\n {\n EntityName: 'MJ: AI Model Price Unit Types',\n Fields: ['ID', 'DriverClass'],\n ResultType: 'simple'\n }\n ]);\n\n // A failed unit-type view is NOT the same as \"these rows are unpriceable\". Without the driver\n // classes every rate row falls into the `continue` below, and cache savings render as a\n // confident 0 instead of an error — the figure most likely to be believed. Say so rather than\n // let the empty map speak for it.\n if (unitTypeResult && !unitTypeResult.Success) {\n console.error('AI analytics: price unit types failed to load; cache-savings figures will read 0. ' +\n unitTypeResult.ErrorMessage);\n }\n\n const cacheRates = new Map<string, CacheRate>();\n const unitTypes = this.resultRows<{ ID: string; DriverClass: string | null }>(unitTypeResult, 'price unit types');\n const driverClassByUnitType = new Map<string, string>(\n unitTypes.filter(u => u.DriverClass).map(u => [NormalizeUUID(u.ID), u.DriverClass!])\n );\n const rows = this.resultRows<{\n ModelID: string | null;\n VendorID: string | null;\n InputPricePerUnit: number | null;\n OutputPricePerUnit: number | null;\n CacheReadPricePerUnit: number | null;\n CacheWritePricePerUnit: number | null;\n UnitTypeID: string | null;\n }>(rateResult, 'model cost rates');\n\n for (const row of rows) {\n const unitTypeId = row.UnitTypeID !== null && row.UnitTypeID !== undefined ? row.UnitTypeID : '';\n const driverClass = driverClassByUnitType.get(NormalizeUUID(unitTypeId));\n const divisor = driverClass ? TOKEN_PRICE_UNIT_TYPE_DIVISORS[driverClass] : undefined;\n if (divisor === undefined) {\n continue;\n }\n const inputP = typeof row.InputPricePerUnit === 'number' ? row.InputPricePerUnit : 0;\n const readP = typeof row.CacheReadPricePerUnit === 'number' ? row.CacheReadPricePerUnit : inputP;\n const writeP = typeof row.CacheWritePricePerUnit === 'number' ? row.CacheWritePricePerUnit : inputP;\n const inputRate = inputP / divisor;\n const cacheReadRate = readP / divisor;\n const cacheWriteRate = writeP / divisor;\n const modelId = row.ModelID !== null && row.ModelID !== undefined ? row.ModelID : '';\n const vendorId = row.VendorID !== null && row.VendorID !== undefined ? row.VendorID : '';\n const key = `${NormalizeUUID(modelId)}|${NormalizeUUID(vendorId)}`;\n cacheRates.set(key, { InputRate: inputRate, CacheReadRate: cacheReadRate, CacheWriteRate: cacheWriteRate });\n }\n return cacheRates;\n }\n}\n"]}
1
+ {"version":3,"file":"ai-instrumentation.service.js","sourceRoot":"","sources":["../../../src/AI/services/ai-instrumentation.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAuD,MAAM,sBAAsB,CAAC;AAC9G,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAGhF,OAAO,EAML,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;;AAEtC,OAAO,EAWL,gBAAgB,EAEjB,CAAC;AAEF;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,QAA2B;IACrD,OAAO,UAAU,IAAI,QAAQ,IAAI,OAAO,QAAQ,CAAC,QAAQ,KAAK,UAAU;WACnE,YAAY,IAAI,QAAQ,IAAI,OAAO,QAAQ,CAAC,UAAU,KAAK,UAAU,CAAC;AAC7E,CAAC;AAED,+FAA+F;AAC/F,MAAM,0BAA0B,GAAG,CAAC,CAAC;AACrC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AM,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;YACnC,MAAM,aAAa,GAAG,KAAK,GAAG,OAAO,CAAC;YACtC,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;YACxC,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,KAAK,IAAI,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACrF,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,KAAK,IAAI,IAAI,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;YACzF,MAAM,GAAG,GAAG,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnE,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC,CAAC;QAC9G,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;kHA1lBU,wBAAwB;gEAAxB,wBAAwB,WAAxB,wBAAwB,mBAFvB,MAAM;;iFAEP,wBAAwB;cAHpC,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject, from, combineLatest, of } from 'rxjs';\nimport { switchMap, shareReplay, tap, map, catchError } from 'rxjs/operators';\nimport { RunView, RunQuery, IMetadataProvider, IRunQueryProvider, RunViewResult } from '@memberjunction/core';\nimport { NormalizeUUID } from '@memberjunction/global';\nimport { TOKEN_PRICE_UNIT_TYPE_DIVISORS } from '@memberjunction/ai-engine-base';\nimport { CacheRate } from './cache-metrics';\nimport { AIUsageCoverage, AIUsageHourlyRow, AIUsageDailyRow, AIUsageByModelRow, AIAgentRunSubtreeCost } from './ai-usage-analytics.types';\nimport {\n DashboardKPIs,\n TrendData,\n LiveExecution,\n LiveExecutionStatus,\n CostInputRow,\n ComputeTotalCost,\n ComputeKPIs,\n ComputeTrends,\n ComputeLiveExecutions,\n ComputeCostByModel,\n ComputePerformanceMatrix,\n ComputeTokenEfficiency,\n CountActiveExecutions,\n ResolveCostCurrency\n} from './ai-usage-analytics.compute';\n\nexport {\n DashboardKPIs,\n TrendData,\n LiveExecution,\n LiveExecutionStatus,\n AIUsageCoverage,\n AIUsageHourlyRow,\n AIUsageDailyRow,\n AIUsageByModelRow,\n AIAgentRunSubtreeCost,\n CostInputRow,\n ComputeTotalCost,\n CacheRate\n};\n\n/**\n * True when a metadata provider can also run saved queries. At runtime MJ's providers (ProviderBase\n * subclasses) implement both interfaces, but IMetadataProvider does not extend IRunQueryProvider, so\n * this is checked rather than asserted — a provider that cannot run queries fails loudly here\n * instead of at the first RunQuery call.\n */\nfunction IsRunQueryProvider(provider: IMetadataProvider): provider is IMetadataProvider & IRunQueryProvider {\n return 'RunQuery' in provider && typeof provider.RunQuery === 'function'\n && 'RunQueries' in provider && typeof provider.RunQueries === 'function';\n}\n\n/** How deep an execution drill-down follows child runs, and how many it will load in total. */\nconst EXECUTION_DETAIL_MAX_DEPTH = 4;\nconst EXECUTION_DETAIL_MAX_NODES = 200;\n\n/**\n * Lightweight record types for live run monitoring and execution drill-down.\n * We use ResultType: 'simple' with explicit Fields and MaxRows bounds\n * to avoid unbounded reads and large payload transfers.\n */\nexport interface PromptRunRecord {\n ID: string;\n RunAt: string;\n CompletedAt: string | null;\n Success: boolean;\n Cost: number | null;\n TokensUsed: number | null;\n TokensPrompt: number | null;\n TokensCompletion: number | null;\n TokensCacheRead: number | null;\n TokensCacheWrite: number | null;\n ExecutionTimeMS: number | null;\n ModelID: string | null;\n Model: string | null;\n AgentID: string | null;\n Agent: string | null;\n Prompt: string | null;\n ErrorMessage: string | null;\n}\n\nexport interface AgentRunRecord {\n ID: string;\n StartedAt: string;\n CompletedAt: string | null;\n Status: string;\n Success: boolean;\n TotalCost: number | null;\n TotalTokensUsed: number | null;\n AgentID: string | null;\n Agent: string | null;\n ErrorMessage: string | null;\n}\n\n/** Fields to request for prompt runs — only what is needed for drilldown and live monitoring */\nexport const PROMPT_RUN_FIELDS = [\n 'ID', 'RunAt', 'CompletedAt', 'Success', 'Cost', 'TokensUsed',\n 'TokensPrompt', 'TokensCompletion', 'TokensCacheRead', 'TokensCacheWrite', 'ExecutionTimeMS',\n 'ModelID', 'Model', 'AgentID', 'Agent', 'Prompt', 'ErrorMessage'\n];\n\n/** Fields to request for agent runs — only what is needed for drilldown and live monitoring */\nexport const AGENT_RUN_FIELDS = [\n 'ID', 'StartedAt', 'CompletedAt', 'Status', 'Success',\n 'TotalCost', 'TotalTokensUsed', 'AgentID', 'Agent', 'ErrorMessage'\n];\n\nexport interface ExecutionDetails {\n id: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n type: 'prompt' | 'agent'; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n name: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n status: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n startTime: Date; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n endTime?: Date; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n cost: number | null; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n tokens: number; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n success: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n errorMessage?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n parentId?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n children: ExecutionDetails[]; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n model?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n vendor?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n}\n\nexport interface ChartData {\n executionTrends: TrendData[]; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n costByModel: { model: string; cost: number | null; tokens: number }[]; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n performanceMatrix: { agent: string; model: string; avgTime: number; successRate: number; FailedRuns: number }[]; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n tokenEfficiency: { inputTokens: number; outputTokens: number; cost: number | null; model: string }[]; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n}\n\n/** Internal shape for the single data load that all derived streams share */\ninterface DashboardRawData {\n hourlyRows: AIUsageHourlyRow[];\n livePromptRuns: PromptRunRecord[];\n liveAgentRuns: AgentRunRecord[];\n modelNames: Map<string, string>;\n agentNames: Map<string, string>;\n start: Date;\n end: Date;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AIInstrumentationService {\n private _provider: IMetadataProvider | null = null;\n\n /** Set the metadata provider this service should use. Components should call this after injection. */\n public set Provider(value: IMetadataProvider | null) {\n this._provider = value;\n }\n\n public get Provider(): IMetadataProvider {\n if (this._provider) {\n return this._provider;\n }\n throw new Error('AIInstrumentationService: MetadataProvider must be set before use');\n }\n\n public get ProviderToUse(): IMetadataProvider {\n return this.Provider;\n }\n\n public get RunQueryToUse(): IRunQueryProvider {\n const provider = this.ProviderToUse;\n if (IsRunQueryProvider(provider)) {\n return provider;\n }\n throw new Error('AIInstrumentationService: the configured MetadataProvider cannot run queries');\n }\n\n private readonly _dateRange$ = new BehaviorSubject<{ start: Date; end: Date }>({\n start: new Date(Date.now() - 24 * 60 * 60 * 1000), // Last 24 hours\n end: new Date()\n });\n\n private readonly _refreshTrigger$ = new BehaviorSubject<number>(0);\n private readonly _isLoading$ = new BehaviorSubject<boolean>(false);\n\n // Expose loading state as observable\n readonly IsLoading$ = this._isLoading$.asObservable();\n\n /** @deprecated Use {@link IsLoading$}. */\n get isLoading$() {\n return this.IsLoading$;\n }\n\n constructor() {}\n\n /**\n * Single data load: fetches aggregated hourly facts via RunQuery and\n * live runs via bounded RunViews once per refresh or date-range change.\n *\n * A failed load is contained INSIDE the switchMap. Left to reach shareReplay, one rejected load\n * (a transient network blip, a RunQuery 500) terminates the shared subject for the life of this\n * root-provided service: every derived stream replays the error, Refresh() and SetDateRange()\n * push into a combineLatest nobody is subscribed to any more, and IsLoading$ sticks at true.\n */\n private readonly rawData$ = combineLatest([this._refreshTrigger$, this._dateRange$]).pipe(\n tap(() => this._isLoading$.next(true)),\n switchMap(([, range]) => from(this.loadAllData()).pipe(\n catchError((error: unknown) => {\n console.error('AI analytics: dashboard data failed to load; showing an empty period until the next refresh.', error);\n return of(this.emptyRawData(range.start, range.end));\n })\n )),\n tap(() => this._isLoading$.next(false)),\n shareReplay(1)\n );\n\n // Derived streams — pure in-memory transforms via ai-usage-analytics.compute.ts\n readonly Kpis$ = this.rawData$.pipe(\n map(data => {\n const activeExecutions = CountActiveExecutions(data.livePromptRuns, data.liveAgentRuns);\n return ComputeKPIs(data.hourlyRows, activeExecutions, data.modelNames, data.agentNames);\n }),\n shareReplay(1)\n );\n\n /** @deprecated Use {@link Kpis$}. */\n get kpis$() {\n return this.Kpis$;\n }\n\n readonly Trends$ = this.rawData$.pipe(\n map(data => ComputeTrends(data.hourlyRows, data.start, data.end, ResolveCostCurrency(data.hourlyRows).Currency)),\n shareReplay(1)\n );\n\n /** @deprecated Use {@link Trends$}. */\n get trends$() {\n return this.Trends$;\n }\n\n readonly LiveExecutions$ = this.rawData$.pipe(\n map(data => ComputeLiveExecutions(data.livePromptRuns, data.liveAgentRuns)),\n shareReplay(1)\n );\n\n /** @deprecated Use {@link LiveExecutions$}. */\n get liveExecutions$() {\n return this.LiveExecutions$;\n }\n\n readonly ChartData$ = combineLatest([this.rawData$, this.Trends$]).pipe(\n map(([data, executionTrends]) => {\n // One currency for every cost on the page — the same one the KPIs report in.\n const currency = ResolveCostCurrency(data.hourlyRows).Currency;\n return {\n executionTrends,\n costByModel: ComputeCostByModel(data.hourlyRows, data.modelNames, currency),\n performanceMatrix: ComputePerformanceMatrix(data.hourlyRows, data.modelNames, data.agentNames),\n tokenEfficiency: ComputeTokenEfficiency(data.hourlyRows, data.modelNames, currency)\n };\n }),\n shareReplay(1)\n );\n\n /** @deprecated Use {@link ChartData$}. */\n get chartData$() {\n return this.ChartData$;\n }\n\n SetDateRange(start: Date, end: Date): void {\n this._dateRange$.next({ start, end });\n }\n\n /** @deprecated Use {@link SetDateRange}. */\n setDateRange(start: Date, end: Date): void {\n return this.SetDateRange(start, end);\n }\n\n Refresh(): void {\n this._refreshTrigger$.next(this._refreshTrigger$.value + 1);\n }\n\n /** @deprecated Use {@link Refresh}. */\n refresh(): void {\n return this.Refresh();\n }\n\n /**\n * Single batch query that loads all data needed by every dashboard widget.\n * AIUsageHourly runs through RunQuery.\n * Live runs and dimension names are loaded with explicit MaxRows bounds.\n */\n private async loadAllData(): Promise<DashboardRawData> {\n const { start, end } = this._dateRange$.value;\n const now = new Date();\n const recentTime = new Date(now.getTime() - 5 * 60 * 1000);\n\n const rq = new RunQuery(this.RunQueryToUse);\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n\n const [queryResult, rvResults] = await Promise.all([\n rq.RunQuery({\n QueryName: 'AIUsageHourly',\n CategoryPath: '/MJ/AI/',\n Parameters: {\n start: start.toISOString(),\n end: end.toISOString()\n }\n }),\n rv.RunViews<PromptRunRecord | AgentRunRecord | { ID: string; Name: string }>([\n {\n EntityName: 'MJ: AI Prompt Runs',\n ExtraFilter: `RunAt >= '${recentTime.toISOString()}'`,\n OrderBy: 'RunAt DESC',\n Fields: PROMPT_RUN_FIELDS,\n ResultType: 'simple',\n MaxRows: 50\n },\n {\n EntityName: 'MJ: AI Agent Runs',\n ExtraFilter: `StartedAt >= '${recentTime.toISOString()}'`,\n OrderBy: 'StartedAt DESC',\n Fields: AGENT_RUN_FIELDS,\n ResultType: 'simple',\n MaxRows: 50\n },\n {\n EntityName: 'MJ: AI Models',\n Fields: ['ID', 'Name'],\n ResultType: 'simple',\n MaxRows: 500\n },\n {\n EntityName: 'MJ: AI Agents',\n Fields: ['ID', 'Name'],\n ResultType: 'simple',\n MaxRows: 500\n }\n ])\n ]);\n\n if (!queryResult.Success) {\n // A failed aggregate read is not an empty period. Say so rather than let every KPI read zero.\n console.error(`AI analytics: AIUsageHourly failed to load; usage figures will be empty. ${queryResult.ErrorMessage}`);\n }\n const hourlyRows = (queryResult.Success && Array.isArray(queryResult.Results) ? queryResult.Results : []) as AIUsageHourlyRow[];\n\n const livePromptRuns = this.resultRows<PromptRunRecord>(rvResults[0], 'live prompt runs');\n const liveAgentRuns = this.resultRows<AgentRunRecord>(rvResults[1], 'live agent runs');\n\n const modelNames = new Map<string, string>();\n for (const m of this.resultRows<{ ID: string; Name: string }>(rvResults[2], 'model names')) {\n if (m && m.ID && m.Name) {\n modelNames.set(m.ID, m.Name);\n }\n }\n\n const agentNames = new Map<string, string>();\n for (const a of this.resultRows<{ ID: string; Name: string }>(rvResults[3], 'agent names')) {\n if (a && a.ID && a.Name) {\n agentNames.set(a.ID, a.Name);\n }\n }\n\n return {\n hourlyRows,\n livePromptRuns,\n liveAgentRuns,\n modelNames,\n agentNames,\n start,\n end\n };\n }\n\n /** The payload a failed load degrades to: an empty period over the requested range. */\n private emptyRawData(start: Date, end: Date): DashboardRawData {\n return {\n hourlyRows: [],\n livePromptRuns: [],\n liveAgentRuns: [],\n modelNames: new Map<string, string>(),\n agentNames: new Map<string, string>(),\n start,\n end\n };\n }\n\n /**\n * The rows of a RunView result, logging when the view FAILED. A failed view and an empty one both\n * yield no rows, but only the empty one means \"nothing there\" — without the log, a failure reads\n * as a confident zero on whatever figure the rows feed.\n */\n private resultRows<T>(result: RunViewResult<unknown> | undefined, what: string): T[] {\n if (!result) {\n console.error(`AI analytics: no result returned for ${what}`);\n return [];\n }\n if (!result.Success) {\n console.error(`AI analytics: ${what} failed to load. ${result.ErrorMessage}`);\n return [];\n }\n return (Array.isArray(result.Results) ? result.Results : []) as T[];\n }\n\n // ─── Execution Details (on-demand, not part of initial load) ──────\n\n async GetExecutionDetails(executionId: string, type: 'prompt' | 'agent'): Promise<ExecutionDetails | null> {\n try {\n const budget = { visited: new Set<string>(), remaining: EXECUTION_DETAIL_MAX_NODES };\n if (type === 'prompt') {\n return await this.getPromptExecutionDetails(executionId, 0, budget);\n } else {\n return await this.getAgentExecutionDetails(executionId, 0, budget);\n }\n } catch (error) {\n console.error('Error loading execution details:', error);\n return null;\n }\n }\n\n /** @deprecated Use {@link GetExecutionDetails}. */\n async getExecutionDetails(executionId: string, type: 'prompt' | 'agent'): Promise<ExecutionDetails | null> {\n return this.GetExecutionDetails(executionId, type);\n }\n\n /**\n * Claims a node for the drill-down: false when it was already visited (a ParentID cycle) or the\n * total node budget is spent. Bounded because each node costs a RunViews round trip and children\n * fan out — an uncapped 3-level tree of 20 children each is thousands of requests from one click.\n */\n private claimDetailNode(id: string, budget: { visited: Set<string>; remaining: number }): boolean {\n const key = NormalizeUUID(id);\n if (budget.visited.has(key) || budget.remaining <= 0) {\n return false;\n }\n budget.visited.add(key);\n budget.remaining--;\n return true;\n }\n\n private async getPromptExecutionDetails(\n promptRunId: string,\n depth: number,\n budget: { visited: Set<string>; remaining: number }\n ): Promise<ExecutionDetails> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const loadChildren = depth < EXECUTION_DETAIL_MAX_DEPTH;\n const [result, childrenResult] = await rv.RunViews<PromptRunRecord>([\n {\n EntityName: 'MJ: AI Prompt Runs',\n ExtraFilter: `ID = '${promptRunId}'`,\n Fields: PROMPT_RUN_FIELDS,\n ResultType: 'simple',\n MaxRows: 1,\n SkipTotalRowCount: true\n },\n ...(loadChildren ? [{\n EntityName: 'MJ: AI Prompt Runs',\n ExtraFilter: `ParentID = '${promptRunId}'`,\n Fields: PROMPT_RUN_FIELDS,\n ResultType: 'simple' as const,\n MaxRows: 100\n }] : [])\n ]);\n\n const run = this.resultRows<PromptRunRecord>(result, 'prompt run detail')[0];\n if (!run) throw new Error('Prompt run not found');\n\n const childrenList = loadChildren ? this.resultRows<PromptRunRecord>(childrenResult, 'prompt run children') : [];\n const children = await Promise.all(\n childrenList\n .filter(child => this.claimDetailNode(child.ID, budget))\n .map(child => this.getPromptExecutionDetails(child.ID, depth + 1, budget))\n );\n\n const costVal = run.Cost !== null && run.Cost !== undefined ? run.Cost : null;\n const tokensVal = typeof run.TokensUsed === 'number' ? run.TokensUsed : 0;\n const promptName = run.Prompt ? run.Prompt : 'Unnamed Prompt';\n const statusStr = run.Success ? 'completed' : 'failed';\n const errMsg = run.ErrorMessage ? run.ErrorMessage : undefined;\n const modelStr = run.Model ? run.Model : undefined;\n\n return {\n id: run.ID,\n type: 'prompt',\n name: promptName,\n status: statusStr,\n startTime: new Date(run.RunAt),\n endTime: run.CompletedAt ? new Date(run.CompletedAt) : undefined,\n cost: costVal,\n tokens: tokensVal,\n success: run.Success ? true : false,\n errorMessage: errMsg,\n children,\n model: modelStr\n };\n }\n\n private async getAgentExecutionDetails(\n agentRunId: string,\n depth: number,\n budget: { visited: Set<string>; remaining: number }\n ): Promise<ExecutionDetails> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const loadChildren = depth < EXECUTION_DETAIL_MAX_DEPTH;\n const [result, childrenResult] = await rv.RunViews<AgentRunRecord>([\n {\n EntityName: 'MJ: AI Agent Runs',\n ExtraFilter: `ID = '${agentRunId}'`,\n Fields: AGENT_RUN_FIELDS,\n ResultType: 'simple',\n MaxRows: 1,\n SkipTotalRowCount: true\n },\n ...(loadChildren ? [{\n EntityName: 'MJ: AI Agent Runs',\n ExtraFilter: `ParentRunID = '${agentRunId}'`,\n Fields: AGENT_RUN_FIELDS,\n ResultType: 'simple' as const,\n MaxRows: 100\n }] : [])\n ]);\n\n const run = this.resultRows<AgentRunRecord>(result, 'agent run detail')[0];\n if (!run) throw new Error('Agent run not found');\n\n const childrenList = loadChildren ? this.resultRows<AgentRunRecord>(childrenResult, 'agent run children') : [];\n const children = await Promise.all(\n childrenList\n .filter(child => this.claimDetailNode(child.ID, budget))\n .map(child => this.getAgentExecutionDetails(child.ID, depth + 1, budget))\n );\n\n const costVal = run.TotalCost !== null && run.TotalCost !== undefined ? run.TotalCost : null;\n const tokensVal = typeof run.TotalTokensUsed === 'number' ? run.TotalTokensUsed : 0;\n const agentName = run.Agent ? run.Agent : 'Unnamed Agent';\n const statusStr = run.Status ? run.Status.toLowerCase() : 'unknown';\n const errMsg = run.ErrorMessage ? run.ErrorMessage : undefined;\n\n return {\n id: run.ID,\n type: 'agent',\n name: agentName,\n status: statusStr,\n startTime: new Date(run.StartedAt),\n endTime: run.CompletedAt ? new Date(run.CompletedAt) : undefined,\n cost: costVal,\n tokens: tokensVal,\n success: run.Success ? true : false,\n errorMessage: errMsg,\n parentId: undefined,\n children\n };\n }\n\n /**\n * Runs one of the AI usage aggregate queries, logging a failure rather than letting it read as an\n * empty (zero-usage) period.\n */\n private async runUsageQuery<T>(queryName: string, start: Date, end: Date): Promise<T[]> {\n const rq = new RunQuery(this.RunQueryToUse);\n const res = await rq.RunQuery({\n QueryName: queryName,\n CategoryPath: '/MJ/AI/',\n Parameters: {\n start: start.toISOString(),\n end: end.toISOString()\n }\n });\n if (!res.Success) {\n console.error(`AI analytics: ${queryName} failed to load. ${res.ErrorMessage}`);\n return [];\n }\n return (Array.isArray(res.Results) ? res.Results : []) as T[];\n }\n\n /**\n * Fetch hourly aggregate usage for a date range via stored query AIUsageHourly.\n */\n async GetUsageHourly(start: Date, end: Date): Promise<AIUsageHourlyRow[]> {\n return this.runUsageQuery<AIUsageHourlyRow>('AIUsageHourly', start, end);\n }\n\n /**\n * Fetch daily aggregate usage for a date range via stored query AIUsageDaily.\n */\n async GetUsageDaily(start: Date, end: Date): Promise<AIUsageDailyRow[]> {\n return this.runUsageQuery<AIUsageDailyRow>('AIUsageDaily', start, end);\n }\n\n /**\n * Fetch model-level aggregate usage for a date range via stored query AIUsageByModel.\n */\n async GetUsageByModel(start: Date, end: Date): Promise<AIUsageByModelRow[]> {\n return this.runUsageQuery<AIUsageByModelRow>('AIUsageByModel', start, end);\n }\n\n /**\n * Calculate recursive subtree cost and token metrics for an agent run via CalculateRunCost.\n */\n async CalculateAgentRunCost(agentRunId: string): Promise<AIAgentRunSubtreeCost | null> {\n const rq = new RunQuery(this.RunQueryToUse);\n const res = await rq.RunQuery({\n QueryName: 'CalculateRunCost',\n CategoryPath: '/MJ/AI/Agents/',\n Parameters: {\n AIAgentRunID: agentRunId,\n AgentRunID: agentRunId\n }\n });\n if (!res.Success) {\n console.error(`AI analytics: CalculateRunCost failed for agent run ${agentRunId}. ${res.ErrorMessage}`);\n return null;\n }\n if (Array.isArray(res.Results) && res.Results.length > 0) {\n const raw = res.Results[0] as AIAgentRunSubtreeCost;\n const cost = raw.TotalCost !== null && raw.TotalCost !== undefined ? Number(raw.TotalCost) : null;\n const toFiniteNum = (v: unknown): number => {\n const n = Number(v);\n return Number.isFinite(n) ? n : 0;\n };\n return {\n AgentRunID: raw.AgentRunID,\n TotalCost: cost,\n TotalPrompts: toFiniteNum(raw.TotalPrompts),\n TotalTokensInput: toFiniteNum(raw.TotalTokensInput),\n TotalTokensOutput: toFiniteNum(raw.TotalTokensOutput),\n TotalTokens: toFiniteNum(raw.TotalTokens)\n };\n }\n return null;\n }\n\n /**\n * Fetch model and vendor lookups for mapping IDs to display names.\n */\n async GetModelAndVendorLookups(): Promise<{\n models: Map<string, string>;\n modelVendors: Map<string, string>;\n vendors: Map<string, string>;\n agents: Map<string, string>;\n }> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const [modelsRes, vendorsRes, agentsRes] = await rv.RunViews([\n {\n EntityName: 'MJ: AI Models',\n Fields: ['ID', 'Name', 'VendorID'],\n MaxRows: 500,\n ResultType: 'simple'\n },\n {\n EntityName: 'MJ: AI Vendors',\n Fields: ['ID', 'Name'],\n MaxRows: 500,\n ResultType: 'simple'\n },\n {\n EntityName: 'MJ: AI Agents',\n Fields: ['ID', 'Name'],\n MaxRows: 500,\n ResultType: 'simple'\n }\n ]);\n const models = new Map<string, string>();\n const modelVendors = new Map<string, string>();\n const vendors = new Map<string, string>();\n const agents = new Map<string, string>();\n\n for (const m of this.resultRows<{ ID: string; Name: string; VendorID?: string | null }>(modelsRes, 'model names')) {\n if (m.ID) {\n models.set(m.ID.toLowerCase(), m.Name);\n if (m.VendorID) {\n modelVendors.set(m.ID.toLowerCase(), m.VendorID);\n }\n }\n }\n for (const v of this.resultRows<{ ID: string; Name: string }>(vendorsRes, 'vendor names')) {\n if (v.ID) {\n vendors.set(v.ID.toLowerCase(), v.Name);\n }\n }\n for (const a of this.resultRows<{ ID: string; Name: string }>(agentsRes, 'agent names')) {\n if (a.ID) {\n agents.set(a.ID.toLowerCase(), a.Name);\n }\n }\n return { models, modelVendors, vendors, agents };\n }\n\n /**\n * Fetch active realtime model pricing rates and compute currency-per-token divisors.\n */\n async GetCacheRates(): Promise<Map<string, CacheRate>> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const [rateResult, unitTypeResult] = await rv.RunViews([\n {\n EntityName: 'MJ: AI Model Costs',\n ExtraFilter: `Status='Active' AND ProcessingType='Realtime'`,\n Fields: ['ModelID', 'VendorID', 'InputPricePerUnit', 'OutputPricePerUnit', 'CacheReadPricePerUnit', 'CacheWritePricePerUnit', 'UnitTypeID'],\n ResultType: 'simple'\n },\n {\n EntityName: 'MJ: AI Model Price Unit Types',\n Fields: ['ID', 'DriverClass'],\n ResultType: 'simple'\n }\n ]);\n\n // A failed unit-type view is NOT the same as \"these rows are unpriceable\". Without the driver\n // classes every rate row falls into the `continue` below, and cache savings render as a\n // confident 0 instead of an error — the figure most likely to be believed. Say so rather than\n // let the empty map speak for it.\n if (unitTypeResult && !unitTypeResult.Success) {\n console.error('AI analytics: price unit types failed to load; cache-savings figures will read 0. ' +\n unitTypeResult.ErrorMessage);\n }\n\n const cacheRates = new Map<string, CacheRate>();\n const unitTypes = this.resultRows<{ ID: string; DriverClass: string | null }>(unitTypeResult, 'price unit types');\n const driverClassByUnitType = new Map<string, string>(\n unitTypes.filter(u => u.DriverClass).map(u => [NormalizeUUID(u.ID), u.DriverClass!])\n );\n const rows = this.resultRows<{\n ModelID: string | null;\n VendorID: string | null;\n InputPricePerUnit: number | null;\n OutputPricePerUnit: number | null;\n CacheReadPricePerUnit: number | null;\n CacheWritePricePerUnit: number | null;\n UnitTypeID: string | null;\n }>(rateResult, 'model cost rates');\n\n for (const row of rows) {\n const unitTypeId = row.UnitTypeID !== null && row.UnitTypeID !== undefined ? row.UnitTypeID : '';\n const driverClass = driverClassByUnitType.get(NormalizeUUID(unitTypeId));\n const divisor = driverClass ? TOKEN_PRICE_UNIT_TYPE_DIVISORS[driverClass] : undefined;\n if (divisor === undefined) {\n continue;\n }\n const inputP = typeof row.InputPricePerUnit === 'number' ? row.InputPricePerUnit : 0;\n const readP = typeof row.CacheReadPricePerUnit === 'number' ? row.CacheReadPricePerUnit : inputP;\n const writeP = typeof row.CacheWritePricePerUnit === 'number' ? row.CacheWritePricePerUnit : inputP;\n const inputRate = inputP / divisor;\n const cacheReadRate = readP / divisor;\n const cacheWriteRate = writeP / divisor;\n const modelId = row.ModelID !== null && row.ModelID !== undefined ? row.ModelID : '';\n const vendorId = row.VendorID !== null && row.VendorID !== undefined ? row.VendorID : '';\n const key = `${NormalizeUUID(modelId)}|${NormalizeUUID(vendorId)}`;\n cacheRates.set(key, { InputRate: inputRate, CacheReadRate: cacheReadRate, CacheWriteRate: cacheWriteRate });\n }\n return cacheRates;\n }\n}\n"]}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * @fileoverview One place that decides what an `ActionExecutionLog.ResultCode` MEANS.
3
+ *
4
+ * ## Why this exists
5
+ *
6
+ * `ResultCode` is free text: the column has no CHECK constraint, and the value is whatever
7
+ * the executing runtime wrote. The Runtime action executor emits UPPER_SNAKE codes
8
+ * (`SUCCESS`, `RUNTIME_ERROR`, `TIMEOUT`, `NOT_APPROVED`, … — see
9
+ * `packages/Actions/Runtime/src/types.ts`, passed through verbatim by `ActionEngine`), while
10
+ * older/custom actions wrote Title Case (`Success`, `Failed`, `Error`).
11
+ *
12
+ * Every dashboard then invented its own comparison:
13
+ *
14
+ * - the Execution Monitor compared `=== 'Success'` and `['Failed','Error']` — so on a
15
+ * database of `SUCCESS` rows it reported **0 % (0/181)**…
16
+ * - …while its own `getResultColor` / `getResultIcon` lowercased first, which is why 181
17
+ * green rows rendered directly beneath that 0 % tile;
18
+ * - the Actions Overview lowercased and accepted `success|ok|completed|200`, which is why
19
+ * *its* success rate was the believable one;
20
+ * - the Action Card looked codes up in `MJ: Action Result Codes.IsSuccess` and fell back to
21
+ * a third, narrower heuristic.
22
+ *
23
+ * Four vocabularies, one column. This module is the single one.
24
+ *
25
+ * ## How classification works
26
+ *
27
+ * The code is normalised (trimmed, upper-cased, separators folded to `_`) and then matched
28
+ * by SHAPE rather than against a copied list of the runtime's constants. That is deliberate:
29
+ * this package does not depend on `@memberjunction/action-runtime`, so a copied list would
30
+ * silently drift the first time a new failure code is added upstream. Every failure code the
31
+ * runtime can emit contains one of the failure markers below, and the test file pins that
32
+ * claim against the actual constant list.
33
+ *
34
+ * `'unknown'` is a real answer, not a bucket for laziness: a code this module does not
35
+ * recognise must not be counted as a success (inflating the rate) or as a failure (inventing
36
+ * an incident). It is excluded from both numerator and denominator of the success rate.
37
+ */
38
+ /** What a result code says about the run that produced it. */
39
+ export type ActionResultClass =
40
+ /** The action completed and reported success. */
41
+ 'success'
42
+ /** The action ended without succeeding — failed, errored, refused, timed out. */
43
+ | 'failure'
44
+ /** The action had not finished when the row was written. */
45
+ | 'running'
46
+ /** Recognised as nothing: a custom code, or a code from a newer writer. */
47
+ | 'unknown';
48
+ /**
49
+ * Classify a raw `ResultCode`.
50
+ *
51
+ * Order matters: the success and running lists are exact matches checked FIRST, so a
52
+ * hypothetical `SUCCESS_NO_FAILURES` cannot be dragged into `'failure'` by a marker, and a
53
+ * genuine `NOT_SUCCESSFUL` is not dragged into `'success'` by a substring. Null, undefined
54
+ * and blank all classify as `'unknown'` — a row with no code recorded says nothing.
55
+ */
56
+ export declare function ClassifyActionResultCode(code: string | null | undefined): ActionResultClass;
57
+ /** Convenience predicate — `ClassifyActionResultCode(code) === 'success'`. */
58
+ export declare function IsActionResultSuccess(code: string | null | undefined): boolean;
59
+ /** Convenience predicate — `ClassifyActionResultCode(code) === 'failure'`. */
60
+ export declare function IsActionResultFailure(code: string | null | undefined): boolean;
61
+ /**
62
+ * Success rate over a set of coded runs, as a whole percentage.
63
+ *
64
+ * Runs whose code classifies as `'unknown'` or `'running'` are excluded from BOTH halves of
65
+ * the fraction: a run still in flight has not succeeded or failed yet, and a code we cannot
66
+ * read is not evidence either way. Counting them in the denominator is what makes a healthy
67
+ * system look broken; counting them as successes is what hides a broken one.
68
+ *
69
+ * Returns 0 when nothing in the set has settled — there is no rate to report, and 0 with an
70
+ * accompanying `0/0` detail is the honest rendering of that.
71
+ */
72
+ export declare function ActionSuccessRate(codes: readonly (string | null | undefined)[]): number;
73
+ /**
74
+ * The colour token a code should render with. Shared by the status chips and the row icons so
75
+ * a chip can never disagree with the tile that counted it.
76
+ */
77
+ export declare function ActionResultColor(code: string | null | undefined): 'success' | 'warning' | 'error' | 'info';
78
+ /** The Font Awesome class a code should render with. Paired with {@link ActionResultColor}. */
79
+ export declare function ActionResultIcon(code: string | null | undefined): string;
80
+ //# sourceMappingURL=action-result-code.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-result-code.d.ts","sourceRoot":"","sources":["../../src/Actions/action-result-code.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,8DAA8D;AAC9D,MAAM,MAAM,iBAAiB;AACzB,iDAAiD;AAC/C,SAAS;AACX,iFAAiF;GAC/E,SAAS;AACX,4DAA4D;GAC1D,SAAS;AACX,2EAA2E;GACzE,SAAS,CAAC;AAyChB;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,iBAAiB,CA2B3F;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE9E;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE9E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,CAgBvF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAO3G;AAED,+FAA+F;AAC/F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAOxE"}