promptfoo 0.72.2 → 0.73.1

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 (455) hide show
  1. package/README.md +5 -5
  2. package/dist/package.json +13 -8
  3. package/dist/src/accounts.d.ts.map +1 -1
  4. package/dist/src/accounts.js +2 -1
  5. package/dist/src/accounts.js.map +1 -1
  6. package/dist/src/assertions.d.ts.map +1 -1
  7. package/dist/src/assertions.js +2 -1
  8. package/dist/src/assertions.js.map +1 -1
  9. package/dist/src/cache.js +2 -2
  10. package/dist/src/cache.js.map +1 -1
  11. package/dist/src/commands/export.d.ts.map +1 -1
  12. package/dist/src/commands/export.js +15 -14
  13. package/dist/src/commands/export.js.map +1 -1
  14. package/dist/src/commands/generate/redteam.d.ts +1 -46
  15. package/dist/src/commands/generate/redteam.d.ts.map +1 -1
  16. package/dist/src/commands/generate/redteam.js +70 -26
  17. package/dist/src/commands/generate/redteam.js.map +1 -1
  18. package/dist/src/commands/import.d.ts.map +1 -1
  19. package/dist/src/commands/import.js +2 -1
  20. package/dist/src/commands/import.js.map +1 -1
  21. package/dist/src/commands/init.d.ts.map +1 -1
  22. package/dist/src/commands/init.js +12 -0
  23. package/dist/src/commands/init.js.map +1 -1
  24. package/dist/src/commands/redteam.d.ts.map +1 -1
  25. package/dist/src/commands/redteam.js +72 -18
  26. package/dist/src/commands/redteam.js.map +1 -1
  27. package/dist/src/commands/view.d.ts.map +1 -1
  28. package/dist/src/commands/view.js +2 -1
  29. package/dist/src/commands/view.js.map +1 -1
  30. package/dist/src/config.d.ts.map +1 -1
  31. package/dist/src/config.js +1 -0
  32. package/dist/src/config.js.map +1 -1
  33. package/dist/src/configTypes.d.ts +7 -0
  34. package/dist/src/configTypes.d.ts.map +1 -0
  35. package/dist/src/configTypes.js +3 -0
  36. package/dist/src/configTypes.js.map +1 -0
  37. package/dist/src/database/index.d.ts +4 -0
  38. package/dist/src/database/index.d.ts.map +1 -0
  39. package/dist/src/database/index.js +50 -0
  40. package/dist/src/database/index.js.map +1 -0
  41. package/dist/src/{database.d.ts → database/operations.d.ts} +118 -105
  42. package/dist/src/{database.d.ts.map → database/operations.d.ts.map} +1 -1
  43. package/dist/src/{database.js → database/operations.js} +1 -25
  44. package/dist/src/database/operations.js.map +1 -0
  45. package/dist/src/evaluator.js +2 -2
  46. package/dist/src/evaluator.js.map +1 -1
  47. package/dist/src/globalConfig.d.ts +1 -7
  48. package/dist/src/globalConfig.d.ts.map +1 -1
  49. package/dist/src/globalConfig.js +3 -3
  50. package/dist/src/globalConfig.js.map +1 -1
  51. package/dist/src/prompts/grading.js +2 -2
  52. package/dist/src/prompts/processors/python.js +4 -4
  53. package/dist/src/prompts/processors/python.js.map +1 -1
  54. package/dist/src/prompts/processors/yaml.d.ts.map +1 -1
  55. package/dist/src/prompts/processors/yaml.js +2 -8
  56. package/dist/src/prompts/processors/yaml.js.map +1 -1
  57. package/dist/src/providers/anthropic.d.ts +1 -1
  58. package/dist/src/providers/anthropic.d.ts.map +1 -1
  59. package/dist/src/providers/bam.d.ts +1 -1
  60. package/dist/src/providers/bam.d.ts.map +1 -1
  61. package/dist/src/providers/bedrock.d.ts +1 -1
  62. package/dist/src/providers/bedrock.d.ts.map +1 -1
  63. package/dist/src/providers/http.d.ts +1 -1
  64. package/dist/src/providers/http.d.ts.map +1 -1
  65. package/dist/src/providers/http.js +3 -3
  66. package/dist/src/providers/http.js.map +1 -1
  67. package/dist/src/providers/llama.d.ts +1 -1
  68. package/dist/src/providers/llama.d.ts.map +1 -1
  69. package/dist/src/providers/localai.d.ts +1 -1
  70. package/dist/src/providers/localai.d.ts.map +1 -1
  71. package/dist/src/providers/ollama.d.ts +1 -1
  72. package/dist/src/providers/ollama.d.ts.map +1 -1
  73. package/dist/src/providers/openai.d.ts +1 -1
  74. package/dist/src/providers/openai.d.ts.map +1 -1
  75. package/dist/src/providers/openai.js +48 -57
  76. package/dist/src/providers/openai.js.map +1 -1
  77. package/dist/src/providers/palm.d.ts +1 -1
  78. package/dist/src/providers/palm.d.ts.map +1 -1
  79. package/dist/src/providers/pythonCompletion.d.ts.map +1 -1
  80. package/dist/src/providers/pythonCompletion.js +6 -5
  81. package/dist/src/providers/pythonCompletion.js.map +1 -1
  82. package/dist/src/providers/replicate.js +2 -2
  83. package/dist/src/providers/replicate.js.map +1 -1
  84. package/dist/src/providers/scriptCompletion.js +3 -3
  85. package/dist/src/providers/scriptCompletion.js.map +1 -1
  86. package/dist/src/providers/vertex.d.ts +1 -1
  87. package/dist/src/providers/vertex.d.ts.map +1 -1
  88. package/dist/src/providers/vertex.js +23 -10
  89. package/dist/src/providers/vertex.js.map +1 -1
  90. package/dist/src/providers/vertexUtil.d.ts +2 -1
  91. package/dist/src/providers/vertexUtil.d.ts.map +1 -1
  92. package/dist/src/providers/vertexUtil.js.map +1 -1
  93. package/dist/src/providers/webhook.d.ts +1 -1
  94. package/dist/src/providers/webhook.d.ts.map +1 -1
  95. package/dist/src/providers.js +1 -1
  96. package/dist/src/providers.js.map +1 -1
  97. package/dist/src/python/pythonUtils.d.ts +4 -0
  98. package/dist/src/python/pythonUtils.d.ts.map +1 -0
  99. package/dist/src/python/pythonUtils.js +51 -0
  100. package/dist/src/python/pythonUtils.js.map +1 -0
  101. package/dist/src/python/wrapper.d.ts +0 -10
  102. package/dist/src/python/wrapper.d.ts.map +1 -1
  103. package/dist/src/python/wrapper.js +2 -49
  104. package/dist/src/python/wrapper.js.map +1 -1
  105. package/dist/src/redteam/constants.d.ts +60 -3
  106. package/dist/src/redteam/constants.d.ts.map +1 -1
  107. package/dist/src/redteam/constants.js +62 -11
  108. package/dist/src/redteam/constants.js.map +1 -1
  109. package/dist/src/redteam/index.d.ts +15 -6
  110. package/dist/src/redteam/index.d.ts.map +1 -1
  111. package/dist/src/redteam/index.js +94 -32
  112. package/dist/src/redteam/index.js.map +1 -1
  113. package/dist/src/redteam/plugins/base.d.ts +10 -13
  114. package/dist/src/redteam/plugins/base.d.ts.map +1 -1
  115. package/dist/src/redteam/plugins/base.js +36 -20
  116. package/dist/src/redteam/plugins/base.js.map +1 -1
  117. package/dist/src/redteam/plugins/debugInterface.d.ts +7 -0
  118. package/dist/src/redteam/plugins/debugInterface.d.ts.map +1 -0
  119. package/dist/src/redteam/plugins/debugInterface.js +49 -0
  120. package/dist/src/redteam/plugins/debugInterface.js.map +1 -0
  121. package/dist/src/redteam/plugins/harmful.d.ts +0 -52
  122. package/dist/src/redteam/plugins/harmful.d.ts.map +1 -1
  123. package/dist/src/redteam/plugins/harmful.js +5 -47
  124. package/dist/src/redteam/plugins/harmful.js.map +1 -1
  125. package/dist/src/redteam/plugins/pii.d.ts +0 -1
  126. package/dist/src/redteam/plugins/pii.d.ts.map +1 -1
  127. package/dist/src/redteam/plugins/pii.js +0 -7
  128. package/dist/src/redteam/plugins/pii.js.map +1 -1
  129. package/dist/src/redteam/plugins/rbac.d.ts +7 -0
  130. package/dist/src/redteam/plugins/rbac.d.ts.map +1 -0
  131. package/dist/src/redteam/plugins/rbac.js +49 -0
  132. package/dist/src/redteam/plugins/rbac.js.map +1 -0
  133. package/dist/src/redteam/plugins/shellInjection.d.ts +7 -0
  134. package/dist/src/redteam/plugins/shellInjection.d.ts.map +1 -0
  135. package/dist/src/redteam/plugins/shellInjection.js +54 -0
  136. package/dist/src/redteam/plugins/shellInjection.js.map +1 -0
  137. package/dist/src/redteam/plugins/sqlInjection.d.ts +7 -0
  138. package/dist/src/redteam/plugins/sqlInjection.d.ts.map +1 -0
  139. package/dist/src/redteam/plugins/sqlInjection.js +44 -0
  140. package/dist/src/redteam/plugins/sqlInjection.js.map +1 -0
  141. package/dist/src/redteam/strategies/injections.d.ts.map +1 -0
  142. package/dist/src/redteam/strategies/injections.js.map +1 -0
  143. package/dist/src/redteam/strategies/iterative.d.ts.map +1 -0
  144. package/dist/src/redteam/strategies/iterative.js.map +1 -0
  145. package/dist/src/redteam/types.d.ts +196 -0
  146. package/dist/src/redteam/types.d.ts.map +1 -0
  147. package/dist/src/redteam/types.js +124 -0
  148. package/dist/src/redteam/types.js.map +1 -0
  149. package/dist/src/redteam/util.d.ts +22 -0
  150. package/dist/src/redteam/util.d.ts.map +1 -0
  151. package/dist/src/redteam/util.js +56 -0
  152. package/dist/src/redteam/util.js.map +1 -0
  153. package/dist/src/testCases.d.ts +1 -2
  154. package/dist/src/testCases.d.ts.map +1 -1
  155. package/dist/src/testCases.js.map +1 -1
  156. package/dist/src/types/databaseTypes.d.ts +17 -0
  157. package/dist/src/types/databaseTypes.d.ts.map +1 -0
  158. package/dist/src/types/databaseTypes.js +3 -0
  159. package/dist/src/types/databaseTypes.js.map +1 -0
  160. package/dist/src/{types.d.ts → types/index.d.ts} +2250 -873
  161. package/dist/src/{types.d.ts.map → types/index.d.ts.map} +1 -1
  162. package/dist/src/{types.js → types/index.js} +24 -14
  163. package/dist/src/types/index.js.map +1 -0
  164. package/dist/src/util/config.d.ts +3 -0
  165. package/dist/src/util/config.d.ts.map +1 -0
  166. package/dist/src/util/config.js +42 -0
  167. package/dist/src/util/config.js.map +1 -0
  168. package/dist/src/util/index.d.ts +18 -20
  169. package/dist/src/util/index.d.ts.map +1 -1
  170. package/dist/src/util/index.js +80 -116
  171. package/dist/src/util/index.js.map +1 -1
  172. package/dist/src/util/json.d.ts +3 -0
  173. package/dist/src/util/json.d.ts.map +1 -0
  174. package/dist/src/util/json.js +27 -0
  175. package/dist/src/util/json.js.map +1 -0
  176. package/dist/src/web/nextui/404/index.html +1 -1
  177. package/dist/src/web/nextui/404.html +1 -1
  178. package/dist/src/web/nextui/_next/static/chunks/155-4e319e68476266ee.js +1 -0
  179. package/dist/src/web/nextui/_next/static/chunks/163-93bab94bc04ae71b.js +6 -0
  180. package/dist/src/web/nextui/_next/static/chunks/{258-4acb452fe85cff6f.js → 258-b6257e5de9d0e2c7.js} +1 -1
  181. package/dist/src/web/nextui/_next/static/chunks/281-64d9f1415a301ee5.js +1 -0
  182. package/dist/src/web/nextui/_next/static/chunks/304-cf667fe8f06238b4.js +1 -0
  183. package/dist/src/web/nextui/_next/static/chunks/322-b47b6cc3f5b5fdb8.js +1 -0
  184. package/dist/src/web/nextui/_next/static/chunks/325-0d36870ade5e5263.js +1 -0
  185. package/dist/src/web/nextui/_next/static/chunks/339-79124d204fa988a3.js +1 -0
  186. package/dist/src/web/nextui/_next/static/chunks/378-c135e497df1864cb.js +1 -0
  187. package/dist/src/web/nextui/_next/static/chunks/476-0afb5eb266c57b7f.js +17 -0
  188. package/dist/src/web/nextui/_next/static/chunks/493-ebd12f00541c4969.js +2 -0
  189. package/dist/src/web/nextui/_next/static/chunks/497-e280a5610a3d7d42.js +32 -0
  190. package/dist/src/web/nextui/_next/static/chunks/515-e06d044f12d8a1bd.js +1 -0
  191. package/dist/src/web/nextui/_next/static/chunks/69-5e4d5e60859a86d2.js +1 -0
  192. package/dist/src/web/nextui/_next/static/chunks/737-0a2f62d71264c950.js +1 -0
  193. package/dist/src/web/nextui/_next/static/chunks/903-7cc440d9f9e9f95d.js +97 -0
  194. package/dist/src/web/nextui/_next/static/chunks/905-78cd666f27891ee6.js +28 -0
  195. package/dist/src/web/nextui/_next/static/chunks/916-b92fea2ab6136411.js +1 -0
  196. package/dist/src/web/nextui/_next/static/chunks/969-6ab6c8f4158da970.js +1 -0
  197. package/dist/src/web/nextui/_next/static/chunks/app/auth/login/page-6214330a95aad25c.js +1 -0
  198. package/dist/src/web/nextui/_next/static/chunks/app/auth/signup/page-9568bbad5c19d0c0.js +1 -0
  199. package/dist/src/web/nextui/_next/static/chunks/app/datasets/page-b1cc3b59d0bc97eb.js +1 -0
  200. package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/page-c7d540f6b584c1ad.js +1 -0
  201. package/dist/src/web/nextui/_next/static/chunks/app/eval/{page-32eaa14d2384c5b0.js → page-86b8e9b498011d89.js} +1 -1
  202. package/dist/src/web/nextui/_next/static/chunks/app/layout-9df2892161ef4253.js +1 -0
  203. package/dist/src/web/nextui/_next/static/chunks/app/{page-e07a0ddbf3d6e21c.js → page-0613739abb0e8dc3.js} +1 -1
  204. package/dist/src/web/nextui/_next/static/chunks/app/progress/page-2d90754723eb1b96.js +1 -0
  205. package/dist/src/web/nextui/_next/static/chunks/app/prompts/page-302f44de5b590062.js +1 -0
  206. package/dist/src/web/nextui/_next/static/chunks/app/report/page-53738967c111db11.js +1 -0
  207. package/dist/src/web/nextui/_next/static/chunks/app/setup/page-412396ae32fb0ce9.js +1 -0
  208. package/dist/src/web/nextui/_next/static/chunks/main-app-2984edea17efbc9d.js +1 -0
  209. package/dist/src/web/nextui/_next/static/chunks/{webpack-c9f728822666f852.js → webpack-4775581e8d774c8c.js} +1 -1
  210. package/dist/src/web/nextui/_next/static/css/4463e29e24d44845.css +1 -0
  211. package/dist/src/web/nextui/_next/static/css/87b5e6e04efd27e5.css +1 -0
  212. package/dist/src/web/nextui/_next/static/css/e17fdafd8599f69b.css +1 -0
  213. package/dist/src/web/nextui/_next/static/css/eb523daddb89dfc1.css +1 -0
  214. package/dist/src/web/nextui/auth/login/index.html +1 -1
  215. package/dist/src/web/nextui/auth/login/index.txt +6 -6
  216. package/dist/src/web/nextui/auth/signup/index.html +1 -1
  217. package/dist/src/web/nextui/auth/signup/index.txt +6 -6
  218. package/dist/src/web/nextui/datasets/index.html +1 -1
  219. package/dist/src/web/nextui/datasets/index.txt +6 -6
  220. package/dist/src/web/nextui/eval/index.html +1 -1
  221. package/dist/src/web/nextui/eval/index.txt +8 -8
  222. package/dist/src/web/nextui/index.html +1 -1
  223. package/dist/src/web/nextui/index.txt +5 -5
  224. package/dist/src/web/nextui/logo-panda.svg +91 -0
  225. package/dist/src/web/nextui/progress/index.html +1 -1
  226. package/dist/src/web/nextui/progress/index.txt +6 -6
  227. package/dist/src/web/nextui/prompts/index.html +1 -1
  228. package/dist/src/web/nextui/prompts/index.txt +6 -6
  229. package/dist/src/web/nextui/report/index.html +1 -1
  230. package/dist/src/web/nextui/report/index.txt +8 -8
  231. package/dist/src/web/nextui/setup/index.html +1 -1
  232. package/dist/src/web/nextui/setup/index.txt +7 -7
  233. package/dist/test/__mocks__/tempCustomModule.d.ts +13 -0
  234. package/dist/test/__mocks__/tempCustomModule.d.ts.map +1 -0
  235. package/dist/test/__mocks__/tempCustomModule.js +15 -0
  236. package/dist/test/__mocks__/tempCustomModule.js.map +1 -0
  237. package/dist/test/account.test.d.ts +2 -0
  238. package/dist/test/account.test.d.ts.map +1 -0
  239. package/dist/test/account.test.js +46 -0
  240. package/dist/test/account.test.js.map +1 -0
  241. package/dist/test/assertions/AssertionResult.test.d.ts +2 -0
  242. package/dist/test/assertions/AssertionResult.test.d.ts.map +1 -0
  243. package/dist/test/assertions/AssertionResult.test.js +184 -0
  244. package/dist/test/assertions/AssertionResult.test.js.map +1 -0
  245. package/dist/test/assertions/validateAssertions.test.d.ts +2 -0
  246. package/dist/test/assertions/validateAssertions.test.d.ts.map +1 -0
  247. package/dist/test/assertions/validateAssertions.test.js +40 -0
  248. package/dist/test/assertions/validateAssertions.test.js.map +1 -0
  249. package/dist/test/assertions.test.d.ts +2 -0
  250. package/dist/test/assertions.test.d.ts.map +1 -0
  251. package/dist/test/assertions.test.js +3162 -0
  252. package/dist/test/assertions.test.js.map +1 -0
  253. package/dist/test/cache.test.d.ts +2 -0
  254. package/dist/test/cache.test.d.ts.map +1 -0
  255. package/dist/test/cache.test.js +90 -0
  256. package/dist/test/cache.test.js.map +1 -0
  257. package/dist/test/checkNodeVersion.test.d.ts +2 -0
  258. package/dist/test/checkNodeVersion.test.d.ts.map +1 -0
  259. package/dist/test/checkNodeVersion.test.js +85 -0
  260. package/dist/test/checkNodeVersion.test.js.map +1 -0
  261. package/dist/test/commands/eval/filterFailingTests.test.d.ts +2 -0
  262. package/dist/test/commands/eval/filterFailingTests.test.d.ts.map +1 -0
  263. package/dist/test/commands/eval/filterFailingTests.test.js +84 -0
  264. package/dist/test/commands/eval/filterFailingTests.test.js.map +1 -0
  265. package/dist/test/commands/eval/filterProviders.test.d.ts +2 -0
  266. package/dist/test/commands/eval/filterProviders.test.d.ts.map +1 -0
  267. package/dist/test/commands/eval/filterProviders.test.js +50 -0
  268. package/dist/test/commands/eval/filterProviders.test.js.map +1 -0
  269. package/dist/test/commands/eval/filterTests.test.d.ts +2 -0
  270. package/dist/test/commands/eval/filterTests.test.d.ts.map +1 -0
  271. package/dist/test/commands/eval/filterTests.test.js +51 -0
  272. package/dist/test/commands/eval/filterTests.test.js.map +1 -0
  273. package/dist/test/config.test.d.ts +2 -0
  274. package/dist/test/config.test.d.ts.map +1 -0
  275. package/dist/test/config.test.js +404 -0
  276. package/dist/test/config.test.js.map +1 -0
  277. package/dist/test/csv.test.d.ts +2 -0
  278. package/dist/test/csv.test.d.ts.map +1 -0
  279. package/dist/test/csv.test.js +239 -0
  280. package/dist/test/csv.test.js.map +1 -0
  281. package/dist/test/evaluator.test.d.ts +2 -0
  282. package/dist/test/evaluator.test.d.ts.map +1 -0
  283. package/dist/test/evaluator.test.js +922 -0
  284. package/dist/test/evaluator.test.js.map +1 -0
  285. package/dist/test/globalConfig.test.d.ts +2 -0
  286. package/dist/test/globalConfig.test.d.ts.map +1 -0
  287. package/dist/test/globalConfig.test.js +91 -0
  288. package/dist/test/globalConfig.test.js.map +1 -0
  289. package/dist/test/is-sql-tests/node-sql-parser.test.d.ts +2 -0
  290. package/dist/test/is-sql-tests/node-sql-parser.test.d.ts.map +1 -0
  291. package/dist/test/is-sql-tests/node-sql-parser.test.js +179 -0
  292. package/dist/test/is-sql-tests/node-sql-parser.test.js.map +1 -0
  293. package/dist/test/matchers.test.d.ts +2 -0
  294. package/dist/test/matchers.test.d.ts.map +1 -0
  295. package/dist/test/matchers.test.js +807 -0
  296. package/dist/test/matchers.test.js.map +1 -0
  297. package/dist/test/prompts.processors.javascript.test.d.ts +2 -0
  298. package/dist/test/prompts.processors.javascript.test.d.ts.map +1 -0
  299. package/dist/test/prompts.processors.javascript.test.js +93 -0
  300. package/dist/test/prompts.processors.javascript.test.js.map +1 -0
  301. package/dist/test/prompts.processors.json.test.d.ts +2 -0
  302. package/dist/test/prompts.processors.json.test.d.ts.map +1 -0
  303. package/dist/test/prompts.processors.json.test.js +67 -0
  304. package/dist/test/prompts.processors.json.test.js.map +1 -0
  305. package/dist/test/prompts.processors.jsonl.test.d.ts +2 -0
  306. package/dist/test/prompts.processors.jsonl.test.d.ts.map +1 -0
  307. package/dist/test/prompts.processors.jsonl.test.js +99 -0
  308. package/dist/test/prompts.processors.jsonl.test.js.map +1 -0
  309. package/dist/test/prompts.processors.python.test.d.ts +2 -0
  310. package/dist/test/prompts.processors.python.test.d.ts.map +1 -0
  311. package/dist/test/prompts.processors.python.test.js +100 -0
  312. package/dist/test/prompts.processors.python.test.js.map +1 -0
  313. package/dist/test/prompts.processors.python.utils.test.d.ts +2 -0
  314. package/dist/test/prompts.processors.python.utils.test.d.ts.map +1 -0
  315. package/dist/test/prompts.processors.python.utils.test.js +68 -0
  316. package/dist/test/prompts.processors.python.utils.test.js.map +1 -0
  317. package/dist/test/prompts.processors.string.test.d.ts +2 -0
  318. package/dist/test/prompts.processors.string.test.d.ts.map +1 -0
  319. package/dist/test/prompts.processors.string.test.js +24 -0
  320. package/dist/test/prompts.processors.string.test.js.map +1 -0
  321. package/dist/test/prompts.processors.text.test.d.ts +2 -0
  322. package/dist/test/prompts.processors.text.test.d.ts.map +1 -0
  323. package/dist/test/prompts.processors.text.test.js +109 -0
  324. package/dist/test/prompts.processors.text.test.js.map +1 -0
  325. package/dist/test/prompts.processors.yaml.test.d.ts +2 -0
  326. package/dist/test/prompts.processors.yaml.test.d.ts.map +1 -0
  327. package/dist/test/prompts.processors.yaml.test.js +67 -0
  328. package/dist/test/prompts.processors.yaml.test.js.map +1 -0
  329. package/dist/test/prompts.test.d.ts +2 -0
  330. package/dist/test/prompts.test.d.ts.map +1 -0
  331. package/dist/test/prompts.test.js +561 -0
  332. package/dist/test/prompts.test.js.map +1 -0
  333. package/dist/test/prompts.utils.test.d.ts +2 -0
  334. package/dist/test/prompts.utils.test.d.ts.map +1 -0
  335. package/dist/test/prompts.utils.test.js +123 -0
  336. package/dist/test/prompts.utils.test.js.map +1 -0
  337. package/dist/test/providers.anthropic.test.d.ts +2 -0
  338. package/dist/test/providers.anthropic.test.d.ts.map +1 -0
  339. package/dist/test/providers.anthropic.test.js +520 -0
  340. package/dist/test/providers.anthropic.test.js.map +1 -0
  341. package/dist/test/providers.azure.test.d.ts +2 -0
  342. package/dist/test/providers.azure.test.d.ts.map +1 -0
  343. package/dist/test/providers.azure.test.js +96 -0
  344. package/dist/test/providers.azure.test.js.map +1 -0
  345. package/dist/test/providers.bedrock.test.d.ts +2 -0
  346. package/dist/test/providers.bedrock.test.d.ts.map +1 -0
  347. package/dist/test/providers.bedrock.test.js +349 -0
  348. package/dist/test/providers.bedrock.test.js.map +1 -0
  349. package/dist/test/providers.http.test.d.ts +2 -0
  350. package/dist/test/providers.http.test.d.ts.map +1 -0
  351. package/dist/test/providers.http.test.js +130 -0
  352. package/dist/test/providers.http.test.js.map +1 -0
  353. package/dist/test/providers.llama.test.d.ts +2 -0
  354. package/dist/test/providers.llama.test.d.ts.map +1 -0
  355. package/dist/test/providers.llama.test.js +101 -0
  356. package/dist/test/providers.llama.test.js.map +1 -0
  357. package/dist/test/providers.pythonCompletion.test.d.ts +2 -0
  358. package/dist/test/providers.pythonCompletion.test.d.ts.map +1 -0
  359. package/dist/test/providers.pythonCompletion.test.js +149 -0
  360. package/dist/test/providers.pythonCompletion.test.js.map +1 -0
  361. package/dist/test/providers.test.d.ts +2 -0
  362. package/dist/test/providers.test.d.ts.map +1 -0
  363. package/dist/test/providers.test.js +883 -0
  364. package/dist/test/providers.test.js.map +1 -0
  365. package/dist/test/providers.vertex.test.d.ts +2 -0
  366. package/dist/test/providers.vertex.test.d.ts.map +1 -0
  367. package/dist/test/providers.vertex.test.js +153 -0
  368. package/dist/test/providers.vertex.test.js.map +1 -0
  369. package/dist/test/pythonWrapper.test.d.ts +2 -0
  370. package/dist/test/pythonWrapper.test.d.ts.map +1 -0
  371. package/dist/test/pythonWrapper.test.js +65 -0
  372. package/dist/test/pythonWrapper.test.js.map +1 -0
  373. package/dist/test/redteam/plugins/base.test.d.ts +2 -0
  374. package/dist/test/redteam/plugins/base.test.d.ts.map +1 -0
  375. package/dist/test/redteam/plugins/base.test.js +149 -0
  376. package/dist/test/redteam/plugins/base.test.js.map +1 -0
  377. package/dist/test/redteam/purpose.test.d.ts +2 -0
  378. package/dist/test/redteam/purpose.test.d.ts.map +1 -0
  379. package/dist/test/redteam/purpose.test.js +37 -0
  380. package/dist/test/redteam/purpose.test.js.map +1 -0
  381. package/dist/test/redteam/types.test.d.ts +2 -0
  382. package/dist/test/redteam/types.test.d.ts.map +1 -0
  383. package/dist/test/redteam/types.test.js +325 -0
  384. package/dist/test/redteam/types.test.js.map +1 -0
  385. package/dist/test/redteam/util.test.d.ts +2 -0
  386. package/dist/test/redteam/util.test.d.ts.map +1 -0
  387. package/dist/test/redteam/util.test.js +99 -0
  388. package/dist/test/redteam/util.test.js.map +1 -0
  389. package/dist/test/telemetry.test.d.ts +2 -0
  390. package/dist/test/telemetry.test.d.ts.map +1 -0
  391. package/dist/test/telemetry.test.js +68 -0
  392. package/dist/test/telemetry.test.js.map +1 -0
  393. package/dist/test/testCases.test.d.ts +2 -0
  394. package/dist/test/testCases.test.d.ts.map +1 -0
  395. package/dist/test/testCases.test.js +362 -0
  396. package/dist/test/testCases.test.js.map +1 -0
  397. package/dist/test/updates.test.d.ts +2 -0
  398. package/dist/test/updates.test.d.ts.map +1 -0
  399. package/dist/test/updates.test.js +63 -0
  400. package/dist/test/updates.test.js.map +1 -0
  401. package/dist/test/util.templates.test.d.ts +2 -0
  402. package/dist/test/util.templates.test.d.ts.map +1 -0
  403. package/dist/test/util.templates.test.js +75 -0
  404. package/dist/test/util.templates.test.js.map +1 -0
  405. package/dist/test/util.test.d.ts +2 -0
  406. package/dist/test/util.test.d.ts.map +1 -0
  407. package/dist/test/util.test.js +661 -0
  408. package/dist/test/util.test.js.map +1 -0
  409. package/dist/test/utils.d.ts +6 -0
  410. package/dist/test/utils.d.ts.map +1 -0
  411. package/dist/test/utils.js +16 -0
  412. package/dist/test/utils.js.map +1 -0
  413. package/package.json +13 -8
  414. package/dist/src/database.js.map +0 -1
  415. package/dist/src/redteam/methods/injections.d.ts.map +0 -1
  416. package/dist/src/redteam/methods/injections.js.map +0 -1
  417. package/dist/src/redteam/methods/iterative.d.ts.map +0 -1
  418. package/dist/src/redteam/methods/iterative.js.map +0 -1
  419. package/dist/src/types.js.map +0 -1
  420. package/dist/src/web/nextui/_next/static/chunks/163-e65e0f7f442a0c72.js +0 -6
  421. package/dist/src/web/nextui/_next/static/chunks/180-46db19289d856800.js +0 -1
  422. package/dist/src/web/nextui/_next/static/chunks/304-9d57a2251034b801.js +0 -1
  423. package/dist/src/web/nextui/_next/static/chunks/322-4a0fc9b0508f47e8.js +0 -1
  424. package/dist/src/web/nextui/_next/static/chunks/339-db5bd05e24dde905.js +0 -1
  425. package/dist/src/web/nextui/_next/static/chunks/374-d40afe599198abd3.js +0 -1
  426. package/dist/src/web/nextui/_next/static/chunks/378-e22c8aeb8e031fad.js +0 -1
  427. package/dist/src/web/nextui/_next/static/chunks/448-4da3bf74eae4996a.js +0 -97
  428. package/dist/src/web/nextui/_next/static/chunks/53-fae6e50ace6c83a1.js +0 -1
  429. package/dist/src/web/nextui/_next/static/chunks/578-8efe57f906f7573c.js +0 -44
  430. package/dist/src/web/nextui/_next/static/chunks/620-7a5a7bf6e1fe49e5.js +0 -1
  431. package/dist/src/web/nextui/_next/static/chunks/737-943974fecba93f75.js +0 -1
  432. package/dist/src/web/nextui/_next/static/chunks/905-0da344cee75690e7.js +0 -32
  433. package/dist/src/web/nextui/_next/static/chunks/932-75585b3be8ce494d.js +0 -1
  434. package/dist/src/web/nextui/_next/static/chunks/973-ffe3726c956d08ef.js +0 -2
  435. package/dist/src/web/nextui/_next/static/chunks/995-803c74b81e7bf6cd.js +0 -1
  436. package/dist/src/web/nextui/_next/static/chunks/app/auth/login/page-2e2c0c725127ea2d.js +0 -1
  437. package/dist/src/web/nextui/_next/static/chunks/app/auth/signup/page-ccdb1f6890601666.js +0 -1
  438. package/dist/src/web/nextui/_next/static/chunks/app/datasets/page-642db4f4a8e8ba40.js +0 -1
  439. package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/page-b548dd256b91e882.js +0 -1
  440. package/dist/src/web/nextui/_next/static/chunks/app/layout-0f40deeb4ea7726a.js +0 -1
  441. package/dist/src/web/nextui/_next/static/chunks/app/progress/page-462526776efd6fd6.js +0 -1
  442. package/dist/src/web/nextui/_next/static/chunks/app/prompts/page-0ae78bc0bf7c56bc.js +0 -1
  443. package/dist/src/web/nextui/_next/static/chunks/app/report/page-e4f7851d41eb0f92.js +0 -1
  444. package/dist/src/web/nextui/_next/static/chunks/app/setup/page-6cde750ec428cd75.js +0 -1
  445. package/dist/src/web/nextui/_next/static/chunks/main-app-b098e35d79d23e0a.js +0 -1
  446. package/dist/src/web/nextui/_next/static/css/35ab7ce8025438b0.css +0 -1
  447. package/dist/src/web/nextui/_next/static/css/5bd2f45de1f3ba83.css +0 -1
  448. package/dist/src/web/nextui/_next/static/css/94b771e23fc5d5f5.css +0 -1
  449. package/dist/src/web/nextui/_next/static/css/dab5d695b3657d59.css +0 -1
  450. /package/dist/src/redteam/{methods → strategies}/injections.d.ts +0 -0
  451. /package/dist/src/redteam/{methods → strategies}/injections.js +0 -0
  452. /package/dist/src/redteam/{methods → strategies}/iterative.d.ts +0 -0
  453. /package/dist/src/redteam/{methods → strategies}/iterative.js +0 -0
  454. /package/dist/src/web/nextui/_next/static/{2HKOT6yPi-DjJn0Rmu9pY → N_dfeLbztZ6_4kDoGzH6z}/_buildManifest.js +0 -0
  455. /package/dist/src/web/nextui/_next/static/{2HKOT6yPi-DjJn0Rmu9pY → N_dfeLbztZ6_4kDoGzH6z}/_ssgManifest.js +0 -0
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.getDbPath = getDbPath;
30
+ exports.getDbSignalPath = getDbSignalPath;
31
+ exports.getDb = getDb;
32
+ const better_sqlite3_1 = __importDefault(require("better-sqlite3"));
33
+ const better_sqlite3_2 = require("drizzle-orm/better-sqlite3");
34
+ const path = __importStar(require("path"));
35
+ const config_1 = require("../util/config");
36
+ let dbInstance = null;
37
+ function getDbPath() {
38
+ return path.resolve((0, config_1.getConfigDirectoryPath)(true /* createIfNotExists */), 'promptfoo.db');
39
+ }
40
+ function getDbSignalPath() {
41
+ return path.resolve((0, config_1.getConfigDirectoryPath)(true /* createIfNotExists */), 'evalLastWritten');
42
+ }
43
+ function getDb() {
44
+ if (!dbInstance) {
45
+ const sqlite = new better_sqlite3_1.default(getDbPath());
46
+ dbInstance = (0, better_sqlite3_2.drizzle)(sqlite);
47
+ }
48
+ return dbInstance;
49
+ }
50
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/database/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,8BAEC;AAED,0CAEC;AAED,sBAMC;AArBD,oEAAsC;AACtC,+DAAqD;AACrD,2CAA6B;AAC7B,2CAAwD;AAExD,IAAI,UAAU,GAAsC,IAAI,CAAC;AAEzD,SAAgB,SAAS;IACvB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAA,+BAAsB,EAAC,IAAI,CAAC,uBAAuB,CAAC,EAAE,cAAc,CAAC,CAAC;AAC5F,CAAC;AAED,SAAgB,eAAe;IAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAA,+BAAsB,EAAC,IAAI,CAAC,uBAAuB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAC/F,CAAC;AAED,SAAgB,KAAK;IACnB,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,MAAM,GAAG,IAAI,wBAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;QACzC,UAAU,GAAG,IAAA,wBAAO,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { EvaluateSummary } from './types';
1
+ import type { EvaluateSummary } from '../types';
2
2
  export declare const prompts: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
