@open-mercato/enterprise 0.7.1-develop.7193.1.910a5b0a1e → 0.7.1-develop.7194.1.ab4fc81f82

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 (962) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/README.md +1 -0
  3. package/dist/index.js +1 -1
  4. package/dist/index.js.map +2 -2
  5. package/dist/modules/agent_orchestrator/acl.js +132 -0
  6. package/dist/modules/agent_orchestrator/acl.js.map +7 -0
  7. package/dist/modules/agent_orchestrator/ai-agents.js +57 -0
  8. package/dist/modules/agent_orchestrator/ai-agents.js.map +7 -0
  9. package/dist/modules/agent_orchestrator/ai-skills.js +48 -0
  10. package/dist/modules/agent_orchestrator/ai-skills.js.map +7 -0
  11. package/dist/modules/agent_orchestrator/ai-tools.js +254 -0
  12. package/dist/modules/agent_orchestrator/ai-tools.js.map +7 -0
  13. package/dist/modules/agent_orchestrator/api/agents/[id]/files/route.js +69 -0
  14. package/dist/modules/agent_orchestrator/api/agents/[id]/files/route.js.map +7 -0
  15. package/dist/modules/agent_orchestrator/api/agents/[id]/metrics/route.js +81 -0
  16. package/dist/modules/agent_orchestrator/api/agents/[id]/metrics/route.js.map +7 -0
  17. package/dist/modules/agent_orchestrator/api/agents/[id]/route.js +154 -0
  18. package/dist/modules/agent_orchestrator/api/agents/[id]/route.js.map +7 -0
  19. package/dist/modules/agent_orchestrator/api/agents/[id]/run/route.js +250 -0
  20. package/dist/modules/agent_orchestrator/api/agents/[id]/run/route.js.map +7 -0
  21. package/dist/modules/agent_orchestrator/api/agents/[id]/settings/route.js +105 -0
  22. package/dist/modules/agent_orchestrator/api/agents/[id]/settings/route.js.map +7 -0
  23. package/dist/modules/agent_orchestrator/api/agents/route.js +114 -0
  24. package/dist/modules/agent_orchestrator/api/agents/route.js.map +7 -0
  25. package/dist/modules/agent_orchestrator/api/artifacts/file/[id]/route.js +64 -0
  26. package/dist/modules/agent_orchestrator/api/artifacts/file/[id]/route.js.map +7 -0
  27. package/dist/modules/agent_orchestrator/api/audit/by-instigator/[humanUserId]/route.js +105 -0
  28. package/dist/modules/agent_orchestrator/api/audit/by-instigator/[humanUserId]/route.js.map +7 -0
  29. package/dist/modules/agent_orchestrator/api/auto-approval/settings/route.js +110 -0
  30. package/dist/modules/agent_orchestrator/api/auto-approval/settings/route.js.map +7 -0
  31. package/dist/modules/agent_orchestrator/api/context-bundles/route.js +88 -0
  32. package/dist/modules/agent_orchestrator/api/context-bundles/route.js.map +7 -0
  33. package/dist/modules/agent_orchestrator/api/corrections/route.js +101 -0
  34. package/dist/modules/agent_orchestrator/api/corrections/route.js.map +7 -0
  35. package/dist/modules/agent_orchestrator/api/eval-assertions/preview/route.js +98 -0
  36. package/dist/modules/agent_orchestrator/api/eval-assertions/preview/route.js.map +7 -0
  37. package/dist/modules/agent_orchestrator/api/eval-assertions/route.js +196 -0
  38. package/dist/modules/agent_orchestrator/api/eval-assertions/route.js.map +7 -0
  39. package/dist/modules/agent_orchestrator/api/eval-cases/[id]/approve/route.js +86 -0
  40. package/dist/modules/agent_orchestrator/api/eval-cases/[id]/approve/route.js.map +7 -0
  41. package/dist/modules/agent_orchestrator/api/eval-cases/[id]/archive/route.js +85 -0
  42. package/dist/modules/agent_orchestrator/api/eval-cases/[id]/archive/route.js.map +7 -0
  43. package/dist/modules/agent_orchestrator/api/eval-cases/[id]/route.js +67 -0
  44. package/dist/modules/agent_orchestrator/api/eval-cases/[id]/route.js.map +7 -0
  45. package/dist/modules/agent_orchestrator/api/eval-cases/export/route.js +78 -0
  46. package/dist/modules/agent_orchestrator/api/eval-cases/export/route.js.map +7 -0
  47. package/dist/modules/agent_orchestrator/api/eval-cases/route.js +140 -0
  48. package/dist/modules/agent_orchestrator/api/eval-cases/route.js.map +7 -0
  49. package/dist/modules/agent_orchestrator/api/eval-runs/[id]/cancel/route.js +67 -0
  50. package/dist/modules/agent_orchestrator/api/eval-runs/[id]/cancel/route.js.map +7 -0
  51. package/dist/modules/agent_orchestrator/api/eval-runs/[id]/case-runs/[caseRunId]/results/route.js +66 -0
  52. package/dist/modules/agent_orchestrator/api/eval-runs/[id]/case-runs/[caseRunId]/results/route.js.map +7 -0
  53. package/dist/modules/agent_orchestrator/api/eval-runs/[id]/route.js +111 -0
  54. package/dist/modules/agent_orchestrator/api/eval-runs/[id]/route.js.map +7 -0
  55. package/dist/modules/agent_orchestrator/api/eval-runs/route.js +157 -0
  56. package/dist/modules/agent_orchestrator/api/eval-runs/route.js.map +7 -0
  57. package/dist/modules/agent_orchestrator/api/eval-scorers/route.js +34 -0
  58. package/dist/modules/agent_orchestrator/api/eval-scorers/route.js.map +7 -0
  59. package/dist/modules/agent_orchestrator/api/executions/[id]/route.js +72 -0
  60. package/dist/modules/agent_orchestrator/api/executions/[id]/route.js.map +7 -0
  61. package/dist/modules/agent_orchestrator/api/executions/route.js +185 -0
  62. package/dist/modules/agent_orchestrator/api/executions/route.js.map +7 -0
  63. package/dist/modules/agent_orchestrator/api/features/route.js +61 -0
  64. package/dist/modules/agent_orchestrator/api/features/route.js.map +7 -0
  65. package/dist/modules/agent_orchestrator/api/guardrail-checks/route.js +85 -0
  66. package/dist/modules/agent_orchestrator/api/guardrail-checks/route.js.map +7 -0
  67. package/dist/modules/agent_orchestrator/api/identity/agent/auth/route.js +95 -0
  68. package/dist/modules/agent_orchestrator/api/identity/agent/auth/route.js.map +7 -0
  69. package/dist/modules/agent_orchestrator/api/identity/grants/[id]/revoke/route.js +109 -0
  70. package/dist/modules/agent_orchestrator/api/identity/grants/[id]/revoke/route.js.map +7 -0
  71. package/dist/modules/agent_orchestrator/api/identity/token/route.js +80 -0
  72. package/dist/modules/agent_orchestrator/api/identity/token/route.js.map +7 -0
  73. package/dist/modules/agent_orchestrator/api/identity/well-known/route.js +44 -0
  74. package/dist/modules/agent_orchestrator/api/identity/well-known/route.js.map +7 -0
  75. package/dist/modules/agent_orchestrator/api/metrics/agents/route.js +122 -0
  76. package/dist/modules/agent_orchestrator/api/metrics/agents/route.js.map +7 -0
  77. package/dist/modules/agent_orchestrator/api/metrics/overview/route.js +165 -0
  78. package/dist/modules/agent_orchestrator/api/metrics/overview/route.js.map +7 -0
  79. package/dist/modules/agent_orchestrator/api/openapi.js +29 -0
  80. package/dist/modules/agent_orchestrator/api/openapi.js.map +7 -0
  81. package/dist/modules/agent_orchestrator/api/processes/[id]/executions/route.js +160 -0
  82. package/dist/modules/agent_orchestrator/api/processes/[id]/executions/route.js.map +7 -0
  83. package/dist/modules/agent_orchestrator/api/processes/[id]/route.js +53 -0
  84. package/dist/modules/agent_orchestrator/api/processes/[id]/route.js.map +7 -0
  85. package/dist/modules/agent_orchestrator/api/processes/route.js +357 -0
  86. package/dist/modules/agent_orchestrator/api/processes/route.js.map +7 -0
  87. package/dist/modules/agent_orchestrator/api/proposals/[id]/dispose/route.js +111 -0
  88. package/dist/modules/agent_orchestrator/api/proposals/[id]/dispose/route.js.map +7 -0
  89. package/dist/modules/agent_orchestrator/api/proposals/route.js +98 -0
  90. package/dist/modules/agent_orchestrator/api/proposals/route.js.map +7 -0
  91. package/dist/modules/agent_orchestrator/api/runs/[id]/artifact/route.js +71 -0
  92. package/dist/modules/agent_orchestrator/api/runs/[id]/artifact/route.js.map +7 -0
  93. package/dist/modules/agent_orchestrator/api/runs/[id]/artifacts/route.js +66 -0
  94. package/dist/modules/agent_orchestrator/api/runs/[id]/artifacts/route.js.map +7 -0
  95. package/dist/modules/agent_orchestrator/api/runs/[id]/eval-case/route.js +73 -0
  96. package/dist/modules/agent_orchestrator/api/runs/[id]/eval-case/route.js.map +7 -0
  97. package/dist/modules/agent_orchestrator/api/runs/[id]/flag/route.js +74 -0
  98. package/dist/modules/agent_orchestrator/api/runs/[id]/flag/route.js.map +7 -0
  99. package/dist/modules/agent_orchestrator/api/runs/[id]/rerun/route.js +165 -0
  100. package/dist/modules/agent_orchestrator/api/runs/[id]/rerun/route.js.map +7 -0
  101. package/dist/modules/agent_orchestrator/api/runs/[id]/route.js +86 -0
  102. package/dist/modules/agent_orchestrator/api/runs/[id]/route.js.map +7 -0
  103. package/dist/modules/agent_orchestrator/api/runs/route.js +137 -0
  104. package/dist/modules/agent_orchestrator/api/runs/route.js.map +7 -0
  105. package/dist/modules/agent_orchestrator/api/tokens/estimate/route.js +56 -0
  106. package/dist/modules/agent_orchestrator/api/tokens/estimate/route.js.map +7 -0
  107. package/dist/modules/agent_orchestrator/api/trace/ingest/route.js +80 -0
  108. package/dist/modules/agent_orchestrator/api/trace/ingest/route.js.map +7 -0
  109. package/dist/modules/agent_orchestrator/api/web-search/health/route.js +184 -0
  110. package/dist/modules/agent_orchestrator/api/web-search/health/route.js.map +7 -0
  111. package/dist/modules/agent_orchestrator/api/web-search/preview/route.js +150 -0
  112. package/dist/modules/agent_orchestrator/api/web-search/preview/route.js.map +7 -0
  113. package/dist/modules/agent_orchestrator/api/web-search/settings/route.js +213 -0
  114. package/dist/modules/agent_orchestrator/api/web-search/settings/route.js.map +7 -0
  115. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/ActivityTab.js +112 -0
  116. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/ActivityTab.js.map +7 -0
  117. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/AgentConfigDrawer.js +58 -0
  118. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/AgentConfigDrawer.js.map +7 -0
  119. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/AgentHeaderCard.js +117 -0
  120. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/AgentHeaderCard.js.map +7 -0
  121. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/AssertionFormDrawer.js +318 -0
  122. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/AssertionFormDrawer.js.map +7 -0
  123. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/ConfigurationTab.js +126 -0
  124. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/ConfigurationTab.js.map +7 -0
  125. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/EvalCaseDrawer.js +379 -0
  126. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/EvalCaseDrawer.js.map +7 -0
  127. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/EvalResultsDrawer.js +159 -0
  128. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/EvalResultsDrawer.js.map +7 -0
  129. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/EvaluationTab.js +581 -0
  130. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/EvaluationTab.js.map +7 -0
  131. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/FilesTab.js +249 -0
  132. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/FilesTab.js.map +7 -0
  133. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/OverviewTab.js +162 -0
  134. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/OverviewTab.js.map +7 -0
  135. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/RunEvaluationDrawer.js +199 -0
  136. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/RunEvaluationDrawer.js.map +7 -0
  137. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/TokenCalculatorTab.js +137 -0
  138. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/TokenCalculatorTab.js.map +7 -0
  139. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/filesShared.js +97 -0
  140. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/filesShared.js.map +7 -0
  141. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/workspacePrimitives.js +159 -0
  142. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/workspacePrimitives.js.map +7 -0
  143. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/workspaceShared.js +132 -0
  144. package/dist/modules/agent_orchestrator/backend/agents/[id]/components/workspaceShared.js.map +7 -0
  145. package/dist/modules/agent_orchestrator/backend/agents/[id]/page.js +266 -0
  146. package/dist/modules/agent_orchestrator/backend/agents/[id]/page.js.map +7 -0
  147. package/dist/modules/agent_orchestrator/backend/agents/[id]/page.meta.js +18 -0
  148. package/dist/modules/agent_orchestrator/backend/agents/[id]/page.meta.js.map +7 -0
  149. package/dist/modules/agent_orchestrator/backend/agents/agentListFilters.js +44 -0
  150. package/dist/modules/agent_orchestrator/backend/agents/agentListFilters.js.map +7 -0
  151. package/dist/modules/agent_orchestrator/backend/agents/page.js +439 -0
  152. package/dist/modules/agent_orchestrator/backend/agents/page.js.map +7 -0
  153. package/dist/modules/agent_orchestrator/backend/agents/page.meta.js +28 -0
  154. package/dist/modules/agent_orchestrator/backend/agents/page.meta.js.map +7 -0
  155. package/dist/modules/agent_orchestrator/backend/audit/by-instigator/[humanUserId]/page.js +80 -0
  156. package/dist/modules/agent_orchestrator/backend/audit/by-instigator/[humanUserId]/page.js.map +7 -0
  157. package/dist/modules/agent_orchestrator/backend/audit/by-instigator/[humanUserId]/page.meta.js +19 -0
  158. package/dist/modules/agent_orchestrator/backend/audit/by-instigator/[humanUserId]/page.meta.js.map +7 -0
  159. package/dist/modules/agent_orchestrator/backend/audit/page.js +324 -0
  160. package/dist/modules/agent_orchestrator/backend/audit/page.js.map +7 -0
  161. package/dist/modules/agent_orchestrator/backend/audit/page.meta.js +27 -0
  162. package/dist/modules/agent_orchestrator/backend/audit/page.meta.js.map +7 -0
  163. package/dist/modules/agent_orchestrator/backend/caseload/[proposalId]/page.js +239 -0
  164. package/dist/modules/agent_orchestrator/backend/caseload/[proposalId]/page.js.map +7 -0
  165. package/dist/modules/agent_orchestrator/backend/caseload/[proposalId]/page.meta.js +18 -0
  166. package/dist/modules/agent_orchestrator/backend/caseload/[proposalId]/page.meta.js.map +7 -0
  167. package/dist/modules/agent_orchestrator/backend/caseload/hooks.js +344 -0
  168. package/dist/modules/agent_orchestrator/backend/caseload/hooks.js.map +7 -0
  169. package/dist/modules/agent_orchestrator/backend/caseload/page.js +1360 -0
  170. package/dist/modules/agent_orchestrator/backend/caseload/page.js.map +7 -0
  171. package/dist/modules/agent_orchestrator/backend/caseload/page.meta.js +25 -0
  172. package/dist/modules/agent_orchestrator/backend/caseload/page.meta.js.map +7 -0
  173. package/dist/modules/agent_orchestrator/backend/eval-cases/[id]/page.js +357 -0
  174. package/dist/modules/agent_orchestrator/backend/eval-cases/[id]/page.js.map +7 -0
  175. package/dist/modules/agent_orchestrator/backend/eval-cases/[id]/page.meta.js +18 -0
  176. package/dist/modules/agent_orchestrator/backend/eval-cases/[id]/page.meta.js.map +7 -0
  177. package/dist/modules/agent_orchestrator/backend/eval-runs/[id]/page.js +595 -0
  178. package/dist/modules/agent_orchestrator/backend/eval-runs/[id]/page.js.map +7 -0
  179. package/dist/modules/agent_orchestrator/backend/eval-runs/[id]/page.meta.js +18 -0
  180. package/dist/modules/agent_orchestrator/backend/eval-runs/[id]/page.meta.js.map +7 -0
  181. package/dist/modules/agent_orchestrator/backend/overview/page.js +593 -0
  182. package/dist/modules/agent_orchestrator/backend/overview/page.js.map +7 -0
  183. package/dist/modules/agent_orchestrator/backend/overview/page.meta.js +27 -0
  184. package/dist/modules/agent_orchestrator/backend/overview/page.meta.js.map +7 -0
  185. package/dist/modules/agent_orchestrator/backend/playground/PlaygroundEvalPanel.js +219 -0
  186. package/dist/modules/agent_orchestrator/backend/playground/PlaygroundEvalPanel.js.map +7 -0
  187. package/dist/modules/agent_orchestrator/backend/playground/page.js +443 -0
  188. package/dist/modules/agent_orchestrator/backend/playground/page.js.map +7 -0
  189. package/dist/modules/agent_orchestrator/backend/playground/page.meta.js +24 -0
  190. package/dist/modules/agent_orchestrator/backend/playground/page.meta.js.map +7 -0
  191. package/dist/modules/agent_orchestrator/backend/processes/[id]/page.js +611 -0
  192. package/dist/modules/agent_orchestrator/backend/processes/[id]/page.js.map +7 -0
  193. package/dist/modules/agent_orchestrator/backend/processes/[id]/page.meta.js +18 -0
  194. package/dist/modules/agent_orchestrator/backend/processes/[id]/page.meta.js.map +7 -0
  195. package/dist/modules/agent_orchestrator/backend/processes/definitions/MilestoneEditor.js +219 -0
  196. package/dist/modules/agent_orchestrator/backend/processes/definitions/MilestoneEditor.js.map +7 -0
  197. package/dist/modules/agent_orchestrator/backend/processes/definitions/TriggerEditor.js +326 -0
  198. package/dist/modules/agent_orchestrator/backend/processes/definitions/TriggerEditor.js.map +7 -0
  199. package/dist/modules/agent_orchestrator/backend/processes/definitions/[id]/page.js +565 -0
  200. package/dist/modules/agent_orchestrator/backend/processes/definitions/[id]/page.js.map +7 -0
  201. package/dist/modules/agent_orchestrator/backend/processes/definitions/[id]/page.meta.js +17 -0
  202. package/dist/modules/agent_orchestrator/backend/processes/definitions/[id]/page.meta.js.map +7 -0
  203. package/dist/modules/agent_orchestrator/backend/processes/definitions/formHelpers.js +69 -0
  204. package/dist/modules/agent_orchestrator/backend/processes/definitions/formHelpers.js.map +7 -0
  205. package/dist/modules/agent_orchestrator/backend/processes/definitions/navigation.js +9 -0
  206. package/dist/modules/agent_orchestrator/backend/processes/definitions/navigation.js.map +7 -0
  207. package/dist/modules/agent_orchestrator/backend/processes/definitions/page.js +735 -0
  208. package/dist/modules/agent_orchestrator/backend/processes/definitions/page.js.map +7 -0
  209. package/dist/modules/agent_orchestrator/backend/processes/definitions/page.meta.js +25 -0
  210. package/dist/modules/agent_orchestrator/backend/processes/definitions/page.meta.js.map +7 -0
  211. package/dist/modules/agent_orchestrator/backend/processes/page.js +244 -0
  212. package/dist/modules/agent_orchestrator/backend/processes/page.js.map +7 -0
  213. package/dist/modules/agent_orchestrator/backend/processes/page.meta.js +29 -0
  214. package/dist/modules/agent_orchestrator/backend/processes/page.meta.js.map +7 -0
  215. package/dist/modules/agent_orchestrator/backend/settings/auto-approval/page.js +204 -0
  216. package/dist/modules/agent_orchestrator/backend/settings/auto-approval/page.js.map +7 -0
  217. package/dist/modules/agent_orchestrator/backend/settings/auto-approval/page.meta.js +30 -0
  218. package/dist/modules/agent_orchestrator/backend/settings/auto-approval/page.meta.js.map +7 -0
  219. package/dist/modules/agent_orchestrator/backend/settings/web-search/AdapterRow.js +241 -0
  220. package/dist/modules/agent_orchestrator/backend/settings/web-search/AdapterRow.js.map +7 -0
  221. package/dist/modules/agent_orchestrator/backend/settings/web-search/WebSearchPreview.js +129 -0
  222. package/dist/modules/agent_orchestrator/backend/settings/web-search/WebSearchPreview.js.map +7 -0
  223. package/dist/modules/agent_orchestrator/backend/settings/web-search/page.js +644 -0
  224. package/dist/modules/agent_orchestrator/backend/settings/web-search/page.js.map +7 -0
  225. package/dist/modules/agent_orchestrator/backend/settings/web-search/page.meta.js +32 -0
  226. package/dist/modules/agent_orchestrator/backend/settings/web-search/page.meta.js.map +7 -0
  227. package/dist/modules/agent_orchestrator/backend/traces/[id]/page.js +1015 -0
  228. package/dist/modules/agent_orchestrator/backend/traces/[id]/page.js.map +7 -0
  229. package/dist/modules/agent_orchestrator/backend/traces/[id]/page.meta.js +18 -0
  230. package/dist/modules/agent_orchestrator/backend/traces/[id]/page.meta.js.map +7 -0
  231. package/dist/modules/agent_orchestrator/backend/traces/page.js +477 -0
  232. package/dist/modules/agent_orchestrator/backend/traces/page.js.map +7 -0
  233. package/dist/modules/agent_orchestrator/backend/traces/page.meta.js +24 -0
  234. package/dist/modules/agent_orchestrator/backend/traces/page.meta.js.map +7 -0
  235. package/dist/modules/agent_orchestrator/cli.js +592 -0
  236. package/dist/modules/agent_orchestrator/cli.js.map +7 -0
  237. package/dist/modules/agent_orchestrator/commands/artifacts.js +127 -0
  238. package/dist/modules/agent_orchestrator/commands/artifacts.js.map +7 -0
  239. package/dist/modules/agent_orchestrator/commands/corrections.js +284 -0
  240. package/dist/modules/agent_orchestrator/commands/corrections.js.map +7 -0
  241. package/dist/modules/agent_orchestrator/commands/dispose.js +265 -0
  242. package/dist/modules/agent_orchestrator/commands/dispose.js.map +7 -0
  243. package/dist/modules/agent_orchestrator/commands/evalRuns.js +202 -0
  244. package/dist/modules/agent_orchestrator/commands/evalRuns.js.map +7 -0
  245. package/dist/modules/agent_orchestrator/commands/grants.js +119 -0
  246. package/dist/modules/agent_orchestrator/commands/grants.js.map +7 -0
  247. package/dist/modules/agent_orchestrator/commands/index.js +11 -0
  248. package/dist/modules/agent_orchestrator/commands/index.js.map +7 -0
  249. package/dist/modules/agent_orchestrator/commands/processes.js +130 -0
  250. package/dist/modules/agent_orchestrator/commands/processes.js.map +7 -0
  251. package/dist/modules/agent_orchestrator/commands/proposals.js +67 -0
  252. package/dist/modules/agent_orchestrator/commands/proposals.js.map +7 -0
  253. package/dist/modules/agent_orchestrator/commands/runActions.js +42 -0
  254. package/dist/modules/agent_orchestrator/commands/runActions.js.map +7 -0
  255. package/dist/modules/agent_orchestrator/commands/runs.js +183 -0
  256. package/dist/modules/agent_orchestrator/commands/runs.js.map +7 -0
  257. package/dist/modules/agent_orchestrator/commands/trace.js +89 -0
  258. package/dist/modules/agent_orchestrator/commands/trace.js.map +7 -0
  259. package/dist/modules/agent_orchestrator/components/AgentIoDrawer.js +45 -0
  260. package/dist/modules/agent_orchestrator/components/AgentIoDrawer.js.map +7 -0
  261. package/dist/modules/agent_orchestrator/components/AgentTimeline.js +129 -0
  262. package/dist/modules/agent_orchestrator/components/AgentTimeline.js.map +7 -0
  263. package/dist/modules/agent_orchestrator/components/DisposeDialog.js +87 -0
  264. package/dist/modules/agent_orchestrator/components/DisposeDialog.js.map +7 -0
  265. package/dist/modules/agent_orchestrator/components/EmptyArt.js +50 -0
  266. package/dist/modules/agent_orchestrator/components/EmptyArt.js.map +7 -0
  267. package/dist/modules/agent_orchestrator/components/InvokeAgentNodeConfig.js +111 -0
  268. package/dist/modules/agent_orchestrator/components/InvokeAgentNodeConfig.js.map +7 -0
  269. package/dist/modules/agent_orchestrator/components/ProcessOutcomeLink.js +42 -0
  270. package/dist/modules/agent_orchestrator/components/ProcessOutcomeLink.js.map +7 -0
  271. package/dist/modules/agent_orchestrator/components/ProposalCard.js +431 -0
  272. package/dist/modules/agent_orchestrator/components/ProposalCard.js.map +7 -0
  273. package/dist/modules/agent_orchestrator/components/ProposalFacts.js +85 -0
  274. package/dist/modules/agent_orchestrator/components/ProposalFacts.js.map +7 -0
  275. package/dist/modules/agent_orchestrator/components/ProposalOptionList.js +190 -0
  276. package/dist/modules/agent_orchestrator/components/ProposalOptionList.js.map +7 -0
  277. package/dist/modules/agent_orchestrator/components/ProposeOnlyNotice.js +25 -0
  278. package/dist/modules/agent_orchestrator/components/ProposeOnlyNotice.js.map +7 -0
  279. package/dist/modules/agent_orchestrator/components/SkillDrawer.js +48 -0
  280. package/dist/modules/agent_orchestrator/components/SkillDrawer.js.map +7 -0
  281. package/dist/modules/agent_orchestrator/components/StartHereGuide.js +183 -0
  282. package/dist/modules/agent_orchestrator/components/StartHereGuide.js.map +7 -0
  283. package/dist/modules/agent_orchestrator/components/SystemHealthTile.js +135 -0
  284. package/dist/modules/agent_orchestrator/components/SystemHealthTile.js.map +7 -0
  285. package/dist/modules/agent_orchestrator/components/WebSearchActivity.js +87 -0
  286. package/dist/modules/agent_orchestrator/components/WebSearchActivity.js.map +7 -0
  287. package/dist/modules/agent_orchestrator/components/agentChips.js +90 -0
  288. package/dist/modules/agent_orchestrator/components/agentChips.js.map +7 -0
  289. package/dist/modules/agent_orchestrator/components/cockpitStatus.js +94 -0
  290. package/dist/modules/agent_orchestrator/components/cockpitStatus.js.map +7 -0
  291. package/dist/modules/agent_orchestrator/components/evalRunTypes.js +209 -0
  292. package/dist/modules/agent_orchestrator/components/evalRunTypes.js.map +7 -0
  293. package/dist/modules/agent_orchestrator/components/health/HealthRow.js +15 -0
  294. package/dist/modules/agent_orchestrator/components/health/HealthRow.js.map +7 -0
  295. package/dist/modules/agent_orchestrator/components/health/HealthStateBadge.js +13 -0
  296. package/dist/modules/agent_orchestrator/components/health/HealthStateBadge.js.map +7 -0
  297. package/dist/modules/agent_orchestrator/components/health/SystemHealthPanel.js +126 -0
  298. package/dist/modules/agent_orchestrator/components/health/SystemHealthPanel.js.map +7 -0
  299. package/dist/modules/agent_orchestrator/components/health/vocabulary.js +40 -0
  300. package/dist/modules/agent_orchestrator/components/health/vocabulary.js.map +7 -0
  301. package/dist/modules/agent_orchestrator/components/optionalRequest.js +7 -0
  302. package/dist/modules/agent_orchestrator/components/optionalRequest.js.map +7 -0
  303. package/dist/modules/agent_orchestrator/components/playgroundRunError.js +37 -0
  304. package/dist/modules/agent_orchestrator/components/playgroundRunError.js.map +7 -0
  305. package/dist/modules/agent_orchestrator/components/playgroundToolCalls.js +12 -0
  306. package/dist/modules/agent_orchestrator/components/playgroundToolCalls.js.map +7 -0
  307. package/dist/modules/agent_orchestrator/components/processTypes.js +454 -0
  308. package/dist/modules/agent_orchestrator/components/processTypes.js.map +7 -0
  309. package/dist/modules/agent_orchestrator/components/proposalCaseStatus.js +64 -0
  310. package/dist/modules/agent_orchestrator/components/proposalCaseStatus.js.map +7 -0
  311. package/dist/modules/agent_orchestrator/components/proposalEdit.js +71 -0
  312. package/dist/modules/agent_orchestrator/components/proposalEdit.js.map +7 -0
  313. package/dist/modules/agent_orchestrator/components/proposalFactsData.js +138 -0
  314. package/dist/modules/agent_orchestrator/components/proposalFactsData.js.map +7 -0
  315. package/dist/modules/agent_orchestrator/components/serverSort.js +34 -0
  316. package/dist/modules/agent_orchestrator/components/serverSort.js.map +7 -0
  317. package/dist/modules/agent_orchestrator/components/subjectRef.js +34 -0
  318. package/dist/modules/agent_orchestrator/components/subjectRef.js.map +7 -0
  319. package/dist/modules/agent_orchestrator/components/types.js +462 -0
  320. package/dist/modules/agent_orchestrator/components/types.js.map +7 -0
  321. package/dist/modules/agent_orchestrator/components/useAgentIcons.js +31 -0
  322. package/dist/modules/agent_orchestrator/components/useAgentIcons.js.map +7 -0
  323. package/dist/modules/agent_orchestrator/components/useAgentLabels.js +35 -0
  324. package/dist/modules/agent_orchestrator/components/useAgentLabels.js.map +7 -0
  325. package/dist/modules/agent_orchestrator/components/useAgentTags.js +32 -0
  326. package/dist/modules/agent_orchestrator/components/useAgentTags.js.map +7 -0
  327. package/dist/modules/agent_orchestrator/components/useCoalescedReload.js +33 -0
  328. package/dist/modules/agent_orchestrator/components/useCoalescedReload.js.map +7 -0
  329. package/dist/modules/agent_orchestrator/data/agentIcons.js +35 -0
  330. package/dist/modules/agent_orchestrator/data/agentIcons.js.map +7 -0
  331. package/dist/modules/agent_orchestrator/data/agentTags.js +26 -0
  332. package/dist/modules/agent_orchestrator/data/agentTags.js.map +7 -0
  333. package/dist/modules/agent_orchestrator/data/entities.js +1382 -0
  334. package/dist/modules/agent_orchestrator/data/entities.js.map +7 -0
  335. package/dist/modules/agent_orchestrator/data/proposalEnvelope.js +168 -0
  336. package/dist/modules/agent_orchestrator/data/proposalEnvelope.js.map +7 -0
  337. package/dist/modules/agent_orchestrator/data/validators.js +949 -0
  338. package/dist/modules/agent_orchestrator/data/validators.js.map +7 -0
  339. package/dist/modules/agent_orchestrator/di.js +169 -0
  340. package/dist/modules/agent_orchestrator/di.js.map +7 -0
  341. package/dist/modules/agent_orchestrator/encryption.js +100 -0
  342. package/dist/modules/agent_orchestrator/encryption.js.map +7 -0
  343. package/dist/modules/agent_orchestrator/events.js +87 -0
  344. package/dist/modules/agent_orchestrator/events.js.map +7 -0
  345. package/dist/modules/agent_orchestrator/examples/deals-health-check-workflow.json +124 -0
  346. package/dist/modules/agent_orchestrator/examples/refund-triage-workflow.json +210 -0
  347. package/dist/modules/agent_orchestrator/generated/file-agents.generated.js +169 -0
  348. package/dist/modules/agent_orchestrator/generated/file-agents.generated.js.map +7 -0
  349. package/dist/modules/agent_orchestrator/i18n/de.json +1495 -0
  350. package/dist/modules/agent_orchestrator/i18n/en.json +1495 -0
  351. package/dist/modules/agent_orchestrator/i18n/es.json +1495 -0
  352. package/dist/modules/agent_orchestrator/i18n/ko.json +1495 -0
  353. package/dist/modules/agent_orchestrator/i18n/pl.json +1495 -0
  354. package/dist/modules/agent_orchestrator/index.js +151 -0
  355. package/dist/modules/agent_orchestrator/index.js.map +7 -0
  356. package/dist/modules/agent_orchestrator/lib/automationLinks.js +12 -0
  357. package/dist/modules/agent_orchestrator/lib/automationLinks.js.map +7 -0
  358. package/dist/modules/agent_orchestrator/lib/context/contextResolver.js +317 -0
  359. package/dist/modules/agent_orchestrator/lib/context/contextResolver.js.map +7 -0
  360. package/dist/modules/agent_orchestrator/lib/context/documentIngest.js +93 -0
  361. package/dist/modules/agent_orchestrator/lib/context/documentIngest.js.map +7 -0
  362. package/dist/modules/agent_orchestrator/lib/context/documentOcrProvider.js +90 -0
  363. package/dist/modules/agent_orchestrator/lib/context/documentOcrProvider.js.map +7 -0
  364. package/dist/modules/agent_orchestrator/lib/context/documentSource.js +44 -0
  365. package/dist/modules/agent_orchestrator/lib/context/documentSource.js.map +7 -0
  366. package/dist/modules/agent_orchestrator/lib/context/index.js +64 -0
  367. package/dist/modules/agent_orchestrator/lib/context/index.js.map +7 -0
  368. package/dist/modules/agent_orchestrator/lib/context/packer.js +47 -0
  369. package/dist/modules/agent_orchestrator/lib/context/packer.js.map +7 -0
  370. package/dist/modules/agent_orchestrator/lib/context/redactor.js +72 -0
  371. package/dist/modules/agent_orchestrator/lib/context/redactor.js.map +7 -0
  372. package/dist/modules/agent_orchestrator/lib/context/registry.js +60 -0
  373. package/dist/modules/agent_orchestrator/lib/context/registry.js.map +7 -0
  374. package/dist/modules/agent_orchestrator/lib/context/retrievalSource.js +69 -0
  375. package/dist/modules/agent_orchestrator/lib/context/retrievalSource.js.map +7 -0
  376. package/dist/modules/agent_orchestrator/lib/crudCache.js +24 -0
  377. package/dist/modules/agent_orchestrator/lib/crudCache.js.map +7 -0
  378. package/dist/modules/agent_orchestrator/lib/disposition/autoApprovalPolicy.js +51 -0
  379. package/dist/modules/agent_orchestrator/lib/disposition/autoApprovalPolicy.js.map +7 -0
  380. package/dist/modules/agent_orchestrator/lib/disposition/dispositionService.js +190 -0
  381. package/dist/modules/agent_orchestrator/lib/disposition/dispositionService.js.map +7 -0
  382. package/dist/modules/agent_orchestrator/lib/disposition/resume.js +42 -0
  383. package/dist/modules/agent_orchestrator/lib/disposition/resume.js.map +7 -0
  384. package/dist/modules/agent_orchestrator/lib/disposition/tenantAutoApprovalPolicy.js +59 -0
  385. package/dist/modules/agent_orchestrator/lib/disposition/tenantAutoApprovalPolicy.js.map +7 -0
  386. package/dist/modules/agent_orchestrator/lib/eval/assertionResolution.js +53 -0
  387. package/dist/modules/agent_orchestrator/lib/eval/assertionResolution.js.map +7 -0
  388. package/dist/modules/agent_orchestrator/lib/eval/canonicalInputKey.js +20 -0
  389. package/dist/modules/agent_orchestrator/lib/eval/canonicalInputKey.js.map +7 -0
  390. package/dist/modules/agent_orchestrator/lib/eval/defaultAssertions.js +78 -0
  391. package/dist/modules/agent_orchestrator/lib/eval/defaultAssertions.js.map +7 -0
  392. package/dist/modules/agent_orchestrator/lib/eval/evalGate.js +71 -0
  393. package/dist/modules/agent_orchestrator/lib/eval/evalGate.js.map +7 -0
  394. package/dist/modules/agent_orchestrator/lib/eval/evalReplayService.js +277 -0
  395. package/dist/modules/agent_orchestrator/lib/eval/evalReplayService.js.map +7 -0
  396. package/dist/modules/agent_orchestrator/lib/eval/evalRuntimeService.js +141 -0
  397. package/dist/modules/agent_orchestrator/lib/eval/evalRuntimeService.js.map +7 -0
  398. package/dist/modules/agent_orchestrator/lib/eval/judgeRubric.js +150 -0
  399. package/dist/modules/agent_orchestrator/lib/eval/judgeRubric.js.map +7 -0
  400. package/dist/modules/agent_orchestrator/lib/eval/llmJudge.js +122 -0
  401. package/dist/modules/agent_orchestrator/lib/eval/llmJudge.js.map +7 -0
  402. package/dist/modules/agent_orchestrator/lib/eval/projectRunView.js +32 -0
  403. package/dist/modules/agent_orchestrator/lib/eval/projectRunView.js.map +7 -0
  404. package/dist/modules/agent_orchestrator/lib/eval/registry/agent.js +240 -0
  405. package/dist/modules/agent_orchestrator/lib/eval/registry/agent.js.map +7 -0
  406. package/dist/modules/agent_orchestrator/lib/eval/registry/economics.js +77 -0
  407. package/dist/modules/agent_orchestrator/lib/eval/registry/economics.js.map +7 -0
  408. package/dist/modules/agent_orchestrator/lib/eval/registry/index.js +97 -0
  409. package/dist/modules/agent_orchestrator/lib/eval/registry/index.js.map +7 -0
  410. package/dist/modules/agent_orchestrator/lib/eval/registry/judge.js +66 -0
  411. package/dist/modules/agent_orchestrator/lib/eval/registry/judge.js.map +7 -0
  412. package/dist/modules/agent_orchestrator/lib/eval/registry/shared.js +146 -0
  413. package/dist/modules/agent_orchestrator/lib/eval/registry/shared.js.map +7 -0
  414. package/dist/modules/agent_orchestrator/lib/eval/registry/structured.js +264 -0
  415. package/dist/modules/agent_orchestrator/lib/eval/registry/structured.js.map +7 -0
  416. package/dist/modules/agent_orchestrator/lib/eval/registry/text.js +110 -0
  417. package/dist/modules/agent_orchestrator/lib/eval/registry/text.js.map +7 -0
  418. package/dist/modules/agent_orchestrator/lib/eval/registry/tools.js +232 -0
  419. package/dist/modules/agent_orchestrator/lib/eval/registry/tools.js.map +7 -0
  420. package/dist/modules/agent_orchestrator/lib/eval/sampling.js +26 -0
  421. package/dist/modules/agent_orchestrator/lib/eval/sampling.js.map +7 -0
  422. package/dist/modules/agent_orchestrator/lib/eval/scorers.js +46 -0
  423. package/dist/modules/agent_orchestrator/lib/eval/scorers.js.map +7 -0
  424. package/dist/modules/agent_orchestrator/lib/eval/types.js +16 -0
  425. package/dist/modules/agent_orchestrator/lib/eval/types.js.map +7 -0
  426. package/dist/modules/agent_orchestrator/lib/featureFlags.js +9 -0
  427. package/dist/modules/agent_orchestrator/lib/featureFlags.js.map +7 -0
  428. package/dist/modules/agent_orchestrator/lib/guardrails/grounding.js +90 -0
  429. package/dist/modules/agent_orchestrator/lib/guardrails/grounding.js.map +7 -0
  430. package/dist/modules/agent_orchestrator/lib/guardrails/groundingSets.js +35 -0
  431. package/dist/modules/agent_orchestrator/lib/guardrails/groundingSets.js.map +7 -0
  432. package/dist/modules/agent_orchestrator/lib/guardrails/guardrailService.js +160 -0
  433. package/dist/modules/agent_orchestrator/lib/guardrails/guardrailService.js.map +7 -0
  434. package/dist/modules/agent_orchestrator/lib/guardrails/promptInjection.js +94 -0
  435. package/dist/modules/agent_orchestrator/lib/guardrails/promptInjection.js.map +7 -0
  436. package/dist/modules/agent_orchestrator/lib/guardrails/publicEndpointRateLimit.js +36 -0
  437. package/dist/modules/agent_orchestrator/lib/guardrails/publicEndpointRateLimit.js.map +7 -0
  438. package/dist/modules/agent_orchestrator/lib/guardrails/syncGroundingSets.js +43 -0
  439. package/dist/modules/agent_orchestrator/lib/guardrails/syncGroundingSets.js.map +7 -0
  440. package/dist/modules/agent_orchestrator/lib/identity/agentAuthMdService.js +136 -0
  441. package/dist/modules/agent_orchestrator/lib/identity/agentAuthMdService.js.map +7 -0
  442. package/dist/modules/agent_orchestrator/lib/identity/agentDelegationGrantService.js +55 -0
  443. package/dist/modules/agent_orchestrator/lib/identity/agentDelegationGrantService.js.map +7 -0
  444. package/dist/modules/agent_orchestrator/lib/identity/agentNoBypassSubscriber.js +50 -0
  445. package/dist/modules/agent_orchestrator/lib/identity/agentNoBypassSubscriber.js.map +7 -0
  446. package/dist/modules/agent_orchestrator/lib/identity/agentPrincipalService.js +149 -0
  447. package/dist/modules/agent_orchestrator/lib/identity/agentPrincipalService.js.map +7 -0
  448. package/dist/modules/agent_orchestrator/lib/identity/agentTokenService.js +138 -0
  449. package/dist/modules/agent_orchestrator/lib/identity/agentTokenService.js.map +7 -0
  450. package/dist/modules/agent_orchestrator/lib/identity/agentWriteScope.js +22 -0
  451. package/dist/modules/agent_orchestrator/lib/identity/agentWriteScope.js.map +7 -0
  452. package/dist/modules/agent_orchestrator/lib/metrics/metricRollupService.js +112 -0
  453. package/dist/modules/agent_orchestrator/lib/metrics/metricRollupService.js.map +7 -0
  454. package/dist/modules/agent_orchestrator/lib/processes/executionSearch.js +16 -0
  455. package/dist/modules/agent_orchestrator/lib/processes/executionSearch.js.map +7 -0
  456. package/dist/modules/agent_orchestrator/lib/processes/materializeAgentWorkflow.js +178 -0
  457. package/dist/modules/agent_orchestrator/lib/processes/materializeAgentWorkflow.js.map +7 -0
  458. package/dist/modules/agent_orchestrator/lib/processes/processProjection.js +220 -0
  459. package/dist/modules/agent_orchestrator/lib/processes/processProjection.js.map +7 -0
  460. package/dist/modules/agent_orchestrator/lib/processes/subjectContext.js +14 -0
  461. package/dist/modules/agent_orchestrator/lib/processes/subjectContext.js.map +7 -0
  462. package/dist/modules/agent_orchestrator/lib/processes/workflowGrant.js +41 -0
  463. package/dist/modules/agent_orchestrator/lib/processes/workflowGrant.js.map +7 -0
  464. package/dist/modules/agent_orchestrator/lib/queue.js +25 -0
  465. package/dist/modules/agent_orchestrator/lib/queue.js.map +7 -0
  466. package/dist/modules/agent_orchestrator/lib/runtime/actionVocabulary.js +66 -0
  467. package/dist/modules/agent_orchestrator/lib/runtime/actionVocabulary.js.map +7 -0
  468. package/dist/modules/agent_orchestrator/lib/runtime/admission.js +113 -0
  469. package/dist/modules/agent_orchestrator/lib/runtime/admission.js.map +7 -0
  470. package/dist/modules/agent_orchestrator/lib/runtime/agentRunSessionStore.js +92 -0
  471. package/dist/modules/agent_orchestrator/lib/runtime/agentRunSessionStore.js.map +7 -0
  472. package/dist/modules/agent_orchestrator/lib/runtime/agentRuntime.js +67 -0
  473. package/dist/modules/agent_orchestrator/lib/runtime/agentRuntime.js.map +7 -0
  474. package/dist/modules/agent_orchestrator/lib/runtime/agentWorkspaceManager.js +111 -0
  475. package/dist/modules/agent_orchestrator/lib/runtime/agentWorkspaceManager.js.map +7 -0
  476. package/dist/modules/agent_orchestrator/lib/runtime/artifactCollector.js +146 -0
  477. package/dist/modules/agent_orchestrator/lib/runtime/artifactCollector.js.map +7 -0
  478. package/dist/modules/agent_orchestrator/lib/runtime/artifactFileStore.js +85 -0
  479. package/dist/modules/agent_orchestrator/lib/runtime/artifactFileStore.js.map +7 -0
  480. package/dist/modules/agent_orchestrator/lib/runtime/attachmentStager.js +62 -0
  481. package/dist/modules/agent_orchestrator/lib/runtime/attachmentStager.js.map +7 -0
  482. package/dist/modules/agent_orchestrator/lib/runtime/errors.js +38 -0
  483. package/dist/modules/agent_orchestrator/lib/runtime/errors.js.map +7 -0
  484. package/dist/modules/agent_orchestrator/lib/runtime/executeProposal.js +37 -0
  485. package/dist/modules/agent_orchestrator/lib/runtime/executeProposal.js.map +7 -0
  486. package/dist/modules/agent_orchestrator/lib/runtime/fileAgentSkills.js +32 -0
  487. package/dist/modules/agent_orchestrator/lib/runtime/fileAgentSkills.js.map +7 -0
  488. package/dist/modules/agent_orchestrator/lib/runtime/fileInput.js +27 -0
  489. package/dist/modules/agent_orchestrator/lib/runtime/fileInput.js.map +7 -0
  490. package/dist/modules/agent_orchestrator/lib/runtime/invokeAgentForWorkflow.js +115 -0
  491. package/dist/modules/agent_orchestrator/lib/runtime/invokeAgentForWorkflow.js.map +7 -0
  492. package/dist/modules/agent_orchestrator/lib/runtime/modelPricing.js +77 -0
  493. package/dist/modules/agent_orchestrator/lib/runtime/modelPricing.js.map +7 -0
  494. package/dist/modules/agent_orchestrator/lib/runtime/nativeAgentRunner.js +422 -0
  495. package/dist/modules/agent_orchestrator/lib/runtime/nativeAgentRunner.js.map +7 -0
  496. package/dist/modules/agent_orchestrator/lib/runtime/nativeTraceCapture.js +132 -0
  497. package/dist/modules/agent_orchestrator/lib/runtime/nativeTraceCapture.js.map +7 -0
  498. package/dist/modules/agent_orchestrator/lib/runtime/openCodeAgentRunner.js +581 -0
  499. package/dist/modules/agent_orchestrator/lib/runtime/openCodeAgentRunner.js.map +7 -0
  500. package/dist/modules/agent_orchestrator/lib/runtime/persistence.js +110 -0
  501. package/dist/modules/agent_orchestrator/lib/runtime/persistence.js.map +7 -0
  502. package/dist/modules/agent_orchestrator/lib/runtime/providerBudget.js +152 -0
  503. package/dist/modules/agent_orchestrator/lib/runtime/providerBudget.js.map +7 -0
  504. package/dist/modules/agent_orchestrator/lib/runtime/rerunContext.js +13 -0
  505. package/dist/modules/agent_orchestrator/lib/runtime/rerunContext.js.map +7 -0
  506. package/dist/modules/agent_orchestrator/lib/runtime/runContext.js +17 -0
  507. package/dist/modules/agent_orchestrator/lib/runtime/runContext.js.map +7 -0
  508. package/dist/modules/agent_orchestrator/lib/runtime/sandboxedScript.js +39 -0
  509. package/dist/modules/agent_orchestrator/lib/runtime/sandboxedScript.js.map +7 -0
  510. package/dist/modules/agent_orchestrator/lib/sdk/agentMarkdown.js +91 -0
  511. package/dist/modules/agent_orchestrator/lib/sdk/agentMarkdown.js.map +7 -0
  512. package/dist/modules/agent_orchestrator/lib/sdk/agentOutcomeContract.js +35 -0
  513. package/dist/modules/agent_orchestrator/lib/sdk/agentOutcomeContract.js.map +7 -0
  514. package/dist/modules/agent_orchestrator/lib/sdk/defineAgent.js +214 -0
  515. package/dist/modules/agent_orchestrator/lib/sdk/defineAgent.js.map +7 -0
  516. package/dist/modules/agent_orchestrator/lib/sdk/defineFileAgent.js +417 -0
  517. package/dist/modules/agent_orchestrator/lib/sdk/defineFileAgent.js.map +7 -0
  518. package/dist/modules/agent_orchestrator/lib/sdk/defineSkill.js +40 -0
  519. package/dist/modules/agent_orchestrator/lib/sdk/defineSkill.js.map +7 -0
  520. package/dist/modules/agent_orchestrator/lib/sdk/outcomeSchema.js +129 -0
  521. package/dist/modules/agent_orchestrator/lib/sdk/outcomeSchema.js.map +7 -0
  522. package/dist/modules/agent_orchestrator/lib/sdk/skillMarkdown.js +78 -0
  523. package/dist/modules/agent_orchestrator/lib/sdk/skillMarkdown.js.map +7 -0
  524. package/dist/modules/agent_orchestrator/lib/seeds.js +224 -0
  525. package/dist/modules/agent_orchestrator/lib/seeds.js.map +7 -0
  526. package/dist/modules/agent_orchestrator/lib/settings/agentSettings.js +55 -0
  527. package/dist/modules/agent_orchestrator/lib/settings/agentSettings.js.map +7 -0
  528. package/dist/modules/agent_orchestrator/lib/systemHealth.js +94 -0
  529. package/dist/modules/agent_orchestrator/lib/systemHealth.js.map +7 -0
  530. package/dist/modules/agent_orchestrator/lib/tasks/eventTriggerMatch.js +81 -0
  531. package/dist/modules/agent_orchestrator/lib/tasks/eventTriggerMatch.js.map +7 -0
  532. package/dist/modules/agent_orchestrator/lib/tasks/milestones.js +96 -0
  533. package/dist/modules/agent_orchestrator/lib/tasks/milestones.js.map +7 -0
  534. package/dist/modules/agent_orchestrator/lib/tasks/outcome.js +44 -0
  535. package/dist/modules/agent_orchestrator/lib/tasks/outcome.js.map +7 -0
  536. package/dist/modules/agent_orchestrator/lib/tasks/outcomeLink.js +45 -0
  537. package/dist/modules/agent_orchestrator/lib/tasks/outcomeLink.js.map +7 -0
  538. package/dist/modules/agent_orchestrator/lib/tasks/schedule.js +63 -0
  539. package/dist/modules/agent_orchestrator/lib/tasks/schedule.js.map +7 -0
  540. package/dist/modules/agent_orchestrator/lib/tasks/scheduleValidation.js +25 -0
  541. package/dist/modules/agent_orchestrator/lib/tasks/scheduleValidation.js.map +7 -0
  542. package/dist/modules/agent_orchestrator/lib/tasks/triggers.js +34 -0
  543. package/dist/modules/agent_orchestrator/lib/tasks/triggers.js.map +7 -0
  544. package/dist/modules/agent_orchestrator/lib/tokens/computeAgentTokenUsage.js +70 -0
  545. package/dist/modules/agent_orchestrator/lib/tokens/computeAgentTokenUsage.js.map +7 -0
  546. package/dist/modules/agent_orchestrator/lib/tokens/types.js +1 -0
  547. package/dist/modules/agent_orchestrator/lib/tokens/types.js.map +7 -0
  548. package/dist/modules/agent_orchestrator/lib/trace/artifactStore.js +89 -0
  549. package/dist/modules/agent_orchestrator/lib/trace/artifactStore.js.map +7 -0
  550. package/dist/modules/agent_orchestrator/lib/trace/correctionService.js +61 -0
  551. package/dist/modules/agent_orchestrator/lib/trace/correctionService.js.map +7 -0
  552. package/dist/modules/agent_orchestrator/lib/trace/ingestAuth.js +39 -0
  553. package/dist/modules/agent_orchestrator/lib/trace/ingestAuth.js.map +7 -0
  554. package/dist/modules/agent_orchestrator/lib/trace/redactToolSummary.js +44 -0
  555. package/dist/modules/agent_orchestrator/lib/trace/redactToolSummary.js.map +7 -0
  556. package/dist/modules/agent_orchestrator/lib/trace/spanTimeline.js +96 -0
  557. package/dist/modules/agent_orchestrator/lib/trace/spanTimeline.js.map +7 -0
  558. package/dist/modules/agent_orchestrator/lib/trace/traceIngestionService.js +168 -0
  559. package/dist/modules/agent_orchestrator/lib/trace/traceIngestionService.js.map +7 -0
  560. package/dist/modules/agent_orchestrator/lib/webSearch/guardrails.js +116 -0
  561. package/dist/modules/agent_orchestrator/lib/webSearch/guardrails.js.map +7 -0
  562. package/dist/modules/agent_orchestrator/lib/webSearch/healthCache.js +68 -0
  563. package/dist/modules/agent_orchestrator/lib/webSearch/healthCache.js.map +7 -0
  564. package/dist/modules/agent_orchestrator/lib/webSearch/healthProbePlan.js +16 -0
  565. package/dist/modules/agent_orchestrator/lib/webSearch/healthProbePlan.js.map +7 -0
  566. package/dist/modules/agent_orchestrator/lib/webSearch/policy.js +172 -0
  567. package/dist/modules/agent_orchestrator/lib/webSearch/policy.js.map +7 -0
  568. package/dist/modules/agent_orchestrator/lib/webSearch/registry.js +113 -0
  569. package/dist/modules/agent_orchestrator/lib/webSearch/registry.js.map +7 -0
  570. package/dist/modules/agent_orchestrator/lib/webSearch/secretStorage.js +87 -0
  571. package/dist/modules/agent_orchestrator/lib/webSearch/secretStorage.js.map +7 -0
  572. package/dist/modules/agent_orchestrator/lib/webSearch/steps.js +48 -0
  573. package/dist/modules/agent_orchestrator/lib/webSearch/steps.js.map +7 -0
  574. package/dist/modules/agent_orchestrator/lib/webSearch/tools.js +176 -0
  575. package/dist/modules/agent_orchestrator/lib/webSearch/tools.js.map +7 -0
  576. package/dist/modules/agent_orchestrator/lib/workInbox/agentDispositionSource.js +151 -0
  577. package/dist/modules/agent_orchestrator/lib/workInbox/agentDispositionSource.js.map +7 -0
  578. package/dist/modules/agent_orchestrator/migrations/Migration20260906141535_agent_orchestrator.js +200 -0
  579. package/dist/modules/agent_orchestrator/migrations/Migration20260906141535_agent_orchestrator.js.map +7 -0
  580. package/dist/modules/agent_orchestrator/notifications.js +32 -0
  581. package/dist/modules/agent_orchestrator/notifications.js.map +7 -0
  582. package/dist/modules/agent_orchestrator/setup.js +147 -0
  583. package/dist/modules/agent_orchestrator/setup.js.map +7 -0
  584. package/dist/modules/agent_orchestrator/subscribers/process-event-trigger.js +140 -0
  585. package/dist/modules/agent_orchestrator/subscribers/process-event-trigger.js.map +7 -0
  586. package/dist/modules/agent_orchestrator/subscribers/process-proposal-created.js +17 -0
  587. package/dist/modules/agent_orchestrator/subscribers/process-proposal-created.js.map +7 -0
  588. package/dist/modules/agent_orchestrator/subscribers/process-proposal-disposed.js +15 -0
  589. package/dist/modules/agent_orchestrator/subscribers/process-proposal-disposed.js.map +7 -0
  590. package/dist/modules/agent_orchestrator/subscribers/process-run-completed.js +17 -0
  591. package/dist/modules/agent_orchestrator/subscribers/process-run-completed.js.map +7 -0
  592. package/dist/modules/agent_orchestrator/subscribers/process-run-ingested.js +17 -0
  593. package/dist/modules/agent_orchestrator/subscribers/process-run-ingested.js.map +7 -0
  594. package/dist/modules/agent_orchestrator/subscribers/process-workflow-cancelled.js +20 -0
  595. package/dist/modules/agent_orchestrator/subscribers/process-workflow-cancelled.js.map +7 -0
  596. package/dist/modules/agent_orchestrator/subscribers/process-workflow-completed.js +20 -0
  597. package/dist/modules/agent_orchestrator/subscribers/process-workflow-completed.js.map +7 -0
  598. package/dist/modules/agent_orchestrator/subscribers/process-workflow-failed.js +21 -0
  599. package/dist/modules/agent_orchestrator/subscribers/process-workflow-failed.js.map +7 -0
  600. package/dist/modules/agent_orchestrator/subscribers/process-workflow-milestone.js +30 -0
  601. package/dist/modules/agent_orchestrator/subscribers/process-workflow-milestone.js.map +7 -0
  602. package/dist/modules/agent_orchestrator/subscribers/process-workflow-started.js +25 -0
  603. package/dist/modules/agent_orchestrator/subscribers/process-workflow-started.js.map +7 -0
  604. package/dist/modules/agent_orchestrator/subscribers/proposal-disposed-notification-clear.js +34 -0
  605. package/dist/modules/agent_orchestrator/subscribers/proposal-disposed-notification-clear.js.map +7 -0
  606. package/dist/modules/agent_orchestrator/subscribers/proposal-pending-notification.js +53 -0
  607. package/dist/modules/agent_orchestrator/subscribers/proposal-pending-notification.js.map +7 -0
  608. package/dist/modules/agent_orchestrator/widgets/injection/caseload-nav-badge/widget.client.js +44 -0
  609. package/dist/modules/agent_orchestrator/widgets/injection/caseload-nav-badge/widget.client.js.map +7 -0
  610. package/dist/modules/agent_orchestrator/widgets/injection/caseload-nav-badge/widget.js +17 -0
  611. package/dist/modules/agent_orchestrator/widgets/injection/caseload-nav-badge/widget.js.map +7 -0
  612. package/dist/modules/agent_orchestrator/widgets/injection/task-proposal-draft/widget.client.js +107 -0
  613. package/dist/modules/agent_orchestrator/widgets/injection/task-proposal-draft/widget.client.js.map +7 -0
  614. package/dist/modules/agent_orchestrator/widgets/injection/task-proposal-draft/widget.js +17 -0
  615. package/dist/modules/agent_orchestrator/widgets/injection/task-proposal-draft/widget.js.map +7 -0
  616. package/dist/modules/agent_orchestrator/widgets/injection/task-proposal-link/widget.js +28 -0
  617. package/dist/modules/agent_orchestrator/widgets/injection/task-proposal-link/widget.js.map +7 -0
  618. package/dist/modules/agent_orchestrator/widgets/injection-table.js +33 -0
  619. package/dist/modules/agent_orchestrator/widgets/injection-table.js.map +7 -0
  620. package/dist/modules/agent_orchestrator/workers/eval-suite-runner.js +56 -0
  621. package/dist/modules/agent_orchestrator/workers/eval-suite-runner.js.map +7 -0
  622. package/dist/modules/agent_orchestrator/workers/llm-judge.js +29 -0
  623. package/dist/modules/agent_orchestrator/workers/llm-judge.js.map +7 -0
  624. package/dist/modules/agent_orchestrator/workers/metric-rollup.js +29 -0
  625. package/dist/modules/agent_orchestrator/workers/metric-rollup.js.map +7 -0
  626. package/dist/modules/agent_orchestrator/workers/process-execution-starter.js +130 -0
  627. package/dist/modules/agent_orchestrator/workers/process-execution-starter.js.map +7 -0
  628. package/dist/modules/record_locks/lib/conflictValues.js +78 -0
  629. package/dist/modules/record_locks/lib/conflictValues.js.map +7 -0
  630. package/dist/modules/record_locks/lib/crudMutationGuardService.js +19 -4
  631. package/dist/modules/record_locks/lib/crudMutationGuardService.js.map +2 -2
  632. package/dist/modules/record_locks/lib/recordLockService.js +1 -44
  633. package/dist/modules/record_locks/lib/recordLockService.js.map +2 -2
  634. package/jest.config.cjs +2 -0
  635. package/package.json +18 -6
  636. package/src/index.ts +1 -1
  637. package/src/modules/agent_orchestrator/.ai/skills/om-create-opencode-agent/SKILL.md +251 -0
  638. package/src/modules/agent_orchestrator/AGENTS.md +374 -0
  639. package/src/modules/agent_orchestrator/DEMO.md +175 -0
  640. package/src/modules/agent_orchestrator/acl.ts +131 -0
  641. package/src/modules/agent_orchestrator/ai-agents.ts +70 -0
  642. package/src/modules/agent_orchestrator/ai-skills.ts +59 -0
  643. package/src/modules/agent_orchestrator/ai-tools.ts +391 -0
  644. package/src/modules/agent_orchestrator/api/agents/[id]/files/route.ts +77 -0
  645. package/src/modules/agent_orchestrator/api/agents/[id]/metrics/route.ts +106 -0
  646. package/src/modules/agent_orchestrator/api/agents/[id]/route.ts +166 -0
  647. package/src/modules/agent_orchestrator/api/agents/[id]/run/route.ts +339 -0
  648. package/src/modules/agent_orchestrator/api/agents/[id]/settings/route.ts +119 -0
  649. package/src/modules/agent_orchestrator/api/agents/route.ts +124 -0
  650. package/src/modules/agent_orchestrator/api/artifacts/file/[id]/route.ts +80 -0
  651. package/src/modules/agent_orchestrator/api/audit/by-instigator/[humanUserId]/route.ts +143 -0
  652. package/src/modules/agent_orchestrator/api/auto-approval/settings/route.ts +143 -0
  653. package/src/modules/agent_orchestrator/api/context-bundles/route.ts +89 -0
  654. package/src/modules/agent_orchestrator/api/corrections/route.ts +119 -0
  655. package/src/modules/agent_orchestrator/api/eval-assertions/preview/route.ts +123 -0
  656. package/src/modules/agent_orchestrator/api/eval-assertions/route.ts +228 -0
  657. package/src/modules/agent_orchestrator/api/eval-cases/[id]/approve/route.ts +101 -0
  658. package/src/modules/agent_orchestrator/api/eval-cases/[id]/archive/route.ts +100 -0
  659. package/src/modules/agent_orchestrator/api/eval-cases/[id]/route.ts +84 -0
  660. package/src/modules/agent_orchestrator/api/eval-cases/export/route.ts +92 -0
  661. package/src/modules/agent_orchestrator/api/eval-cases/route.ts +159 -0
  662. package/src/modules/agent_orchestrator/api/eval-runs/[id]/cancel/route.ts +78 -0
  663. package/src/modules/agent_orchestrator/api/eval-runs/[id]/case-runs/[caseRunId]/results/route.ts +82 -0
  664. package/src/modules/agent_orchestrator/api/eval-runs/[id]/route.ts +133 -0
  665. package/src/modules/agent_orchestrator/api/eval-runs/route.ts +197 -0
  666. package/src/modules/agent_orchestrator/api/eval-scorers/route.ts +51 -0
  667. package/src/modules/agent_orchestrator/api/executions/[id]/route.ts +106 -0
  668. package/src/modules/agent_orchestrator/api/executions/route.ts +206 -0
  669. package/src/modules/agent_orchestrator/api/features/route.ts +71 -0
  670. package/src/modules/agent_orchestrator/api/guardrail-checks/route.ts +86 -0
  671. package/src/modules/agent_orchestrator/api/identity/agent/auth/route.ts +121 -0
  672. package/src/modules/agent_orchestrator/api/identity/grants/[id]/revoke/route.ts +133 -0
  673. package/src/modules/agent_orchestrator/api/identity/token/route.ts +102 -0
  674. package/src/modules/agent_orchestrator/api/identity/well-known/route.ts +60 -0
  675. package/src/modules/agent_orchestrator/api/metrics/agents/route.ts +160 -0
  676. package/src/modules/agent_orchestrator/api/metrics/overview/route.ts +240 -0
  677. package/src/modules/agent_orchestrator/api/openapi.ts +31 -0
  678. package/src/modules/agent_orchestrator/api/processes/[id]/executions/route.ts +211 -0
  679. package/src/modules/agent_orchestrator/api/processes/[id]/route.ts +70 -0
  680. package/src/modules/agent_orchestrator/api/processes/route.ts +458 -0
  681. package/src/modules/agent_orchestrator/api/proposals/[id]/dispose/route.ts +131 -0
  682. package/src/modules/agent_orchestrator/api/proposals/route.ts +113 -0
  683. package/src/modules/agent_orchestrator/api/runs/[id]/artifact/route.ts +93 -0
  684. package/src/modules/agent_orchestrator/api/runs/[id]/artifacts/route.ts +83 -0
  685. package/src/modules/agent_orchestrator/api/runs/[id]/eval-case/route.ts +91 -0
  686. package/src/modules/agent_orchestrator/api/runs/[id]/flag/route.ts +89 -0
  687. package/src/modules/agent_orchestrator/api/runs/[id]/rerun/route.ts +195 -0
  688. package/src/modules/agent_orchestrator/api/runs/[id]/route.ts +102 -0
  689. package/src/modules/agent_orchestrator/api/runs/route.ts +146 -0
  690. package/src/modules/agent_orchestrator/api/tokens/estimate/route.ts +61 -0
  691. package/src/modules/agent_orchestrator/api/trace/ingest/route.ts +98 -0
  692. package/src/modules/agent_orchestrator/api/web-search/health/route.ts +268 -0
  693. package/src/modules/agent_orchestrator/api/web-search/preview/route.ts +184 -0
  694. package/src/modules/agent_orchestrator/api/web-search/settings/route.ts +309 -0
  695. package/src/modules/agent_orchestrator/auth.md +107 -0
  696. package/src/modules/agent_orchestrator/backend/agents/[id]/components/ActivityTab.tsx +118 -0
  697. package/src/modules/agent_orchestrator/backend/agents/[id]/components/AgentConfigDrawer.tsx +96 -0
  698. package/src/modules/agent_orchestrator/backend/agents/[id]/components/AgentHeaderCard.tsx +174 -0
  699. package/src/modules/agent_orchestrator/backend/agents/[id]/components/AssertionFormDrawer.tsx +418 -0
  700. package/src/modules/agent_orchestrator/backend/agents/[id]/components/ConfigurationTab.tsx +185 -0
  701. package/src/modules/agent_orchestrator/backend/agents/[id]/components/EvalCaseDrawer.tsx +488 -0
  702. package/src/modules/agent_orchestrator/backend/agents/[id]/components/EvalResultsDrawer.tsx +244 -0
  703. package/src/modules/agent_orchestrator/backend/agents/[id]/components/EvaluationTab.tsx +715 -0
  704. package/src/modules/agent_orchestrator/backend/agents/[id]/components/FilesTab.tsx +328 -0
  705. package/src/modules/agent_orchestrator/backend/agents/[id]/components/OverviewTab.tsx +211 -0
  706. package/src/modules/agent_orchestrator/backend/agents/[id]/components/RunEvaluationDrawer.tsx +247 -0
  707. package/src/modules/agent_orchestrator/backend/agents/[id]/components/TokenCalculatorTab.tsx +143 -0
  708. package/src/modules/agent_orchestrator/backend/agents/[id]/components/filesShared.ts +149 -0
  709. package/src/modules/agent_orchestrator/backend/agents/[id]/components/workspacePrimitives.tsx +236 -0
  710. package/src/modules/agent_orchestrator/backend/agents/[id]/components/workspaceShared.ts +193 -0
  711. package/src/modules/agent_orchestrator/backend/agents/[id]/page.meta.ts +14 -0
  712. package/src/modules/agent_orchestrator/backend/agents/[id]/page.tsx +335 -0
  713. package/src/modules/agent_orchestrator/backend/agents/agentListFilters.ts +95 -0
  714. package/src/modules/agent_orchestrator/backend/agents/page.meta.ts +26 -0
  715. package/src/modules/agent_orchestrator/backend/agents/page.tsx +549 -0
  716. package/src/modules/agent_orchestrator/backend/audit/by-instigator/[humanUserId]/page.meta.ts +15 -0
  717. package/src/modules/agent_orchestrator/backend/audit/by-instigator/[humanUserId]/page.tsx +126 -0
  718. package/src/modules/agent_orchestrator/backend/audit/page.meta.ts +25 -0
  719. package/src/modules/agent_orchestrator/backend/audit/page.tsx +392 -0
  720. package/src/modules/agent_orchestrator/backend/caseload/[proposalId]/page.meta.ts +14 -0
  721. package/src/modules/agent_orchestrator/backend/caseload/[proposalId]/page.tsx +298 -0
  722. package/src/modules/agent_orchestrator/backend/caseload/hooks.ts +583 -0
  723. package/src/modules/agent_orchestrator/backend/caseload/page.meta.ts +23 -0
  724. package/src/modules/agent_orchestrator/backend/caseload/page.tsx +1761 -0
  725. package/src/modules/agent_orchestrator/backend/eval-cases/[id]/page.meta.ts +14 -0
  726. package/src/modules/agent_orchestrator/backend/eval-cases/[id]/page.tsx +446 -0
  727. package/src/modules/agent_orchestrator/backend/eval-runs/[id]/page.meta.ts +14 -0
  728. package/src/modules/agent_orchestrator/backend/eval-runs/[id]/page.tsx +824 -0
  729. package/src/modules/agent_orchestrator/backend/overview/page.meta.ts +25 -0
  730. package/src/modules/agent_orchestrator/backend/overview/page.tsx +755 -0
  731. package/src/modules/agent_orchestrator/backend/playground/PlaygroundEvalPanel.tsx +292 -0
  732. package/src/modules/agent_orchestrator/backend/playground/page.meta.ts +22 -0
  733. package/src/modules/agent_orchestrator/backend/playground/page.tsx +647 -0
  734. package/src/modules/agent_orchestrator/backend/processes/[id]/page.meta.ts +14 -0
  735. package/src/modules/agent_orchestrator/backend/processes/[id]/page.tsx +856 -0
  736. package/src/modules/agent_orchestrator/backend/processes/definitions/MilestoneEditor.tsx +285 -0
  737. package/src/modules/agent_orchestrator/backend/processes/definitions/TriggerEditor.tsx +391 -0
  738. package/src/modules/agent_orchestrator/backend/processes/definitions/[id]/page.meta.ts +13 -0
  739. package/src/modules/agent_orchestrator/backend/processes/definitions/[id]/page.tsx +705 -0
  740. package/src/modules/agent_orchestrator/backend/processes/definitions/formHelpers.ts +100 -0
  741. package/src/modules/agent_orchestrator/backend/processes/definitions/navigation.ts +6 -0
  742. package/src/modules/agent_orchestrator/backend/processes/definitions/page.meta.ts +23 -0
  743. package/src/modules/agent_orchestrator/backend/processes/definitions/page.tsx +904 -0
  744. package/src/modules/agent_orchestrator/backend/processes/page.meta.ts +27 -0
  745. package/src/modules/agent_orchestrator/backend/processes/page.tsx +317 -0
  746. package/src/modules/agent_orchestrator/backend/settings/auto-approval/page.meta.ts +28 -0
  747. package/src/modules/agent_orchestrator/backend/settings/auto-approval/page.tsx +315 -0
  748. package/src/modules/agent_orchestrator/backend/settings/web-search/AdapterRow.tsx +351 -0
  749. package/src/modules/agent_orchestrator/backend/settings/web-search/WebSearchPreview.tsx +203 -0
  750. package/src/modules/agent_orchestrator/backend/settings/web-search/page.meta.ts +30 -0
  751. package/src/modules/agent_orchestrator/backend/settings/web-search/page.tsx +913 -0
  752. package/src/modules/agent_orchestrator/backend/traces/[id]/page.meta.ts +14 -0
  753. package/src/modules/agent_orchestrator/backend/traces/[id]/page.tsx +1383 -0
  754. package/src/modules/agent_orchestrator/backend/traces/page.meta.ts +22 -0
  755. package/src/modules/agent_orchestrator/backend/traces/page.tsx +601 -0
  756. package/src/modules/agent_orchestrator/cli.ts +719 -0
  757. package/src/modules/agent_orchestrator/commands/artifacts.ts +171 -0
  758. package/src/modules/agent_orchestrator/commands/corrections.ts +345 -0
  759. package/src/modules/agent_orchestrator/commands/dispose.ts +380 -0
  760. package/src/modules/agent_orchestrator/commands/evalRuns.ts +291 -0
  761. package/src/modules/agent_orchestrator/commands/grants.ts +149 -0
  762. package/src/modules/agent_orchestrator/commands/index.ts +10 -0
  763. package/src/modules/agent_orchestrator/commands/processes.ts +176 -0
  764. package/src/modules/agent_orchestrator/commands/proposals.ts +82 -0
  765. package/src/modules/agent_orchestrator/commands/runActions.ts +52 -0
  766. package/src/modules/agent_orchestrator/commands/runs.ts +212 -0
  767. package/src/modules/agent_orchestrator/commands/trace.ts +118 -0
  768. package/src/modules/agent_orchestrator/components/AgentIoDrawer.tsx +87 -0
  769. package/src/modules/agent_orchestrator/components/AgentTimeline.tsx +175 -0
  770. package/src/modules/agent_orchestrator/components/DisposeDialog.tsx +112 -0
  771. package/src/modules/agent_orchestrator/components/EmptyArt.tsx +51 -0
  772. package/src/modules/agent_orchestrator/components/InvokeAgentNodeConfig.tsx +150 -0
  773. package/src/modules/agent_orchestrator/components/ProcessOutcomeLink.tsx +50 -0
  774. package/src/modules/agent_orchestrator/components/ProposalCard.tsx +602 -0
  775. package/src/modules/agent_orchestrator/components/ProposalFacts.tsx +139 -0
  776. package/src/modules/agent_orchestrator/components/ProposalOptionList.tsx +273 -0
  777. package/src/modules/agent_orchestrator/components/ProposeOnlyNotice.tsx +40 -0
  778. package/src/modules/agent_orchestrator/components/SkillDrawer.tsx +75 -0
  779. package/src/modules/agent_orchestrator/components/StartHereGuide.tsx +241 -0
  780. package/src/modules/agent_orchestrator/components/SystemHealthTile.tsx +189 -0
  781. package/src/modules/agent_orchestrator/components/WebSearchActivity.tsx +180 -0
  782. package/src/modules/agent_orchestrator/components/agentChips.tsx +123 -0
  783. package/src/modules/agent_orchestrator/components/cockpitStatus.tsx +154 -0
  784. package/src/modules/agent_orchestrator/components/evalRunTypes.ts +339 -0
  785. package/src/modules/agent_orchestrator/components/health/HealthRow.tsx +36 -0
  786. package/src/modules/agent_orchestrator/components/health/HealthStateBadge.tsx +21 -0
  787. package/src/modules/agent_orchestrator/components/health/SystemHealthPanel.tsx +206 -0
  788. package/src/modules/agent_orchestrator/components/health/vocabulary.ts +53 -0
  789. package/src/modules/agent_orchestrator/components/optionalRequest.ts +18 -0
  790. package/src/modules/agent_orchestrator/components/playgroundRunError.ts +63 -0
  791. package/src/modules/agent_orchestrator/components/playgroundToolCalls.ts +32 -0
  792. package/src/modules/agent_orchestrator/components/processTypes.ts +613 -0
  793. package/src/modules/agent_orchestrator/components/proposalCaseStatus.ts +100 -0
  794. package/src/modules/agent_orchestrator/components/proposalEdit.ts +118 -0
  795. package/src/modules/agent_orchestrator/components/proposalFactsData.ts +222 -0
  796. package/src/modules/agent_orchestrator/components/serverSort.ts +56 -0
  797. package/src/modules/agent_orchestrator/components/subjectRef.ts +61 -0
  798. package/src/modules/agent_orchestrator/components/types.ts +834 -0
  799. package/src/modules/agent_orchestrator/components/useAgentIcons.ts +42 -0
  800. package/src/modules/agent_orchestrator/components/useAgentLabels.ts +44 -0
  801. package/src/modules/agent_orchestrator/components/useAgentTags.ts +38 -0
  802. package/src/modules/agent_orchestrator/components/useCoalescedReload.ts +43 -0
  803. package/src/modules/agent_orchestrator/data/agentIcons.ts +52 -0
  804. package/src/modules/agent_orchestrator/data/agentTags.ts +39 -0
  805. package/src/modules/agent_orchestrator/data/entities.ts +1904 -0
  806. package/src/modules/agent_orchestrator/data/proposalEnvelope.ts +263 -0
  807. package/src/modules/agent_orchestrator/data/validators.ts +1585 -0
  808. package/src/modules/agent_orchestrator/di.ts +182 -0
  809. package/src/modules/agent_orchestrator/encryption.ts +98 -0
  810. package/src/modules/agent_orchestrator/events.ts +97 -0
  811. package/src/modules/agent_orchestrator/examples/deals-health-check-workflow.json +124 -0
  812. package/src/modules/agent_orchestrator/examples/refund-triage-workflow.json +210 -0
  813. package/src/modules/agent_orchestrator/generated/file-agents.generated.ts +207 -0
  814. package/src/modules/agent_orchestrator/i18n/.hardcoded-allowlist.json +22 -0
  815. package/src/modules/agent_orchestrator/i18n/de.json +1495 -0
  816. package/src/modules/agent_orchestrator/i18n/en.json +1495 -0
  817. package/src/modules/agent_orchestrator/i18n/es.json +1495 -0
  818. package/src/modules/agent_orchestrator/i18n/ko.json +1495 -0
  819. package/src/modules/agent_orchestrator/i18n/pl.json +1495 -0
  820. package/src/modules/agent_orchestrator/index.ts +155 -0
  821. package/src/modules/agent_orchestrator/lib/automationLinks.ts +20 -0
  822. package/src/modules/agent_orchestrator/lib/context/contextResolver.ts +528 -0
  823. package/src/modules/agent_orchestrator/lib/context/documentIngest.ts +187 -0
  824. package/src/modules/agent_orchestrator/lib/context/documentOcrProvider.ts +189 -0
  825. package/src/modules/agent_orchestrator/lib/context/documentSource.ts +88 -0
  826. package/src/modules/agent_orchestrator/lib/context/index.ts +68 -0
  827. package/src/modules/agent_orchestrator/lib/context/packer.ts +114 -0
  828. package/src/modules/agent_orchestrator/lib/context/redactor.ts +138 -0
  829. package/src/modules/agent_orchestrator/lib/context/registry.ts +153 -0
  830. package/src/modules/agent_orchestrator/lib/context/retrievalSource.ts +146 -0
  831. package/src/modules/agent_orchestrator/lib/crudCache.ts +62 -0
  832. package/src/modules/agent_orchestrator/lib/disposition/autoApprovalPolicy.ts +163 -0
  833. package/src/modules/agent_orchestrator/lib/disposition/dispositionService.ts +310 -0
  834. package/src/modules/agent_orchestrator/lib/disposition/resume.ts +81 -0
  835. package/src/modules/agent_orchestrator/lib/disposition/tenantAutoApprovalPolicy.ts +100 -0
  836. package/src/modules/agent_orchestrator/lib/eval/assertionResolution.ts +105 -0
  837. package/src/modules/agent_orchestrator/lib/eval/canonicalInputKey.ts +32 -0
  838. package/src/modules/agent_orchestrator/lib/eval/defaultAssertions.ts +103 -0
  839. package/src/modules/agent_orchestrator/lib/eval/evalGate.ts +139 -0
  840. package/src/modules/agent_orchestrator/lib/eval/evalReplayService.ts +517 -0
  841. package/src/modules/agent_orchestrator/lib/eval/evalRuntimeService.ts +215 -0
  842. package/src/modules/agent_orchestrator/lib/eval/judgeRubric.ts +212 -0
  843. package/src/modules/agent_orchestrator/lib/eval/llmJudge.ts +174 -0
  844. package/src/modules/agent_orchestrator/lib/eval/projectRunView.ts +53 -0
  845. package/src/modules/agent_orchestrator/lib/eval/registry/agent.ts +334 -0
  846. package/src/modules/agent_orchestrator/lib/eval/registry/economics.ts +91 -0
  847. package/src/modules/agent_orchestrator/lib/eval/registry/index.ts +157 -0
  848. package/src/modules/agent_orchestrator/lib/eval/registry/judge.ts +102 -0
  849. package/src/modules/agent_orchestrator/lib/eval/registry/shared.ts +208 -0
  850. package/src/modules/agent_orchestrator/lib/eval/registry/structured.ts +297 -0
  851. package/src/modules/agent_orchestrator/lib/eval/registry/text.ts +125 -0
  852. package/src/modules/agent_orchestrator/lib/eval/registry/tools.ts +263 -0
  853. package/src/modules/agent_orchestrator/lib/eval/sampling.ts +33 -0
  854. package/src/modules/agent_orchestrator/lib/eval/scorers.ts +90 -0
  855. package/src/modules/agent_orchestrator/lib/eval/types.ts +189 -0
  856. package/src/modules/agent_orchestrator/lib/featureFlags.ts +22 -0
  857. package/src/modules/agent_orchestrator/lib/guardrails/grounding.ts +172 -0
  858. package/src/modules/agent_orchestrator/lib/guardrails/groundingSets.ts +61 -0
  859. package/src/modules/agent_orchestrator/lib/guardrails/guardrailService.ts +293 -0
  860. package/src/modules/agent_orchestrator/lib/guardrails/promptInjection.ts +163 -0
  861. package/src/modules/agent_orchestrator/lib/guardrails/publicEndpointRateLimit.ts +74 -0
  862. package/src/modules/agent_orchestrator/lib/guardrails/syncGroundingSets.ts +68 -0
  863. package/src/modules/agent_orchestrator/lib/identity/agentAuthMdService.ts +247 -0
  864. package/src/modules/agent_orchestrator/lib/identity/agentDelegationGrantService.ts +85 -0
  865. package/src/modules/agent_orchestrator/lib/identity/agentNoBypassSubscriber.ts +98 -0
  866. package/src/modules/agent_orchestrator/lib/identity/agentPrincipalService.ts +230 -0
  867. package/src/modules/agent_orchestrator/lib/identity/agentTokenService.ts +281 -0
  868. package/src/modules/agent_orchestrator/lib/identity/agentWriteScope.ts +68 -0
  869. package/src/modules/agent_orchestrator/lib/metrics/metricRollupService.ts +168 -0
  870. package/src/modules/agent_orchestrator/lib/processes/executionSearch.ts +35 -0
  871. package/src/modules/agent_orchestrator/lib/processes/materializeAgentWorkflow.ts +320 -0
  872. package/src/modules/agent_orchestrator/lib/processes/processProjection.ts +401 -0
  873. package/src/modules/agent_orchestrator/lib/processes/subjectContext.ts +30 -0
  874. package/src/modules/agent_orchestrator/lib/processes/workflowGrant.ts +84 -0
  875. package/src/modules/agent_orchestrator/lib/queue.ts +56 -0
  876. package/src/modules/agent_orchestrator/lib/runtime/actionVocabulary.ts +127 -0
  877. package/src/modules/agent_orchestrator/lib/runtime/admission.ts +177 -0
  878. package/src/modules/agent_orchestrator/lib/runtime/agentRunSessionStore.ts +166 -0
  879. package/src/modules/agent_orchestrator/lib/runtime/agentRuntime.ts +108 -0
  880. package/src/modules/agent_orchestrator/lib/runtime/agentWorkspaceManager.ts +187 -0
  881. package/src/modules/agent_orchestrator/lib/runtime/artifactCollector.ts +188 -0
  882. package/src/modules/agent_orchestrator/lib/runtime/artifactFileStore.ts +189 -0
  883. package/src/modules/agent_orchestrator/lib/runtime/attachmentStager.ts +100 -0
  884. package/src/modules/agent_orchestrator/lib/runtime/errors.ts +63 -0
  885. package/src/modules/agent_orchestrator/lib/runtime/executeProposal.ts +78 -0
  886. package/src/modules/agent_orchestrator/lib/runtime/fileAgentSkills.ts +81 -0
  887. package/src/modules/agent_orchestrator/lib/runtime/fileInput.ts +44 -0
  888. package/src/modules/agent_orchestrator/lib/runtime/invokeAgentForWorkflow.ts +255 -0
  889. package/src/modules/agent_orchestrator/lib/runtime/modelPricing.ts +146 -0
  890. package/src/modules/agent_orchestrator/lib/runtime/nativeAgentRunner.ts +617 -0
  891. package/src/modules/agent_orchestrator/lib/runtime/nativeTraceCapture.ts +217 -0
  892. package/src/modules/agent_orchestrator/lib/runtime/openCodeAgentRunner.ts +889 -0
  893. package/src/modules/agent_orchestrator/lib/runtime/persistence.ts +314 -0
  894. package/src/modules/agent_orchestrator/lib/runtime/providerBudget.ts +230 -0
  895. package/src/modules/agent_orchestrator/lib/runtime/rerunContext.ts +26 -0
  896. package/src/modules/agent_orchestrator/lib/runtime/runContext.ts +47 -0
  897. package/src/modules/agent_orchestrator/lib/runtime/sandboxedScript.ts +106 -0
  898. package/src/modules/agent_orchestrator/lib/sdk/agentMarkdown.ts +157 -0
  899. package/src/modules/agent_orchestrator/lib/sdk/agentOutcomeContract.ts +58 -0
  900. package/src/modules/agent_orchestrator/lib/sdk/defineAgent.ts +525 -0
  901. package/src/modules/agent_orchestrator/lib/sdk/defineFileAgent.ts +765 -0
  902. package/src/modules/agent_orchestrator/lib/sdk/defineSkill.ts +80 -0
  903. package/src/modules/agent_orchestrator/lib/sdk/outcomeSchema.ts +190 -0
  904. package/src/modules/agent_orchestrator/lib/sdk/skillMarkdown.ts +139 -0
  905. package/src/modules/agent_orchestrator/lib/seeds.ts +335 -0
  906. package/src/modules/agent_orchestrator/lib/settings/agentSettings.ts +92 -0
  907. package/src/modules/agent_orchestrator/lib/systemHealth.ts +212 -0
  908. package/src/modules/agent_orchestrator/lib/tasks/eventTriggerMatch.ts +116 -0
  909. package/src/modules/agent_orchestrator/lib/tasks/milestones.ts +201 -0
  910. package/src/modules/agent_orchestrator/lib/tasks/outcome.ts +93 -0
  911. package/src/modules/agent_orchestrator/lib/tasks/outcomeLink.ts +91 -0
  912. package/src/modules/agent_orchestrator/lib/tasks/schedule.ts +106 -0
  913. package/src/modules/agent_orchestrator/lib/tasks/scheduleValidation.ts +34 -0
  914. package/src/modules/agent_orchestrator/lib/tasks/triggers.ts +47 -0
  915. package/src/modules/agent_orchestrator/lib/tokens/computeAgentTokenUsage.ts +111 -0
  916. package/src/modules/agent_orchestrator/lib/tokens/types.ts +77 -0
  917. package/src/modules/agent_orchestrator/lib/trace/artifactStore.ts +198 -0
  918. package/src/modules/agent_orchestrator/lib/trace/correctionService.ts +117 -0
  919. package/src/modules/agent_orchestrator/lib/trace/ingestAuth.ts +65 -0
  920. package/src/modules/agent_orchestrator/lib/trace/redactToolSummary.ts +76 -0
  921. package/src/modules/agent_orchestrator/lib/trace/spanTimeline.ts +181 -0
  922. package/src/modules/agent_orchestrator/lib/trace/traceIngestionService.ts +250 -0
  923. package/src/modules/agent_orchestrator/lib/webSearch/guardrails.ts +199 -0
  924. package/src/modules/agent_orchestrator/lib/webSearch/healthCache.ts +109 -0
  925. package/src/modules/agent_orchestrator/lib/webSearch/healthProbePlan.ts +58 -0
  926. package/src/modules/agent_orchestrator/lib/webSearch/policy.ts +283 -0
  927. package/src/modules/agent_orchestrator/lib/webSearch/registry.ts +177 -0
  928. package/src/modules/agent_orchestrator/lib/webSearch/secretStorage.ts +181 -0
  929. package/src/modules/agent_orchestrator/lib/webSearch/steps.ts +77 -0
  930. package/src/modules/agent_orchestrator/lib/webSearch/tools.ts +246 -0
  931. package/src/modules/agent_orchestrator/lib/workInbox/agentDispositionSource.ts +324 -0
  932. package/src/modules/agent_orchestrator/migrations/.snapshot-open-mercato.json +7083 -0
  933. package/src/modules/agent_orchestrator/migrations/Migration20260906141535_agent_orchestrator.ts +278 -0
  934. package/src/modules/agent_orchestrator/migrations/adopt-squash.mjs +232 -0
  935. package/src/modules/agent_orchestrator/notifications.ts +43 -0
  936. package/src/modules/agent_orchestrator/setup.ts +190 -0
  937. package/src/modules/agent_orchestrator/skills/deals.stage_playbook.md +37 -0
  938. package/src/modules/agent_orchestrator/subscribers/process-event-trigger.ts +198 -0
  939. package/src/modules/agent_orchestrator/subscribers/process-proposal-created.ts +28 -0
  940. package/src/modules/agent_orchestrator/subscribers/process-proposal-disposed.ts +20 -0
  941. package/src/modules/agent_orchestrator/subscribers/process-run-completed.ts +23 -0
  942. package/src/modules/agent_orchestrator/subscribers/process-run-ingested.ts +22 -0
  943. package/src/modules/agent_orchestrator/subscribers/process-workflow-cancelled.ts +22 -0
  944. package/src/modules/agent_orchestrator/subscribers/process-workflow-completed.ts +32 -0
  945. package/src/modules/agent_orchestrator/subscribers/process-workflow-failed.ts +23 -0
  946. package/src/modules/agent_orchestrator/subscribers/process-workflow-milestone.ts +47 -0
  947. package/src/modules/agent_orchestrator/subscribers/process-workflow-started.ts +34 -0
  948. package/src/modules/agent_orchestrator/subscribers/proposal-disposed-notification-clear.ts +50 -0
  949. package/src/modules/agent_orchestrator/subscribers/proposal-pending-notification.ts +84 -0
  950. package/src/modules/agent_orchestrator/widgets/injection/caseload-nav-badge/widget.client.tsx +68 -0
  951. package/src/modules/agent_orchestrator/widgets/injection/caseload-nav-badge/widget.ts +16 -0
  952. package/src/modules/agent_orchestrator/widgets/injection/task-proposal-draft/widget.client.tsx +148 -0
  953. package/src/modules/agent_orchestrator/widgets/injection/task-proposal-draft/widget.ts +24 -0
  954. package/src/modules/agent_orchestrator/widgets/injection/task-proposal-link/widget.ts +34 -0
  955. package/src/modules/agent_orchestrator/widgets/injection-table.ts +42 -0
  956. package/src/modules/agent_orchestrator/workers/eval-suite-runner.ts +85 -0
  957. package/src/modules/agent_orchestrator/workers/llm-judge.ts +39 -0
  958. package/src/modules/agent_orchestrator/workers/metric-rollup.ts +39 -0
  959. package/src/modules/agent_orchestrator/workers/process-execution-starter.ts +227 -0
  960. package/src/modules/record_locks/lib/conflictValues.ts +107 -0
  961. package/src/modules/record_locks/lib/crudMutationGuardService.ts +47 -3
  962. package/src/modules/record_locks/lib/recordLockService.ts +1 -51