3
3
  name: "prompts";
4
4
  schema: undefined;
@@ -265,10 +265,10 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
265
265
  }>) & {
266
266
  label?: string | undefined;
267
267
  }) | (string | {
268
+ id?: string | undefined;
269
+ config?: any;
268
270
  prompts?: string[] | undefined;
269
271
  delay?: number | undefined;
270
- config?: any;
271
- id?: string | undefined;
272
272
  label?: string | undefined;
273
273
  transform?: string | undefined;
274
274
  env?: {
@@ -350,10 +350,10 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
350
350
  }>) & {
351
351
  label?: string | undefined;
352
352
  }) | Record<string, {
353
+ id?: string | undefined;
354
+ config?: any;
353
355
  prompts?: string[] | undefined;
354
356
  delay?: number | undefined;
355
- config?: any;
356
- id?: string | undefined;
357
357
  label?: string | undefined;
358
358
  transform?: string | undefined;
359
359
  env?: {
@@ -399,11 +399,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
399
399
  postprocess?: string | undefined;
400
400
  storeOutputAs?: string | undefined;
401
401
  } & {
402
+ provider?: any;
402
403
  rubricPrompt?: string | string[] | {
403
404
  role: string;
404
405
  content: string;
405
406
  }[] | undefined;
406
- provider?: any;
407
407
  factuality?: {
408
408
  subset?: number | undefined;
409
409
  superset?: number | undefined;
@@ -415,12 +415,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
415
415
  disableVarExpansion?: boolean | undefined;
416
416
  disableConversationVar?: boolean | undefined;
417
417
  }) | undefined;
418
- vars?: Record<string, string | any[] | string[] | {}> | undefined;
419
418
  provider?: string | {
419
+ id?: string | undefined;
420
+ config?: any;
420
421
  prompts?: string[] | undefined;
421
422
  delay?: number | undefined;
422
- config?: any;
423
- id?: string | undefined;
424
423
  label?: string | undefined;
425
424
  transform?: string | undefined;
426
425
  env?: {
@@ -522,31 +521,33 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
522
521
  classification?: Record<string, number> | undefined;
523
522
  }>) | undefined;
524
523
  } | undefined;
524
+ vars?: Record<string, string | any[] | string[] | {}> | undefined;
525
+ metadata?: Record<string, any> | undefined;
525
526
  description?: string | undefined;
526
527
  providerOutput?: string | {} | undefined;
527
528
  assert?: ({
528
- type: import("./types").AssertionType;
529
- value?: import("./types").AssertionValue | undefined;
529
+ type: import("../types").AssertionType;
530
+ value?: import("../types").AssertionValue | undefined;
531
+ provider?: any;
530
532
  transform?: string | undefined;
531
533
  rubricPrompt?: string | string[] | {
532
534
  role: string;
533
535
  content: string;
534
536
  }[] | undefined;
535
- provider?: any;
536
537
  threshold?: number | undefined;
537
538
  weight?: number | undefined;
538
539
  metric?: string | undefined;
539
540
  } | {
540
541
  type: "assert-set";
541
542
  assert: {
542
- type: import("./types").AssertionType;
543
- value?: import("./types").AssertionValue | undefined;
543
+ type: import("../types").AssertionType;
544
+ value?: import("../types").AssertionValue | undefined;
545
+ provider?: any;
544
546
  transform?: string | undefined;
545
547
  rubricPrompt?: string | string[] | {
546
548
  role: string;
547
549
  content: string;
548
550
  }[] | undefined;
549
- provider?: any;
550
551
  threshold?: number | undefined;
551
552
  weight?: number | undefined;
552
553
  metric?: string | undefined;
@@ -557,49 +558,6 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
557
558
  })[] | undefined;
558
559
  threshold?: number | undefined;
559
560
  })[];