@@ -0,0 +1,240 @@
1
+ import { z } from "zod";
2
+ import { agentTypeSchema } from "../../../data/validators.js";
3
+ import { normalizeProposalEnvelope } from "../../../data/proposalEnvelope.js";
4
+ import { SKIP_REASON, skipped } from "../types.js";
5
+ import { baseConfigSchema, directionSchema, toText, verdict } from "./shared.js";
6
+ const I18N = "agent_orchestrator.evalAssertions.scorer";
7
+ const PII_PATTERNS = [
8
+ { name: "email", re: /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/ },
9
+ { name: "ssn", re: /\b\d{3}-\d{2}-\d{4}\b/ },
10
+ { name: "phone", re: /\b(?:\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}\b/ }
11
+ ];
12
+ const outputPresentConfig = baseConfigSchema;
13
+ const outputPresent = {
14
+ scorerKey: "output_present",
15
+ labelKey: `${I18N}.output_present`,
16
+ group: "agent",
17
+ kind: "deterministic",
18
+ configSchema: outputPresentConfig,
19
+ fields: [],
20
+ needsExpected: () => false,
21
+ score: (run) => {
22
+ const output = run.output;
23
+ const empty = output === null || output === void 0 || typeof output === "object" && Object.keys(output).length === 0;
24
+ return verdict(!empty, empty ? 0 : 1);
25
+ }
26
+ };
27
+ const requiredKeysConfig = baseConfigSchema.extend({
28
+ requiredKeys: z.array(z.unknown()).catch([]).transform((entries) => entries.map((entry) => String(entry)))
29
+ });
30
+ const requiredKeys = {
31
+ scorerKey: "required_keys",
32
+ labelKey: `${I18N}.required_keys`,
33
+ group: "agent",
34
+ kind: "deterministic",
35
+ configSchema: requiredKeysConfig,
36
+ fields: [
37
+ {
38
+ name: "requiredKeys",
39
+ kind: "string-list",
40
+ labelKey: `${I18N}.required_keys.field.requiredKeys`,
41
+ hintKey: `${I18N}.required_keys.field.requiredKeys.hint`,
42
+ required: true
43
+ }
44
+ ],
45
+ needsExpected: () => false,
46
+ score: (run, _expected, config) => {
47
+ const required = config.requiredKeys ?? [];
48
+ const output = run.output;
49
+ if (!output || typeof output !== "object") {
50
+ return verdict(false, 0, { reason: "output is not an object" });
51
+ }
52
+ const present = output;
53
+ const missing = required.filter((key) => !(key in present));
54
+ return {
55
+ passed: missing.length === 0,
56
+ score: required.length ? (required.length - missing.length) / required.length : 1,
57
+ evidence: missing.length ? { missing } : void 0
58
+ };
59
+ }
60
+ };
61
+ const confidenceThresholdConfig = baseConfigSchema.extend({
62
+ threshold: z.number().catch(0.5),
63
+ direction: directionSchema.catch("gte")
64
+ });
65
+ const confidenceThresholdWriteConfig = baseConfigSchema.extend({
66
+ threshold: z.number().min(0).max(1).default(0.5),
67
+ direction: directionSchema.default("gte")
68
+ });
69
+ const confidenceThreshold = {
70
+ scorerKey: "confidence_threshold",
71
+ labelKey: `${I18N}.confidence_threshold`,
72
+ group: "agent",
73
+ kind: "deterministic",
74
+ configSchema: confidenceThresholdConfig,
75
+ writeConfigSchema: confidenceThresholdWriteConfig,
76
+ fields: [
77
+ {
78
+ name: "threshold",
79
+ kind: "slider",
80
+ labelKey: `${I18N}.confidence_threshold.field.threshold`,
81
+ hintKey: `${I18N}.confidence_threshold.field.threshold.hint`,
82
+ min: 0,
83
+ max: 1,
84
+ step: 0.05,
85
+ required: true,
86
+ default: 0.5
87
+ },
88
+ {
89
+ name: "direction",
90
+ kind: "select",
91
+ labelKey: `${I18N}.field.direction`,
92
+ options: [
93
+ { value: "gte", labelKey: `${I18N}.direction.gte` },
94
+ { value: "lte", labelKey: `${I18N}.direction.lte` }
95
+ ],
96
+ default: "gte"
97
+ }
98
+ ],
99
+ needsExpected: () => false,
100
+ score: (run, _expected, config) => {
101
+ const threshold = config.threshold;
102
+ const confidence = typeof run.confidence === "number" ? run.confidence : null;
103
+ if (confidence === null) {
104
+ return verdict(false, 0, { reason: "run has no confidence" });
105
+ }
106
+ const passed = config.direction === "gte" ? confidence >= threshold : confidence <= threshold;
107
+ return { passed, score: confidence, evidence: { confidence, threshold, direction: config.direction } };
108
+ }
109
+ };
110
+ const dispositionEqualsConfig = baseConfigSchema.extend({
111
+ expected: z.enum(["pending", "auto_approved", "approved", "edited", "rejected", "user_task"])
112
+ });
113
+ const dispositionEquals = {
114
+ scorerKey: "disposition_equals",
115
+ labelKey: `${I18N}.disposition_equals`,
116
+ group: "agent",
117
+ kind: "deterministic",
118
+ configSchema: dispositionEqualsConfig,
119
+ fields: [
120
+ {
121
+ name: "expected",
122
+ kind: "select",
123
+ labelKey: `${I18N}.disposition_equals.field.expected`,
124
+ hintKey: `${I18N}.disposition_equals.field.expected.hint`,
125
+ required: true,
126
+ options: [
127
+ { value: "pending", labelKey: `${I18N}.disposition.pending` },
128
+ { value: "auto_approved", labelKey: `${I18N}.disposition.auto_approved` },
129
+ { value: "approved", labelKey: `${I18N}.disposition.approved` },
130
+ { value: "edited", labelKey: `${I18N}.disposition.edited` },
131
+ { value: "rejected", labelKey: `${I18N}.disposition.rejected` },
132
+ { value: "user_task", labelKey: `${I18N}.disposition.user_task` }
133
+ ]
134
+ }
135
+ ],
136
+ needsExpected: () => false,
137
+ score: (run, _expected, config) => {
138
+ const actual = run.disposition;
139
+ if (actual === null) {
140
+ return skipped(SKIP_REASON.notApplicable, { reason: "run has no disposition" });
141
+ }
142
+ return {
143
+ passed: actual === config.expected,
144
+ score: actual === config.expected ? 1 : 0,
145
+ evidence: { actual, expected: config.expected }
146
+ };
147
+ }
148
+ };
149
+ const noPiiConfig = baseConfigSchema;
150
+ const noPii = {
151
+ scorerKey: "no_pii",
152
+ labelKey: `${I18N}.no_pii`,
153
+ group: "agent",
154
+ kind: "deterministic",
155
+ configSchema: noPiiConfig,
156
+ fields: [],
157
+ needsExpected: () => false,
158
+ score: (run) => {
159
+ const text = toText(run.output);
160
+ const detected = PII_PATTERNS.filter(({ re }) => re.test(text)).map(({ name }) => name);
161
+ return {
162
+ passed: detected.length === 0,
163
+ score: detected.length === 0 ? 1 : 0,
164
+ evidence: detected.length ? { detected } : void 0
165
+ };
166
+ }
167
+ };
168
+ const actionVocabularyConfig = baseConfigSchema.extend({
169
+ allowedActions: z.array(z.unknown()).catch([]).transform((entries) => entries.map((entry) => String(entry))),
170
+ agentType: agentTypeSchema.optional()
171
+ });
172
+ function proposedActionTypes(output) {
173
+ if (output === null || typeof output !== "object" || Array.isArray(output)) return [];
174
+ const envelope = normalizeProposalEnvelope(
175
+ output.proposal ?? output
176
+ );
177
+ return envelope.options.flatMap((option) => option.actions.map((action) => action.type));
178
+ }
179
+ const actionVocabulary = {
180
+ scorerKey: "action_vocabulary",
181
+ labelKey: `${I18N}.action_vocabulary`,
182
+ group: "agent",
183
+ kind: "deterministic",
184
+ configSchema: actionVocabularyConfig,
185
+ fields: [
186
+ {
187
+ name: "allowedActions",
188
+ kind: "string-list",
189
+ labelKey: `${I18N}.action_vocabulary.field.allowedActions`,
190
+ hintKey: `${I18N}.action_vocabulary.field.allowedActions.hint`,
191
+ required: true
192
+ },
193
+ {
194
+ name: "agentType",
195
+ kind: "select",
196
+ labelKey: `${I18N}.action_vocabulary.field.agentType`,
197
+ hintKey: `${I18N}.action_vocabulary.field.agentType.hint`,
198
+ options: [
199
+ { value: "researcher", labelKey: `${I18N}.agentType.researcher` },
200
+ { value: "decision_maker", labelKey: `${I18N}.agentType.decision_maker` },
201
+ { value: "action", labelKey: `${I18N}.agentType.action` }
202
+ ]
203
+ }
204
+ ],
205
+ needsExpected: () => false,
206
+ score: (run, _expected, config) => {
207
+ if (config.agentType && run.agentType !== config.agentType) {
208
+ return skipped(SKIP_REASON.notApplicable, { reason: "agent type does not match", agentType: run.agentType });
209
+ }
210
+ const proposed = proposedActionTypes(run.output);
211
+ if (proposed.length === 0) {
212
+ return skipped(SKIP_REASON.notApplicable, { reason: "run proposed no action" });
213
+ }
214
+ const allowed = new Set(config.allowedActions);
215
+ const offending = [...new Set(proposed.filter((type) => !allowed.has(type)))];
216
+ return {
217
+ passed: offending.length === 0,
218
+ score: offending.length === 0 ? 1 : 0,
219
+ evidence: offending.length ? { offending, allowed: config.allowedActions } : void 0
220
+ };
221
+ }
222
+ };
223
+ const agentScorers = [
224
+ outputPresent,
225
+ requiredKeys,
226
+ confidenceThreshold,
227
+ dispositionEquals,
228
+ noPii,
229
+ actionVocabulary
230
+ ];
231
+ export {
232
+ actionVocabulary,
233
+ agentScorers,
234
+ confidenceThreshold,
235
+ dispositionEquals,
236
+ noPii,
237
+ outputPresent,
238
+ requiredKeys
239
+ };
240
+ //# sourceMappingURL=agent.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/modules/agent_orchestrator/lib/eval/registry/agent.ts"],
4
+ "sourcesContent": ["import { z } from 'zod'\nimport { agentTypeSchema } from '../../../data/validators'\nimport { normalizeProposalEnvelope } from '../../../data/proposalEnvelope'\nimport type { Json, ScorerDefinition } from '../types'\nimport { SKIP_REASON, skipped } from '../types'\nimport { baseConfigSchema, directionSchema, toText, verdict } from './shared'\n\nconst I18N = 'agent_orchestrator.evalAssertions.scorer'\n\n// Non-global patterns (presence detection only) \u2014 keeps scorers stateless/pure.\nconst PII_PATTERNS: Array<{ name: string; re: RegExp }> = [\n { name: 'email', re: /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}/ },\n { name: 'ssn', re: /\\b\\d{3}-\\d{2}-\\d{4}\\b/ },\n { name: 'phone', re: /\\b(?:\\+?\\d{1,3}[-.\\s]?)?\\(?\\d{3}\\)?[-.\\s]?\\d{3}[-.\\s]?\\d{4}\\b/ },\n]\n\nconst outputPresentConfig = baseConfigSchema\nexport type OutputPresentConfig = z.infer<typeof outputPresentConfig>\n\n/**\n * Behaviour preserved verbatim from the pre-registry scorer so the Phase 1\n * migration cannot move an online `gate` verdict.\n */\nexport const outputPresent: ScorerDefinition<OutputPresentConfig> = {\n scorerKey: 'output_present',\n labelKey: `${I18N}.output_present`,\n group: 'agent',\n kind: 'deterministic',\n configSchema: outputPresentConfig,\n fields: [],\n needsExpected: () => false,\n score: (run) => {\n const output = run.output\n const empty =\n output === null ||\n output === undefined ||\n (typeof output === 'object' && Object.keys(output as object).length === 0)\n return verdict(!empty, empty ? 0 : 1)\n },\n}\n\n/**\n * Element-wise coercion, not `z.array(z.string())`.\n *\n * The pre-registry code was `Array.isArray(c.requiredKeys) ? c.requiredKeys : []`\n * \u2014 no element-type check \u2014 so a stored `['status', 1]` produced `missing: [1]`\n * and FAILED. A whole-array `z.string()` schema fails on the one bad element and\n * `.catch([])` then substitutes an EMPTY list, which passes vacuously: a stored\n * gate silently flips fail \u2192 pass. Coercing per element reproduces the original\n * key lookup instead of discarding the list.\n */\nconst requiredKeysConfig = baseConfigSchema.extend({\n requiredKeys: z\n .array(z.unknown())\n .catch([])\n .transform((entries) => entries.map((entry) => String(entry))),\n})\nexport type RequiredKeysConfig = z.infer<typeof requiredKeysConfig>\n\n/**\n * Retained as its own scorer rather than folded into `json_match`: user-authored\n * rows may carry `gate` severity, and rewriting their config blind risks moving an\n * online verdict for zero benefit. New assertions should prefer `json_match`.\n *\n * @deprecated for new assertions \u2014 use `json_match` with `source: 'config'`.\n */\nexport const requiredKeys: ScorerDefinition<RequiredKeysConfig> = {\n scorerKey: 'required_keys',\n labelKey: `${I18N}.required_keys`,\n group: 'agent',\n kind: 'deterministic',\n configSchema: requiredKeysConfig,\n fields: [\n {\n name: 'requiredKeys',\n kind: 'string-list',\n labelKey: `${I18N}.required_keys.field.requiredKeys`,\n hintKey: `${I18N}.required_keys.field.requiredKeys.hint`,\n required: true,\n },\n ],\n needsExpected: () => false,\n score: (run, _expected, config) => {\n const required = config.requiredKeys ?? []\n const output = run.output\n if (!output || typeof output !== 'object') {\n return verdict(false, 0, { reason: 'output is not an object' })\n }\n const present = output as Record<string, Json>\n const missing = required.filter((key) => !(key in present))\n return {\n passed: missing.length === 0,\n score: required.length ? (required.length - missing.length) / required.length : 1,\n evidence: missing.length ? { missing } : undefined,\n }\n },\n}\n\n/**\n * Evaluation schema is deliberately as loose as the code it replaces\n * (`typeof config.threshold === 'number' ? config.threshold : 0.5`). An\n * out-of-range threshold such as `85` \u2014 the percent-vs-fraction mistake \u2014 used to\n * make a gate assertion fail EVERY run; rejecting it here would skip the\n * assertion, drop it from the gate, and flip `evalPassed` from false to true. The\n * gate would fail open.\n */\nconst confidenceThresholdConfig = baseConfigSchema.extend({\n threshold: z.number().catch(0.5),\n direction: directionSchema.catch('gte'),\n})\nexport type ConfidenceThresholdConfig = z.infer<typeof confidenceThresholdConfig>\n\n/** Range is enforced only on write, where rejecting cannot move a stored verdict. */\nconst confidenceThresholdWriteConfig = baseConfigSchema.extend({\n threshold: z.number().min(0).max(1).default(0.5),\n direction: directionSchema.default('gte'),\n})\n\n/**\n * Supersedes `min_confidence` (kept as a deprecated alias in the registry index).\n *\n * NOTE \u2014 deliberate exception to the skip doctrine: a run with no confidence\n * returns `passed: false`, NOT a skip. This reproduces the shipped\n * `min_confidence` behaviour exactly; skipping instead would silently convert an\n * existing online failure into a non-result and move `evalPassed`.\n */\nexport const confidenceThreshold: ScorerDefinition<ConfidenceThresholdConfig> = {\n scorerKey: 'confidence_threshold',\n labelKey: `${I18N}.confidence_threshold`,\n group: 'agent',\n kind: 'deterministic',\n configSchema: confidenceThresholdConfig,\n writeConfigSchema: confidenceThresholdWriteConfig,\n fields: [\n {\n name: 'threshold',\n kind: 'slider',\n labelKey: `${I18N}.confidence_threshold.field.threshold`,\n hintKey: `${I18N}.confidence_threshold.field.threshold.hint`,\n min: 0,\n max: 1,\n step: 0.05,\n required: true,\n default: 0.5,\n },\n {\n name: 'direction',\n kind: 'select',\n labelKey: `${I18N}.field.direction`,\n options: [\n { value: 'gte', labelKey: `${I18N}.direction.gte` },\n { value: 'lte', labelKey: `${I18N}.direction.lte` },\n ],\n default: 'gte',\n },\n ],\n needsExpected: () => false,\n score: (run, _expected, config) => {\n const threshold = config.threshold\n const confidence = typeof run.confidence === 'number' ? run.confidence : null\n if (confidence === null) {\n return verdict(false, 0, { reason: 'run has no confidence' })\n }\n const passed = config.direction === 'gte' ? confidence >= threshold : confidence <= threshold\n return { passed, score: confidence, evidence: { confidence, threshold, direction: config.direction } }\n },\n}\n\nconst dispositionEqualsConfig = baseConfigSchema.extend({\n expected: z.enum(['pending', 'auto_approved', 'approved', 'edited', 'rejected', 'user_task']),\n})\nexport type DispositionEqualsConfig = z.infer<typeof dispositionEqualsConfig>\n\n/**\n * The orchestration-specific assertion no general-purpose eval framework can\n * express: did the agent correctly escalate to a human instead of auto-approving?\n */\nexport const dispositionEquals: ScorerDefinition<DispositionEqualsConfig> = {\n scorerKey: 'disposition_equals',\n labelKey: `${I18N}.disposition_equals`,\n group: 'agent',\n kind: 'deterministic',\n configSchema: dispositionEqualsConfig,\n fields: [\n {\n name: 'expected',\n kind: 'select',\n labelKey: `${I18N}.disposition_equals.field.expected`,\n hintKey: `${I18N}.disposition_equals.field.expected.hint`,\n required: true,\n options: [\n { value: 'pending', labelKey: `${I18N}.disposition.pending` },\n { value: 'auto_approved', labelKey: `${I18N}.disposition.auto_approved` },\n { value: 'approved', labelKey: `${I18N}.disposition.approved` },\n { value: 'edited', labelKey: `${I18N}.disposition.edited` },\n { value: 'rejected', labelKey: `${I18N}.disposition.rejected` },\n { value: 'user_task', labelKey: `${I18N}.disposition.user_task` },\n ],\n },\n ],\n needsExpected: () => false,\n score: (run, _expected, config) => {\n const actual = run.disposition\n if (actual === null) {\n // No proposal on this run \u2014 the disposition is unknown, not different. A\n // run that produced no proposal (researcher agents, or a trace ingested\n // before the proposal is written) must not read as a failed expectation.\n return skipped(SKIP_REASON.notApplicable, { reason: 'run has no disposition' })\n }\n return {\n passed: actual === config.expected,\n score: actual === config.expected ? 1 : 0,\n evidence: { actual, expected: config.expected },\n }\n },\n}\n\nconst noPiiConfig = baseConfigSchema\nexport type NoPiiConfig = z.infer<typeof noPiiConfig>\n\nexport const noPii: ScorerDefinition<NoPiiConfig> = {\n scorerKey: 'no_pii',\n labelKey: `${I18N}.no_pii`,\n group: 'agent',\n kind: 'deterministic',\n configSchema: noPiiConfig,\n fields: [],\n needsExpected: () => false,\n score: (run) => {\n const text = toText(run.output)\n const detected = PII_PATTERNS.filter(({ re }) => re.test(text)).map(({ name }) => name)\n return {\n passed: detected.length === 0,\n score: detected.length === 0 ? 1 : 0,\n evidence: detected.length ? { detected } : undefined,\n }\n },\n}\n\n/**\n * `allowedActions` is coerced per element for the same reason `required_keys` is: a\n * whole-array `z.array(z.string())` with `.catch([])` would substitute an EMPTY list on\n * one bad element, and an empty allowlist here passes VACUOUSLY \u2014 a stored gate would\n * silently flip fail \u2192 pass, which is the one direction this assertion must never move.\n *\n * `agentType` narrows the assertion to one declared type so a suite can say \"a\n * decision-maker may only propose status changes\" without also constraining action\n * agents. Absent means every type.\n */\nconst actionVocabularyConfig = baseConfigSchema.extend({\n allowedActions: z\n .array(z.unknown())\n .catch([])\n .transform((entries) => entries.map((entry) => String(entry))),\n agentType: agentTypeSchema.optional(),\n})\nexport type ActionVocabularyConfig = z.infer<typeof actionVocabularyConfig>\n\n/** Every action type the run's proposal offered, across ALL options \u2014 a rejected option still proposed it. */\nfunction proposedActionTypes(output: Json | null): string[] {\n if (output === null || typeof output !== 'object' || Array.isArray(output)) return []\n const envelope = normalizeProposalEnvelope(\n (output as Record<string, Json>).proposal ?? output,\n )\n return envelope.options.flatMap((option) => option.actions.map((action) => action.type))\n}\n\n/**\n * The eval half of the action vocabulary (spec `2026-08-11-agent-taxonomy.md`, step 9).\n *\n * The runtime check blocks an out-of-vocabulary effect at disposition time; this makes\n * the same violation VISIBLE as a failed assertion, because an agent that keeps\n * proposing actions it may not run is a prompt defect, not an execution one \u2014 the\n * blocked effect leaves no trace an operator would ever look at.\n *\n * Deliberately CONFIG-driven rather than reading the live catalogue: a scorer is pure\n * and must produce the same verdict online, in the replay engine and in the CI gate,\n * which a deployment-dependent catalogue could not.\n */\nexport const actionVocabulary: ScorerDefinition<ActionVocabularyConfig> = {\n scorerKey: 'action_vocabulary',\n labelKey: `${I18N}.action_vocabulary`,\n group: 'agent',\n kind: 'deterministic',\n configSchema: actionVocabularyConfig,\n fields: [\n {\n name: 'allowedActions',\n kind: 'string-list',\n labelKey: `${I18N}.action_vocabulary.field.allowedActions`,\n hintKey: `${I18N}.action_vocabulary.field.allowedActions.hint`,\n required: true,\n },\n {\n name: 'agentType',\n kind: 'select',\n labelKey: `${I18N}.action_vocabulary.field.agentType`,\n hintKey: `${I18N}.action_vocabulary.field.agentType.hint`,\n options: [\n { value: 'researcher', labelKey: `${I18N}.agentType.researcher` },\n { value: 'decision_maker', labelKey: `${I18N}.agentType.decision_maker` },\n { value: 'action', labelKey: `${I18N}.agentType.action` },\n ],\n },\n ],\n needsExpected: () => false,\n score: (run, _expected, config) => {\n if (config.agentType && run.agentType !== config.agentType) {\n return skipped(SKIP_REASON.notApplicable, { reason: 'agent type does not match', agentType: run.agentType })\n }\n const proposed = proposedActionTypes(run.output)\n if (proposed.length === 0) {\n // A run that proposed nothing cannot have proposed something forbidden. Skipping\n // rather than passing keeps a researcher run out of the pass aggregate entirely.\n return skipped(SKIP_REASON.notApplicable, { reason: 'run proposed no action' })\n }\n const allowed = new Set(config.allowedActions)\n const offending = [...new Set(proposed.filter((type) => !allowed.has(type)))]\n return {\n passed: offending.length === 0,\n score: offending.length === 0 ? 1 : 0,\n evidence: offending.length ? { offending, allowed: config.allowedActions } : undefined,\n }\n },\n}\n\nexport const agentScorers = [\n outputPresent,\n requiredKeys,\n confidenceThreshold,\n dispositionEquals,\n noPii,\n actionVocabulary,\n] as const\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -0,0 +1,77 @@
1
+ import { z } from "zod";
2
+ import { SKIP_REASON, skipped } from "../types.js";
3
+ import { baseConfigSchema, compareThreshold, directionSchema } from "./shared.js";
4
+ const I18N = "agent_orchestrator.evalAssertions.scorer";
5
+ function thresholdScorer(scorerKey, defaults, read, unitHintKey) {
6
+ return {
7
+ scorerKey,
8
+ labelKey: `${I18N}.${scorerKey}`,
9
+ group: "economics",
10
+ kind: "deterministic",
11
+ configSchema: thresholdConfig,
12
+ fields: [
13
+ {
14
+ name: "threshold",
15
+ kind: "number",
16
+ labelKey: `${I18N}.${scorerKey}.field.threshold`,
17
+ hintKey: unitHintKey,
18
+ min: 0,
19
+ required: true,
20
+ default: defaults.threshold
21
+ },
22
+ {
23
+ name: "direction",
24
+ kind: "select",
25
+ labelKey: `${I18N}.field.direction`,
26
+ default: defaults.direction,
27
+ options: [
28
+ { value: "lte", labelKey: `${I18N}.direction.lte` },
29
+ { value: "gte", labelKey: `${I18N}.direction.gte` }
30
+ ]
31
+ }
32
+ ],
33
+ needsExpected: () => false,
34
+ score: (run, _expected, config) => {
35
+ const actual = read(run);
36
+ if (actual === null) {
37
+ return skipped(SKIP_REASON.notApplicable, { reason: `run has no ${scorerKey} measurement` });
38
+ }
39
+ const passed = compareThreshold(actual, config.threshold, config.direction);
40
+ return {
41
+ passed,
42
+ score: passed ? 1 : 0,
43
+ evidence: { actual, threshold: config.threshold, direction: config.direction }
44
+ };
45
+ }
46
+ };
47
+ }
48
+ const thresholdConfig = baseConfigSchema.extend({
49
+ threshold: z.number().min(0),
50
+ direction: directionSchema.default("lte")
51
+ });
52
+ const latency = thresholdScorer(
53
+ "latency",
54
+ { threshold: 3e4, direction: "lte" },
55
+ (run) => run.latencyMs,
56
+ `${I18N}.latency.field.threshold.hint`
57
+ );
58
+ const cost = thresholdScorer(
59
+ "cost",
60
+ { threshold: 100, direction: "lte" },
61
+ (run) => run.costMinor,
62
+ `${I18N}.cost.field.threshold.hint`
63
+ );
64
+ const stepCount = thresholdScorer(
65
+ "step_count",
66
+ { threshold: 20, direction: "lte" },
67
+ (run) => run.stepCount,
68
+ `${I18N}.step_count.field.threshold.hint`
69
+ );
70
+ const economicsScorers = [latency, cost, stepCount];
71
+ export {
72
+ cost,
73
+ economicsScorers,
74
+ latency,
75
+ stepCount
76
+ };
77
+ //# sourceMappingURL=economics.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/modules/agent_orchestrator/lib/eval/registry/economics.ts"],
4
+ "sourcesContent": ["import { z } from 'zod'\nimport type { ScorerDefinition, ScorerRunView } from '../types'\nimport { SKIP_REASON, skipped } from '../types'\nimport { baseConfigSchema, compareThreshold, directionSchema } from './shared'\n\nconst I18N = 'agent_orchestrator.evalAssertions.scorer'\n\n/**\n * Run-economics scorers. Every one carries an explicit `direction` \u2014 DeepEval's\n * BiasMetric taught the industry that an implicit \"threshold is a maximum here but\n * a minimum everywhere else\" convention is a reliable source of inverted gates.\n */\nfunction thresholdScorer(\n scorerKey: string,\n defaults: { threshold: number; direction: 'gte' | 'lte' },\n read: (run: ScorerRunView) => number | null,\n unitHintKey: string,\n): ScorerDefinition<ThresholdConfig> {\n return {\n scorerKey,\n labelKey: `${I18N}.${scorerKey}`,\n group: 'economics',\n kind: 'deterministic',\n configSchema: thresholdConfig,\n fields: [\n {\n name: 'threshold',\n kind: 'number',\n labelKey: `${I18N}.${scorerKey}.field.threshold`,\n hintKey: unitHintKey,\n min: 0,\n required: true,\n default: defaults.threshold,\n },\n {\n name: 'direction',\n kind: 'select',\n labelKey: `${I18N}.field.direction`,\n default: defaults.direction,\n options: [\n { value: 'lte', labelKey: `${I18N}.direction.lte` },\n { value: 'gte', labelKey: `${I18N}.direction.gte` },\n ],\n },\n ],\n needsExpected: () => false,\n score: (run, _expected, config) => {\n const actual = read(run)\n if (actual === null) {\n // The run never recorded this measurement (e.g. a run with no latency\n // stamp). Not a failure of the agent \u2014 skip.\n return skipped(SKIP_REASON.notApplicable, { reason: `run has no ${scorerKey} measurement` })\n }\n const passed = compareThreshold(actual, config.threshold, config.direction)\n return {\n passed,\n score: passed ? 1 : 0,\n evidence: { actual, threshold: config.threshold, direction: config.direction },\n }\n },\n }\n}\n\nconst thresholdConfig = baseConfigSchema.extend({\n threshold: z.number().min(0),\n direction: directionSchema.default('lte'),\n})\nexport type ThresholdConfig = z.infer<typeof thresholdConfig>\n\nexport const latency = thresholdScorer(\n 'latency',\n { threshold: 30_000, direction: 'lte' },\n (run) => run.latencyMs,\n `${I18N}.latency.field.threshold.hint`,\n)\n\nexport const cost = thresholdScorer(\n 'cost',\n { threshold: 100, direction: 'lte' },\n (run) => run.costMinor,\n `${I18N}.cost.field.threshold.hint`,\n)\n\nexport const stepCount = thresholdScorer(\n 'step_count',\n { threshold: 20, direction: 'lte' },\n (run) => run.stepCount,\n `${I18N}.step_count.field.threshold.hint`,\n)\n\nexport const economicsScorers = [latency, cost, stepCount] as const\n"],
5
+ "mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,aAAa,eAAe;AACrC,SAAS,kBAAkB,kBAAkB,uBAAuB;AAEpE,MAAM,OAAO;AAOb,SAAS,gBACP,WACA,UACA,MACA,aACmC;AACnC,SAAO;AAAA,IACL;AAAA,IACA,UAAU,GAAG,IAAI,IAAI,SAAS;AAAA,IAC9B,OAAO;AAAA,IACP,MAAM;AAAA,IACN,cAAc;AAAA,IACd,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,UAAU,GAAG,IAAI,IAAI,SAAS;AAAA,QAC9B,SAAS;AAAA,QACT,KAAK;AAAA,QACL,UAAU;AAAA,QACV,SAAS,SAAS;AAAA,MACpB;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,UAAU,GAAG,IAAI;AAAA,QACjB,SAAS,SAAS;AAAA,QAClB,SAAS;AAAA,UACP,EAAE,OAAO,OAAO,UAAU,GAAG,IAAI,iBAAiB;AAAA,UAClD,EAAE,OAAO,OAAO,UAAU,GAAG,IAAI,iBAAiB;AAAA,QACpD;AAAA,MACF;AAAA,IACF;AAAA,IACA,eAAe,MAAM;AAAA,IACrB,OAAO,CAAC,KAAK,WAAW,WAAW;AACjC,YAAM,SAAS,KAAK,GAAG;AACvB,UAAI,WAAW,MAAM;AAGnB,eAAO,QAAQ,YAAY,eAAe,EAAE,QAAQ,cAAc,SAAS,eAAe,CAAC;AAAA,MAC7F;AACA,YAAM,SAAS,iBAAiB,QAAQ,OAAO,WAAW,OAAO,SAAS;AAC1E,aAAO;AAAA,QACL;AAAA,QACA,OAAO,SAAS,IAAI;AAAA,QACpB,UAAU,EAAE,QAAQ,WAAW,OAAO,WAAW,WAAW,OAAO,UAAU;AAAA,MAC/E;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,kBAAkB,iBAAiB,OAAO;AAAA,EAC9C,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EAC3B,WAAW,gBAAgB,QAAQ,KAAK;AAC1C,CAAC;AAGM,MAAM,UAAU;AAAA,EACrB;AAAA,EACA,EAAE,WAAW,KAAQ,WAAW,MAAM;AAAA,EACtC,CAAC,QAAQ,IAAI;AAAA,EACb,GAAG,IAAI;AACT;AAEO,MAAM,OAAO;AAAA,EAClB;AAAA,EACA,EAAE,WAAW,KAAK,WAAW,MAAM;AAAA,EACnC,CAAC,QAAQ,IAAI;AAAA,EACb,GAAG,IAAI;AACT;AAEO,MAAM,YAAY;AAAA,EACvB;AAAA,EACA,EAAE,WAAW,IAAI,WAAW,MAAM;AAAA,EAClC,CAAC,QAAQ,IAAI;AAAA,EACb,GAAG,IAAI;AACT;AAEO,MAAM,mBAAmB,CAAC,SAAS,MAAM,SAAS;",
6
+ "names": []
7
+ }
@@ -0,0 +1,97 @@
1
+ import { SKIP_REASON, skipped } from "../types.js";
2
+ import { agentScorers } from "./agent.js";
3
+ import { economicsScorers } from "./economics.js";
4
+ import { judgeScorers } from "./judge.js";
5
+ import { structuredScorers } from "./structured.js";
6
+ import { textScorers } from "./text.js";
7
+ import { toolScorers } from "./tools.js";
8
+ const definitions = [
9
+ ...textScorers,
10
+ ...structuredScorers,
11
+ ...toolScorers,
12
+ ...economicsScorers,
13
+ ...agentScorers,
14
+ ...judgeScorers
15
+ ];
16
+ const registry = new Map(
17
+ definitions.map((definition) => [definition.scorerKey, definition])
18
+ );
19
+ const DEPRECATED_SCORER_ALIASES = {
20
+ min_confidence: "confidence_threshold"
21
+ };
22
+ function getScorerDefinition(scorerKey) {
23
+ const canonical = DEPRECATED_SCORER_ALIASES[scorerKey] ?? scorerKey;
24
+ return registry.get(canonical);
25
+ }
26
+ function listScorerDefinitions() {
27
+ return definitions;
28
+ }
29
+ function resolveScorerKey(assertion) {
30
+ if (assertion.scorerKey) return assertion.scorerKey;
31
+ const config = assertion.config ?? {};
32
+ if (typeof config.scorer === "string" && config.scorer) return config.scorer;
33
+ return assertion.key;
34
+ }
35
+ function describeScorers() {
36
+ const described = definitions.map((definition) => ({
37
+ scorerKey: definition.scorerKey,
38
+ labelKey: definition.labelKey,
39
+ group: definition.group,
40
+ kind: definition.kind,
41
+ fields: definition.fields
42
+ }));
43
+ const aliases = Object.entries(DEPRECATED_SCORER_ALIASES).flatMap(([alias, canonical]) => {
44
+ const target = registry.get(canonical);
45
+ if (!target) return [];
46
+ return [
47
+ {
48
+ scorerKey: alias,
49
+ labelKey: `agent_orchestrator.evalAssertions.scorer.${alias}`,
50
+ group: target.group,
51
+ kind: target.kind,
52
+ fields: target.fields,
53
+ deprecated: true,
54
+ deprecatedInFavourOf: canonical
55
+ }
56
+ ];
57
+ });
58
+ return [...described, ...aliases];
59
+ }
60
+ function parseScorerConfig(scorerKey, rawConfig, mode = "read") {
61
+ const definition = getScorerDefinition(scorerKey);
62
+ if (!definition) return { ok: false, issues: [`unknown scorer "${scorerKey}"`] };
63
+ const source = rawConfig ?? {};
64
+ const { scorer: _legacyScorerKey, ...rest } = source;
65
+ const schema = mode === "write" ? definition.writeConfigSchema ?? definition.configSchema : definition.configSchema;
66
+ const parsed = schema.safeParse(rest);
67
+ if (!parsed.success) {
68
+ return { ok: false, issues: parsed.error.issues.map((issue) => `${issue.path.join(".") || "."}: ${issue.message}`) };
69
+ }
70
+ return { ok: true, config: parsed.data };
71
+ }
72
+ function runScorer(scorerKey, run, expected, rawConfig) {
73
+ const definition = getScorerDefinition(scorerKey);
74
+ if (!definition) return skipped(SKIP_REASON.unknownScorer, { scorerKey });
75
+ const parsed = parseScorerConfig(scorerKey, rawConfig);
76
+ if (!parsed.ok) return skipped(SKIP_REASON.invalidConfig, { scorerKey, issues: parsed.issues });
77
+ const config = parsed.config;
78
+ if (definition.needsExpected(config) && expected === null) return skipped(SKIP_REASON.noExpected, { scorerKey });
79
+ const verdict = definition.score(run, expected, config);
80
+ const negate = Boolean(parsed.config.negate);
81
+ if (!negate || verdict.passed === null) return verdict;
82
+ return {
83
+ passed: !verdict.passed,
84
+ score: verdict.score === null ? null : 1 - verdict.score,
85
+ evidence: verdict.evidence
86
+ };
87
+ }
88
+ export {
89
+ DEPRECATED_SCORER_ALIASES,
90
+ describeScorers,
91
+ getScorerDefinition,
92
+ listScorerDefinitions,
93
+ parseScorerConfig,
94
+ resolveScorerKey,
95
+ runScorer
96
+ };
97
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/modules/agent_orchestrator/lib/eval/registry/index.ts"],
4
+ "sourcesContent": ["import type { Json, ScorerDefinition, ScorerDescriptor, ScorerRunView, ScorerVerdict } from '../types'\nimport { SKIP_REASON, skipped } from '../types'\nimport { agentScorers } from './agent'\nimport { economicsScorers } from './economics'\nimport { judgeScorers } from './judge'\nimport { structuredScorers } from './structured'\nimport { textScorers } from './text'\nimport { toolScorers } from './tools'\n\n/**\n * The single source of truth for scorer identity. 21 definitions \u2014 20 deterministic\n * plus `llm_judge` \u2014 consumed by the online plane (EvalRuntimeService), the offline\n * plane (replay engine, CI gate) and `GET /eval-scorers`, which generates the\n * assertion form from `fields`.\n */\nconst definitions: ReadonlyArray<ScorerDefinition<never>> = [\n ...textScorers,\n ...structuredScorers,\n ...toolScorers,\n ...economicsScorers,\n ...agentScorers,\n ...judgeScorers,\n] as unknown as ReadonlyArray<ScorerDefinition<never>>\n\nconst registry = new Map<string, ScorerDefinition<never>>(\n definitions.map((definition) => [definition.scorerKey, definition]),\n)\n\n/**\n * Renamed keys. `min_confidence` is the only alias: it and `confidence_threshold`\n * both read `run.confidence` and neither touches `expected`, so the rename is\n * provably behaviour-preserving. `required_keys` is deliberately NOT aliased \u2014 see\n * the note on its definition.\n */\nexport const DEPRECATED_SCORER_ALIASES: Readonly<Record<string, string>> = {\n min_confidence: 'confidence_threshold',\n}\n\nexport function getScorerDefinition(scorerKey: string): ScorerDefinition<never> | undefined {\n const canonical = DEPRECATED_SCORER_ALIASES[scorerKey] ?? scorerKey\n return registry.get(canonical)\n}\n\nexport function listScorerDefinitions(): ReadonlyArray<ScorerDefinition<never>> {\n return definitions\n}\n\n/**\n * Resolution chain, widest-compatible first:\n * 1. the `scorer_key` column (Phase 1 onward)\n * 2. `config.scorer` \u2014 the undocumented indirection shipped before this column\n * existed, retained as a read-fallback for \u22651 minor\n * 3. the assertion `key`, which used to double as the scorer identity\n */\nexport function resolveScorerKey(assertion: {\n scorerKey?: string | null\n key: string\n config?: unknown\n}): string {\n if (assertion.scorerKey) return assertion.scorerKey\n const config = (assertion.config as Record<string, unknown> | null) ?? {}\n if (typeof config.scorer === 'string' && config.scorer) return config.scorer\n return assertion.key\n}\n\n/** Serializable projection for the browser \u2014 never ships `configSchema` or `score`. */\nexport function describeScorers(): ScorerDescriptor[] {\n const described = definitions.map((definition) => ({\n scorerKey: definition.scorerKey,\n labelKey: definition.labelKey,\n group: definition.group,\n kind: definition.kind,\n fields: definition.fields,\n }))\n const aliases = Object.entries(DEPRECATED_SCORER_ALIASES).flatMap(([alias, canonical]) => {\n const target = registry.get(canonical)\n if (!target) return []\n return [\n {\n scorerKey: alias,\n labelKey: `agent_orchestrator.evalAssertions.scorer.${alias}`,\n group: target.group,\n kind: target.kind,\n fields: target.fields,\n deprecated: true,\n deprecatedInFavourOf: canonical,\n },\n ]\n })\n return [...described, ...aliases]\n}\n\nexport type ScorerConfigParseResult =\n | { ok: true; config: unknown }\n | { ok: false; issues: string[] }\n\n/**\n * Validates a raw config against its scorer's schema.\n *\n * `mode: 'write'` uses the stricter `writeConfigSchema` where one exists \u2014 range\n * and shape checks belong at the API boundary (422), never at evaluation time,\n * because rejecting a STORED config there turns an existing verdict into a skip\n * and can flip a gate open.\n */\nexport function parseScorerConfig(\n scorerKey: string,\n rawConfig: unknown,\n mode: 'read' | 'write' = 'read',\n): ScorerConfigParseResult {\n const definition = getScorerDefinition(scorerKey)\n if (!definition) return { ok: false, issues: [`unknown scorer \"${scorerKey}\"`] }\n\n // `config.scorer` is the deprecated indirection: strip it before validation so a\n // legacy row does not fail on an unrecognised property.\n const source = (rawConfig as Record<string, unknown> | null) ?? {}\n const { scorer: _legacyScorerKey, ...rest } = source\n const schema = mode === 'write' ? definition.writeConfigSchema ?? definition.configSchema : definition.configSchema\n const parsed = schema.safeParse(rest)\n if (!parsed.success) {\n return { ok: false, issues: parsed.error.issues.map((issue) => `${issue.path.join('.') || '.'}: ${issue.message}`) }\n }\n return { ok: true, config: parsed.data }\n}\n\n/**\n * Runs one assertion end to end: validates config, applies the runtime\n * `needsExpected` skip, delegates to the pure scorer, then applies `negate`\n * centrally so no individual scorer implements it.\n *\n * An invalid config or an unknown key yields a SKIPPED verdict, never a failed\n * one \u2014 a config typo must stay visible without flipping `AgentRun.evalPassed`.\n */\nexport function runScorer(\n scorerKey: string,\n run: ScorerRunView,\n expected: Json | null,\n rawConfig: unknown,\n): ScorerVerdict {\n const definition = getScorerDefinition(scorerKey)\n if (!definition) return skipped(SKIP_REASON.unknownScorer, { scorerKey })\n\n const parsed = parseScorerConfig(scorerKey, rawConfig)\n if (!parsed.ok) return skipped(SKIP_REASON.invalidConfig, { scorerKey, issues: parsed.issues })\n\n const config = parsed.config as never\n if (definition.needsExpected(config) && expected === null) return skipped(SKIP_REASON.noExpected, { scorerKey })\n\n const verdict = definition.score(run, expected, config)\n const negate = Boolean((parsed.config as { negate?: boolean }).negate)\n if (!negate || verdict.passed === null) return verdict\n\n return {\n passed: !verdict.passed,\n score: verdict.score === null ? null : 1 - verdict.score,\n evidence: verdict.evidence,\n }\n}\n"],
5
+ "mappings": "AACA,SAAS,aAAa,eAAe;AACrC,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,oBAAoB;AAC7B,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAQ5B,MAAM,cAAsD;AAAA,EAC1D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,WAAW,IAAI;AAAA,EACnB,YAAY,IAAI,CAAC,eAAe,CAAC,WAAW,WAAW,UAAU,CAAC;AACpE;AAQO,MAAM,4BAA8D;AAAA,EACzE,gBAAgB;AAClB;AAEO,SAAS,oBAAoB,WAAwD;AAC1F,QAAM,YAAY,0BAA0B,SAAS,KAAK;AAC1D,SAAO,SAAS,IAAI,SAAS;AAC/B;AAEO,SAAS,wBAAgE;AAC9E,SAAO;AACT;AASO,SAAS,iBAAiB,WAItB;AACT,MAAI,UAAU,UAAW,QAAO,UAAU;AAC1C,QAAM,SAAU,UAAU,UAA6C,CAAC;AACxE,MAAI,OAAO,OAAO,WAAW,YAAY,OAAO,OAAQ,QAAO,OAAO;AACtE,SAAO,UAAU;AACnB;AAGO,SAAS,kBAAsC;AACpD,QAAM,YAAY,YAAY,IAAI,CAAC,gBAAgB;AAAA,IACjD,WAAW,WAAW;AAAA,IACtB,UAAU,WAAW;AAAA,IACrB,OAAO,WAAW;AAAA,IAClB,MAAM,WAAW;AAAA,IACjB,QAAQ,WAAW;AAAA,EACrB,EAAE;AACF,QAAM,UAAU,OAAO,QAAQ,yBAAyB,EAAE,QAAQ,CAAC,CAAC,OAAO,SAAS,MAAM;AACxF,UAAM,SAAS,SAAS,IAAI,SAAS;AACrC,QAAI,CAAC,OAAQ,QAAO,CAAC;AACrB,WAAO;AAAA,MACL;AAAA,QACE,WAAW;AAAA,QACX,UAAU,4CAA4C,KAAK;AAAA,QAC3D,OAAO,OAAO;AAAA,QACd,MAAM,OAAO;AAAA,QACb,QAAQ,OAAO;AAAA,QACf,YAAY;AAAA,QACZ,sBAAsB;AAAA,MACxB;AAAA,IACF;AAAA,EACF,CAAC;AACD,SAAO,CAAC,GAAG,WAAW,GAAG,OAAO;AAClC;AAcO,SAAS,kBACd,WACA,WACA,OAAyB,QACA;AACzB,QAAM,aAAa,oBAAoB,SAAS;AAChD,MAAI,CAAC,WAAY,QAAO,EAAE,IAAI,OAAO,QAAQ,CAAC,mBAAmB,SAAS,GAAG,EAAE;AAI/E,QAAM,SAAU,aAAgD,CAAC;AACjE,QAAM,EAAE,QAAQ,kBAAkB,GAAG,KAAK,IAAI;AAC9C,QAAM,SAAS,SAAS,UAAU,WAAW,qBAAqB,WAAW,eAAe,WAAW;AACvG,QAAM,SAAS,OAAO,UAAU,IAAI;AACpC,MAAI,CAAC,OAAO,SAAS;AACnB,WAAO,EAAE,IAAI,OAAO,QAAQ,OAAO,MAAM,OAAO,IAAI,CAAC,UAAU,GAAG,MAAM,KAAK,KAAK,GAAG,KAAK,GAAG,KAAK,MAAM,OAAO,EAAE,EAAE;AAAA,EACrH;AACA,SAAO,EAAE,IAAI,MAAM,QAAQ,OAAO,KAAK;AACzC;AAUO,SAAS,UACd,WACA,KACA,UACA,WACe;AACf,QAAM,aAAa,oBAAoB,SAAS;AAChD,MAAI,CAAC,WAAY,QAAO,QAAQ,YAAY,eAAe,EAAE,UAAU,CAAC;AAExE,QAAM,SAAS,kBAAkB,WAAW,SAAS;AACrD,MAAI,CAAC,OAAO,GAAI,QAAO,QAAQ,YAAY,eAAe,EAAE,WAAW,QAAQ,OAAO,OAAO,CAAC;AAE9F,QAAM,SAAS,OAAO;AACtB,MAAI,WAAW,cAAc,MAAM,KAAK,aAAa,KAAM,QAAO,QAAQ,YAAY,YAAY,EAAE,UAAU,CAAC;AAE/G,QAAM,UAAU,WAAW,MAAM,KAAK,UAAU,MAAM;AACtD,QAAM,SAAS,QAAS,OAAO,OAAgC,MAAM;AACrE,MAAI,CAAC,UAAU,QAAQ,WAAW,KAAM,QAAO;AAE/C,SAAO;AAAA,IACL,QAAQ,CAAC,QAAQ;AAAA,IACjB,OAAO,QAAQ,UAAU,OAAO,OAAO,IAAI,QAAQ;AAAA,IACnD,UAAU,QAAQ;AAAA,EACpB;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,66 @@
1
+ import { z } from "zod";
2
+ import { skipped } from "../types.js";
3
+ import { judgeRubricSchema } from "../judgeRubric.js";
4
+ import { baseConfigSchema } from "./shared.js";
5
+ const I18N = "agent_orchestrator.evalAssertions.scorer";
6
+ const judgeConfig = z.union([
7
+ judgeRubricSchema.and(baseConfigSchema),
8
+ baseConfigSchema.extend({ rubric: z.string().optional() })
9
+ ]);
10
+ const judgeWriteConfig = z.union([
11
+ baseConfigSchema.extend({ rubric: z.string().min(1) }),
12
+ judgeRubricSchema.and(baseConfigSchema)
13
+ ]);
14
+ const llmJudge = {
15
+ scorerKey: "llm_judge",
16
+ labelKey: `${I18N}.llm_judge`,
17
+ group: "judge",
18
+ kind: "llm_judge",
19
+ configSchema: judgeConfig,
20
+ writeConfigSchema: judgeWriteConfig,
21
+ fields: [
22
+ {
23
+ name: "promptTemplate",
24
+ kind: "textarea",
25
+ labelKey: `${I18N}.llm_judge.field.rubric`,
26
+ hintKey: `${I18N}.llm_judge.field.rubric.hint`,
27
+ placeholderKey: `${I18N}.llm_judge.field.rubric.placeholder`,
28
+ required: true
29
+ },
30
+ {
31
+ name: "threshold",
32
+ kind: "slider",
33
+ labelKey: `${I18N}.llm_judge.field.threshold`,
34
+ hintKey: `${I18N}.llm_judge.field.threshold.hint`,
35
+ min: 0,
36
+ max: 1,
37
+ step: 0.05,
38
+ default: 0.5
39
+ },
40
+ {
41
+ name: "samples",
42
+ kind: "number",
43
+ labelKey: `${I18N}.llm_judge.field.samples`,
44
+ hintKey: `${I18N}.llm_judge.field.samples.hint`,
45
+ min: 1,
46
+ max: 9,
47
+ step: 2,
48
+ default: 1
49
+ },
50
+ {
51
+ name: "requireReasoning",
52
+ kind: "boolean",
53
+ labelKey: `${I18N}.llm_judge.field.requireReasoning`,
54
+ hintKey: `${I18N}.llm_judge.field.requireReasoning.hint`,
55
+ default: true
56
+ }
57
+ ],
58
+ needsExpected: () => false,
59
+ score: () => skipped("unknown_scorer", { reason: "llm_judge is scored asynchronously by the judge runner" })
60
+ };
61
+ const judgeScorers = [llmJudge];
62
+ export {
63
+ judgeScorers,
64
+ llmJudge
65
+ };
66
+ //# sourceMappingURL=judge.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/modules/agent_orchestrator/lib/eval/registry/judge.ts"],
4
+ "sourcesContent": ["import { z } from 'zod'\nimport type { ScorerDefinition } from '../types'\nimport { skipped } from '../types'\nimport { judgeRubricSchema } from '../judgeRubric'\nimport { baseConfigSchema } from './shared'\n\nconst I18N = 'agent_orchestrator.evalAssertions.scorer'\n\n/**\n * Accepts BOTH shapes on purpose:\n *\n * - the structured `JudgeRubric` (choice scoring, evaluation steps, sampling), and\n * - the pre-Phase-3 `{ rubric: string }` that the seeded `llm_judge_helpfulness`\n * assertion and every user-authored judge row still hold.\n *\n * A union rather than a migration: rewriting stored rubrics would change what\n * existing judges measure. `normalizeJudgeRubric` lifts the legacy form into an\n * equivalent binary rubric at evaluation time.\n */\nconst judgeConfig = z.union([\n judgeRubricSchema.and(baseConfigSchema),\n baseConfigSchema.extend({ rubric: z.string().optional() }),\n])\n\n/**\n * Write-boundary schema. The read union above ends in an all-optional object that\n * accepts ANYTHING, so using it for writes made `resolveScorerForWrite`'s promised\n * 422 unreachable: a structurally broken rubric (empty `promptTemplate`, one\n * choice) fell through to the permissive branch, saved with 200, and only failed\n * silently at evaluation time forever after.\n *\n * Discriminating on which key is PRESENT \u2014 mirroring `normalizeJudgeRubric` \u2014\n * routes a full rubric to the strict schema while still accepting the legacy form.\n */\nconst judgeWriteConfig = z.union([\n baseConfigSchema.extend({ rubric: z.string().min(1) }),\n judgeRubricSchema.and(baseConfigSchema),\n])\nexport type JudgeConfig = z.infer<typeof judgeConfig>\n\n/**\n * `llm_judge` is a first-class registry member so `GET /eval-scorers` can project\n * it and the generated form can render it \u2014 it is the registry's hardest scorer,\n * not a parallel mechanism.\n *\n * Its `score` is a deliberate no-op returning SKIPPED. A judge verdict needs an\n * async model round-trip, and `ScorerDefinition.score` is contractually a PURE,\n * SYNCHRONOUS function \u2014 that purity is what guarantees online/offline parity for\n * the deterministic tier. Judge scoring therefore runs on its own async path in\n * `lib/eval/llmJudge.ts`, which reads this definition's `configSchema` for\n * validation. Callers of the deterministic evaluator never reach this branch:\n * `evaluateRun` selects assertions by `type: 'deterministic'`.\n */\nexport const llmJudge: ScorerDefinition<JudgeConfig> = {\n scorerKey: 'llm_judge',\n labelKey: `${I18N}.llm_judge`,\n group: 'judge',\n kind: 'llm_judge',\n configSchema: judgeConfig,\n writeConfigSchema: judgeWriteConfig,\n fields: [\n {\n name: 'promptTemplate',\n kind: 'textarea',\n labelKey: `${I18N}.llm_judge.field.rubric`,\n hintKey: `${I18N}.llm_judge.field.rubric.hint`,\n placeholderKey: `${I18N}.llm_judge.field.rubric.placeholder`,\n required: true,\n },\n {\n name: 'threshold',\n kind: 'slider',\n labelKey: `${I18N}.llm_judge.field.threshold`,\n hintKey: `${I18N}.llm_judge.field.threshold.hint`,\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.5,\n },\n {\n name: 'samples',\n kind: 'number',\n labelKey: `${I18N}.llm_judge.field.samples`,\n hintKey: `${I18N}.llm_judge.field.samples.hint`,\n min: 1,\n max: 9,\n step: 2,\n default: 1,\n },\n {\n name: 'requireReasoning',\n kind: 'boolean',\n labelKey: `${I18N}.llm_judge.field.requireReasoning`,\n hintKey: `${I18N}.llm_judge.field.requireReasoning.hint`,\n default: true,\n },\n ],\n needsExpected: () => false,\n score: () => skipped('unknown_scorer', { reason: 'llm_judge is scored asynchronously by the judge runner' }),\n}\n\nexport const judgeScorers = [llmJudge] as const\n"],
5
+ "mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,eAAe;AACxB,SAAS,yBAAyB;AAClC,SAAS,wBAAwB;AAEjC,MAAM,OAAO;AAab,MAAM,cAAc,EAAE,MAAM;AAAA,EAC1B,kBAAkB,IAAI,gBAAgB;AAAA,EACtC,iBAAiB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AAC3D,CAAC;AAYD,MAAM,mBAAmB,EAAE,MAAM;AAAA,EAC/B,iBAAiB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;AAAA,EACrD,kBAAkB,IAAI,gBAAgB;AACxC,CAAC;AAgBM,MAAM,WAA0C;AAAA,EACrD,WAAW;AAAA,EACX,UAAU,GAAG,IAAI;AAAA,EACjB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,QAAQ;AAAA,IACN;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU,GAAG,IAAI;AAAA,MACjB,SAAS,GAAG,IAAI;AAAA,MAChB,gBAAgB,GAAG,IAAI;AAAA,MACvB,UAAU;AAAA,IACZ;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU,GAAG,IAAI;AAAA,MACjB,SAAS,GAAG,IAAI;AAAA,MAChB,KAAK;AAAA,MACL,KAAK;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU,GAAG,IAAI;AAAA,MACjB,SAAS,GAAG,IAAI;AAAA,MAChB,KAAK;AAAA,MACL,KAAK;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU,GAAG,IAAI;AAAA,MACjB,SAAS,GAAG,IAAI;AAAA,MAChB,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,eAAe,MAAM;AAAA,EACrB,OAAO,MAAM,QAAQ,kBAAkB,EAAE,QAAQ,yDAAyD,CAAC;AAC7G;AAEO,MAAM,eAAe,CAAC,QAAQ;",
6
+ "names": []
7
+ }