560
- evaluateOptions: {
561
- maxConcurrency?: number | undefined;
562
- repeat?: number | undefined;
563
- delay?: number | undefined;
564
- cache?: boolean | undefined;
565
- interactiveProviders?: boolean | undefined;
566
- generateSuggestions?: boolean | undefined;
567
- showProgressBar?: boolean | undefined;
568
- progressCallback?: ((args_0: number, args_1: number, args_2: number, args_3: import("./types").RunEvalOptions) => void) | undefined;
569
- eventSource?: string | undefined;
570
- };
571
- commandLineOptions: {
572
- prompts?: string[] | undefined;
573
- providers?: string[] | undefined;
574
- output?: string[] | undefined;
575
- maxConcurrency?: string | undefined;
576
- repeat?: string | undefined;
577
- delay?: string | undefined;
578
- vars?: string | undefined;
579
- tests?: string | undefined;
580
- config?: string[] | undefined;
581
- assertions?: string | undefined;
582
- modelOutputs?: string | undefined;
583
- verbose?: boolean | undefined;
584
- grader?: string | undefined;
585
- tableCellMaxLength?: string | undefined;
586
- write?: boolean | undefined;
587
- cache?: boolean | undefined;
588
- table?: boolean | undefined;
589
- share?: boolean | undefined;
590
- progressBar?: boolean | undefined;
591
- watch?: boolean | undefined;
592
- interactiveProviders?: boolean | undefined;
593
- filterFailing?: string | undefined;
594
- filterFirstN?: string | undefined;
595
- filterPattern?: string | undefined;
596
- filterProviders?: string | undefined;
597
- var?: Record<string, string> | undefined;
598
- generateSuggestions?: boolean | undefined;
599
- promptPrefix?: string | undefined;
600
- promptSuffix?: string | undefined;
601
- envFile?: string | undefined;
602
- };
603
561
  env?: {
604
562
  ANTHROPIC_API_KEY?: string | undefined;
605
563
  BAM_API_KEY?: string | undefined;
@@ -636,7 +594,7 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
636
594
  metadata?: Record<string, any> | undefined;
637
595
  description?: string | undefined;
638
596
  scenarios?: {
639
- tests: {
597
+ config: {
640
598
  options?: ({
641
599
  prefix?: string | undefined;
642
600
  suffix?: string | undefined;
@@ -645,11 +603,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
645
603
  postprocess?: string | undefined;
646
604
  storeOutputAs?: string | undefined;
647
605
  } & {
606
+ provider?: any;
648
607
  rubricPrompt?: string | string[] | {
649
608
  role: string;
650
609
  content: string;
651
610
  }[] | undefined;
652
- provider?: any;
653
611
  factuality?: {
654
612
  subset?: number | undefined;
655
613
  superset?: number | undefined;
@@ -661,12 +619,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
661
619
  disableVarExpansion?: boolean | undefined;
662
620
  disableConversationVar?: boolean | undefined;
663
621
  }) | undefined;
664
- vars?: Record<string, string | any[] | string[] | {}> | undefined;
665
622
  provider?: string | {
623
+ id?: string | undefined;
624
+ config?: any;
666
625
  prompts?: string[] | undefined;
667
626
  delay?: number | undefined;
668
- config?: any;
669
- id?: string | undefined;
670
627
  label?: string | undefined;
671
628
  transform?: string | undefined;
672
629
  env?: {
@@ -768,31 +725,33 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
768
725
  classification?: Record<string, number> | undefined;
769
726
  }>) | undefined;
770
727
  } | undefined;
728
+ vars?: Record<string, string | any[] | string[] | {}> | undefined;
729
+ metadata?: Record<string, any> | undefined;
771
730
  description?: string | undefined;
772
731
  providerOutput?: string | {} | undefined;
773
732
  assert?: ({
774
- type: import("./types").AssertionType;
775
- value?: import("./types").AssertionValue | undefined;
733
+ type: import("../types").AssertionType;
734
+ value?: import("../types").AssertionValue | undefined;
735
+ provider?: any;
776
736
  transform?: string | undefined;
777
737
  rubricPrompt?: string | string[] | {
778
738
  role: string;
779
739
  content: string;
780
740
  }[] | undefined;
781
- provider?: any;
782
741
  threshold?: number | undefined;
783
742
  weight?: number | undefined;
784
743
  metric?: string | undefined;
785
744
  } | {
786
745
  type: "assert-set";
787
746
  assert: {
788
- type: import("./types").AssertionType;
789
- value?: import("./types").AssertionValue | undefined;
747
+ type: import("../types").AssertionType;
748
+ value?: import("../types").AssertionValue | undefined;
749
+ provider?: any;
790
750
  transform?: string | undefined;
791
751
  rubricPrompt?: string | string[] | {
792
752
  role: string;
793
753
  content: string;
794
754
  }[] | undefined;
795
- provider?: any;
796
755
  threshold?: number | undefined;
797
756
  weight?: number | undefined;
798
757
  metric?: string | undefined;
@@ -803,7 +762,7 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
803
762
  })[] | undefined;
804
763
  threshold?: number | undefined;
805
764
  }[];
806
- config: {
765
+ tests: {
807
766
  options?: ({
808
767
  prefix?: string | undefined;
809
768
  suffix?: string | undefined;
@@ -812,11 +771,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
812
771
  postprocess?: string | undefined;
813
772
  storeOutputAs?: string | undefined;
814
773
  } & {
774
+ provider?: any;
815
775
  rubricPrompt?: string | string[] | {
816
776
  role: string;
817
777
  content: string;
818
778
  }[] | undefined;
819
- provider?: any;
820
779
  factuality?: {
821
780
  subset?: number | undefined;
822
781
  superset?: number | undefined;
@@ -828,12 +787,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
828
787
  disableVarExpansion?: boolean | undefined;
829
788
  disableConversationVar?: boolean | undefined;
830
789
  }) | undefined;
831
- vars?: Record<string, string | any[] | string[] | {}> | undefined;
832
790
  provider?: string | {
791
+ id?: string | undefined;
792
+ config?: any;
833
793
  prompts?: string[] | undefined;
834
794
  delay?: number | undefined;
835
- config?: any;
836
- id?: string | undefined;
837
795
  label?: string | undefined;
838
796
  transform?: string | undefined;
839
797
  env?: {
@@ -935,31 +893,33 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
935
893
  classification?: Record<string, number> | undefined;
936
894
  }>) | undefined;
937
895
  } | undefined;
896
+ vars?: Record<string, string | any[] | string[] | {}> | undefined;
897
+ metadata?: Record<string, any> | undefined;
938
898
  description?: string | undefined;
939
899
  providerOutput?: string | {} | undefined;
940
900
  assert?: ({
941
- type: import("./types").AssertionType;
942
- value?: import("./types").AssertionValue | undefined;
901
+ type: import("../types").AssertionType;
902
+ value?: import("../types").AssertionValue | undefined;
903
+ provider?: any;
943
904
  transform?: string | undefined;
944
905
  rubricPrompt?: string | string[] | {
945
906
  role: string;
946
907
  content: string;
947
908
  }[] | undefined;
948
- provider?: any;
949
909
  threshold?: number | undefined;
950
910
  weight?: number | undefined;
951
911
  metric?: string | undefined;
952
912
  } | {
953
913
  type: "assert-set";
954
914
  assert: {
955
- type: import("./types").AssertionType;
956
- value?: import("./types").AssertionValue | undefined;
915
+ type: import("../types").AssertionType;
916
+ value?: import("../types").AssertionValue | undefined;
917
+ provider?: any;
957
918
  transform?: string | undefined;
958
919
  rubricPrompt?: string | string[] | {
959
920
  role: string;
960
921
  content: string;
961
922
  }[] | undefined;
962
- provider?: any;
963
923
  threshold?: number | undefined;
964
924
  weight?: number | undefined;
965
925
  metric?: string | undefined;
@@ -981,11 +941,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
981
941
  postprocess?: string | undefined;
982
942
  storeOutputAs?: string | undefined;
983
943
  } & {
944
+ provider?: any;
984
945
  rubricPrompt?: string | string[] | {
985
946
  role: string;
986
947
  content: string;
987
948
  }[] | undefined;
988
- provider?: any;
989
949
  factuality?: {
990
950
  subset?: number | undefined;
991
951
  superset?: number | undefined;
@@ -997,12 +957,11 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
997
957
  disableVarExpansion?: boolean | undefined;
998
958
  disableConversationVar?: boolean | undefined;
999
959
  }) | undefined;
1000
- vars?: Record<string, string | any[] | string[] | {}> | undefined;
1001
960
  provider?: string | {
961
+ id?: string | undefined;
962
+ config?: any;
1002
963
  prompts?: string[] | undefined;
1003
964
  delay?: number | undefined;
1004
- config?: any;
1005
- id?: string | undefined;
1006
965
  label?: string | undefined;
1007
966
  transform?: string | undefined;
1008
967
  env?: {
@@ -1104,30 +1063,32 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
1104
1063
  classification?: Record<string, number> | undefined;
1105
1064
  }>) | undefined;
1106
1065
  } | undefined;
1066
+ vars?: Record<string, string | any[] | string[] | {}> | undefined;
1067
+ metadata?: Record<string, any> | undefined;
1107
1068
  providerOutput?: string | {} | undefined;
1108
1069
  assert?: ({
1109
- type: import("./types").AssertionType;
1110
- value?: import("./types").AssertionValue | undefined;
1070
+ type: import("../types").AssertionType;
1071
+ value?: import("../types").AssertionValue | undefined;
1072
+ provider?: any;
1111
1073
  transform?: string | undefined;
1112
1074
  rubricPrompt?: string | string[] | {
1113
1075
  role: string;
1114
1076
  content: string;
1115
1077
  }[] | undefined;
1116
- provider?: any;
1117
1078
  threshold?: number | undefined;
1118
1079
  weight?: number | undefined;
1119
1080
  metric?: string | undefined;
1120
1081
  } | {
1121
1082
  type: "assert-set";
1122
1083
  assert: {
1123
- type: import("./types").AssertionType;
1124
- value?: import("./types").AssertionValue | undefined;
1084
+ type: import("../types").AssertionType;
1085
+ value?: import("../types").AssertionValue | undefined;
1086
+ provider?: any;
1125
1087
  transform?: string | undefined;
1126
1088
  rubricPrompt?: string | string[] | {
1127
1089
  role: string;
1128
1090
  content: string;
1129
1091
  }[] | undefined;
1130
- provider?: any;
1131
1092
  threshold?: number | undefined;
1132
1093
  weight?: number | undefined;
1133
1094
  metric?: string | undefined;
@@ -1140,14 +1101,68 @@ export declare const evals: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
1140
1101
  } | undefined;
1141
1102
  nunjucksFilters?: Record<string, string> | undefined;
1142
1103
  derivedMetrics?: {
1143
- value: string | ((args_0: Record<string, number>, args_1: import("./types").RunEvalOptions, ...args_2: unknown[]) => number);
1104
+ value: string | ((args_0: Record<string, number>, args_1: import("../types").RunEvalOptions, ...args_2: unknown[]) => number);
1144
1105
  name: string;
1145
1106
  }[] | undefined;
1107
+ redteam?: {
1108
+ plugins: any[];
1109
+ strategies: ({
1110
+ id: string;
1111
+ } | {
1112
+ id: string;
1113
+ })[];
1114
+ provider?: string | undefined;
1115
+ injectVar?: string | undefined;
1116
+ purpose?: string | undefined;
1117
+ } | undefined;
1146
1118
  outputPath?: string | string[] | undefined;
1147
1119
  sharing?: boolean | {
1148
1120
  apiBaseUrl?: string | undefined;
1149
1121
  appBaseUrl?: string | undefined;
1150
1122
  } | undefined;
1123
+ evaluateOptions?: {
1124
+ repeat?: number | undefined;
1125
+ cache?: boolean | undefined;
1126
+ maxConcurrency?: number | undefined;
1127
+ delay?: number | undefined;
1128
+ interactiveProviders?: boolean | undefined;
1129
+ generateSuggestions?: boolean | undefined;
1130
+ showProgressBar?: boolean | undefined;
1131
+ progressCallback?: ((args_0: number, args_1: number, args_2: number, args_3: import("../types").RunEvalOptions) => void) | undefined;
1132
+ eventSource?: string | undefined;
1133
+ } | undefined;
1134
+ commandLineOptions?: {
1135
+ repeat?: string | undefined;
1136
+ cache?: boolean | undefined;
1137
+ config?: string[] | undefined;
1138
+ envFile?: string | undefined;
1139
+ output?: string[] | undefined;
1140
+ write?: boolean | undefined;
1141
+ prompts?: string[] | undefined;
1142
+ providers?: string[] | undefined;
1143
+ maxConcurrency?: string | undefined;
1144
+ delay?: string | undefined;
1145
+ vars?: string | undefined;
1146
+ tests?: string | undefined;
1147
+ assertions?: string | undefined;
1148
+ modelOutputs?: string | undefined;
1149
+ verbose?: boolean | undefined;
1150
+ grader?: string | undefined;
1151
+ tableCellMaxLength?: string | undefined;
1152
+ table?: boolean | undefined;
1153
+ share?: boolean | undefined;
1154
+ progressBar?: boolean | undefined;
1155
+ watch?: boolean | undefined;
1156
+ interactiveProviders?: boolean | undefined;
1157
+ filterFailing?: string | undefined;
1158
+ filterFirstN?: string | undefined;
1159
+ filterPattern?: string | undefined;
1160
+ filterProviders?: string | undefined;
1161
+ var?: Record<string, string> | undefined;
1162
+ generateSuggestions?: boolean | undefined;
1163
+ promptPrefix?: string | undefined;
1164
+ promptSuffix?: string | undefined;
1165
+ } | undefined;
1151
1166
  }>;
1152
1167
  driverParam: string;
1153
1168
  notNull: true;
@@ -1238,11 +1253,11 @@ export declare const datasets: import("drizzle-orm/sqlite-core").SQLiteTableWith
1238
1253
  postprocess?: string | undefined;
1239
1254
  storeOutputAs?: string | undefined;
1240
1255
  } & {
1256
+ provider?: any;
1241
1257
  rubricPrompt?: string | string[] | {
1242
1258
  role: string;
1243
1259
  content: string;
1244
1260
  }[] | undefined;
1245
- provider?: any;
1246
1261
  factuality?: {
1247
1262
  subset?: number | undefined;
1248
1263
  superset?: number | undefined;
@@ -1254,12 +1269,11 @@ export declare const datasets: import("drizzle-orm/sqlite-core").SQLiteTableWith
1254
1269
  disableVarExpansion?: boolean | undefined;
1255
1270
  disableConversationVar?: boolean | undefined;
1256
1271
  }) | undefined;
1257
- vars?: Record<string, string | any[] | string[] | {}> | undefined;
1258
1272
  provider?: string | {
1273
+ id?: string | undefined;
1274
+ config?: any;
1259
1275
  prompts?: string[] | undefined;
1260
1276
  delay?: number | undefined;
1261
- config?: any;
1262
- id?: string | undefined;
1263
1277
  label?: string | undefined;
1264
1278
  transform?: string | undefined;
1265
1279
  env?: {
@@ -1361,31 +1375,33 @@ export declare const datasets: import("drizzle-orm/sqlite-core").SQLiteTableWith
1361
1375
  classification?: Record<string, number> | undefined;
1362
1376
  }>) | undefined;
1363
1377
  } | undefined;
1378
+ vars?: Record<string, string | any[] | string[] | {}> | undefined;
1379
+ metadata?: Record<string, any> | undefined;
1364
1380
  description?: string | undefined;
1365
1381
  providerOutput?: string | {} | undefined;
1366
1382
  assert?: ({
1367
- type: import("./types").AssertionType;
1368
- value?: import("./types").AssertionValue | undefined;
1383
+ type: import("../types").AssertionType;
1384
+ value?: import("../types").AssertionValue | undefined;
1385
+ provider?: any;
1369
1386
  transform?: string | undefined;
1370
1387
  rubricPrompt?: string | string[] | {
1371
1388
  role: string;
1372
1389
  content: string;
1373
1390
  }[] | undefined;
1374
- provider?: any;
1375
1391
  threshold?: number | undefined;
1376
1392
  weight?: number | undefined;
1377
1393
  metric?: string | undefined;
1378
1394
  } | {
1379
1395
  type: "assert-set";
1380
1396
  assert: {
1381
- type: import("./types").AssertionType;
1382
- value?: import("./types").AssertionValue | undefined;
1397
+ type: import("../types").AssertionType;
1398
+ value?: import("../types").AssertionValue | undefined;
1399
+ provider?: any;
1383
1400
  transform?: string | undefined;
1384
1401
  rubricPrompt?: string | string[] | {
1385
1402
  role: string;
1386
1403
  content: string;
1387
1404
  }[] | undefined;
1388
- provider?: any;
1389
1405
  threshold?: number | undefined;
1390
1406
  weight?: number | undefined;
1391
1407
  metric?: string | undefined;
@@ -1479,7 +1495,4 @@ export declare const evalsToDatasetsRelations: import("drizzle-orm").Relations<"
1479
1495
  eval: import("drizzle-orm").One<"evals", true>;
1480
1496
  dataset: import("drizzle-orm").One<"datasets", true>;
1481
1497
  }>;
1482
- export declare function getDbPath(): string;
1483
- export declare function getDbSignalPath(): string;
1484
- export declare function getDb(): import("drizzle-orm/better-sqlite3").BetterSQLite3Database<Record<string, unknown>>;
1485
- //# sourceMappingURL=database.d.ts.map
1498
+ //# sourceMappingURL=operations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/database.ts"],"names":[],"mappings":"AAKA,OAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAShB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe1B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;EAE1B,CAAC;AAIJ,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMnB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;EAE3B,CAAC;AAIJ,eAAO,MAAM,cAAc;;;EAGxB,CAAC;AAEJ,eAAO,MAAM,uBAAuB;;;EASjC,CAAC;AAEJ,eAAO,MAAM,wBAAwB;;;EASlC,CAAC"}
@@ -1,18 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.evalsToDatasetsRelations = exports.evalsToPromptsRelations = exports.evalsRelations = exports.datasetsRelations = exports.evalsToDatasets = exports.datasets = exports.promptsRelations = exports.evalsToPrompts = exports.evals = exports.prompts = void 0;
7
- exports.getDbPath = getDbPath;
8
- exports.getDbSignalPath = getDbSignalPath;
9
- exports.getDb = getDb;
10
- const better_sqlite3_1 = __importDefault(require("better-sqlite3"));
11
4
  const drizzle_orm_1 = require("drizzle-orm");
12
- const better_sqlite3_2 = require("drizzle-orm/better-sqlite3");
13
5
  const sqlite_core_1 = require("drizzle-orm/sqlite-core");
14
- const node_path_1 = __importDefault(require("node:path"));
15
- const util_1 = require("./util");
16
6
  // ------------ Prompts ------------
17
7
  exports.prompts = (0, sqlite_core_1.sqliteTable)('prompts', {
18
8
  id: (0, sqlite_core_1.text)('id').primaryKey(),
@@ -135,18 +125,4 @@ export const llmOutputsRelations = relations(llmOutputs, ({ one }) => ({
135
125
  }),
136
126
  }));
137
127
  */
138
- let dbInstance = null;
139
- function getDbPath() {
140
- return node_path_1.default.resolve((0, util_1.getConfigDirectoryPath)(true /* createIfNotExists */), 'promptfoo.db');
141
- }
142
- function getDbSignalPath() {
143
- return node_path_1.default.resolve((0, util_1.getConfigDirectoryPath)(true /* createIfNotExists */), 'evalLastWritten');
144
- }
145
- function getDb() {
146
- if (!dbInstance) {
147
- const sqlite = new better_sqlite3_1.default(getDbPath());
148
- dbInstance = (0, better_sqlite3_2.drizzle)(sqlite);
149
- }
150
- return dbInstance;
151
- }
152
- //# sourceMappingURL=database.js.map
128
+ //# sourceMappingURL=operations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/database/operations.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAC7C,yDAAiF;AAGjF,oCAAoC;AAEvB,QAAA,OAAO,GAAG,IAAA,yBAAW,EAAC,SAAS,EAAE;IAC5C,EAAE,EAAE,IAAA,kBAAI,EAAC,IAAI,CAAC,CAAC,UAAU,EAAE;IAC3B,SAAS,EAAE,IAAA,qBAAO,EAAC,YAAY,CAAC;SAC7B,OAAO,EAAE;SACT,OAAO,CAAC,IAAA,iBAAG,EAAA,mBAAmB,CAAC;IAClC,MAAM,EAAE,IAAA,kBAAI,EAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;CACjC,CAAC,CAAC;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,aAAK,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5D,cAAc,EAAE,IAAI,CAAC,sBAAc,CAAC;IACpC,eAAe,EAAE,IAAI,CAAC,uBAAe,CAAC;CACvC,CAAC,CAAC,CAAC;AAES,QAAA,uBAAuB,GAAG,IAAA,uBAAS,EAAC,sBAAc,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7E,IAAI,EAAE,GAAG,CAAC,aAAK,EAAE;QACf,MAAM,EAAE,CAAC,sBAAc,CAAC,MAAM,CAAC;QAC/B,UAAU,EAAE,CAAC,aAAK,CAAC,EAAE,CAAC;KACvB,CAAC;IACF,MAAM,EAAE,GAAG,CAAC,eAAO,EAAE;QACnB,MAAM,EAAE,CAAC,sBAAc,CAAC,QAAQ,CAAC;QACjC,UAAU,EAAE,CAAC,eAAO,CAAC,EAAE,CAAC;KACzB,CAAC;CACH,CAAC,CAAC,CAAC;AAES,QAAA,wBAAwB,GAAG,IAAA,uBAAS,EAAC,uBAAe,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/E,IAAI,EAAE,GAAG,CAAC,aAAK,EAAE;QACf,MAAM,EAAE,CAAC,uBAAe,CAAC,MAAM,CAAC;QAChC,UAAU,EAAE,CAAC,aAAK,CAAC,EAAE,CAAC;KACvB,CAAC;IACF,OAAO,EAAE,GAAG,CAAC,gBAAQ,EAAE;QACrB,MAAM,EAAE,CAAC,uBAAe,CAAC,SAAS,CAAC;QACnC,UAAU,EAAE,CAAC,gBAAQ,CAAC,EAAE,CAAC;KAC1B,CAAC;CACH,CAAC,CAAC,CAAC;AAEJ,oCAAoC;AACpC,wDAAwD;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCE"}
@@ -46,7 +46,7 @@ const cliState_1 = __importDefault(require("./cliState"));
46
46
  const esm_1 = require("./esm");
47
47
  const logger_1 = __importDefault(require("./logger"));
48
48
  const azureopenaiUtil_1 = require("./providers/azureopenaiUtil");
49
- const wrapper_1 = require("./python/wrapper");
49
+ const pythonUtils_1 = require("./python/pythonUtils");
50
50
  const suggestions_1 = require("./suggestions");
51
51
  const telemetry_1 = __importDefault(require("./telemetry"));
52
52
  const util_1 = require("./util");
@@ -156,7 +156,7 @@ async function renderPrompt(prompt, vars, nunjucksFilters, provider) {
156
156
  vars[varName] = javascriptOutput.output;
157
157
  break;
158
158
  case 'py':
159
- const pythonScriptOutput = (await (0, wrapper_1.runPython)(filePath, 'get_var', [
159
+ const pythonScriptOutput = (await (0, pythonUtils_1.runPython)(filePath, 'get_var', [
160
160
  varName,
161
161
  basePrompt,
162
162
  vars,