mastra 0.12.2-alpha.0 → 0.12.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/commands/scorers/add-new-scorer.d.ts.map +1 -1
- package/dist/commands/scorers/available-scorers.d.ts +1 -1
- package/dist/commands/scorers/available-scorers.d.ts.map +1 -1
- package/dist/commands/scorers/list-all-scorers.d.ts.map +1 -1
- package/dist/commands/scorers/types.d.ts +3 -1
- package/dist/commands/scorers/types.d.ts.map +1 -1
- package/dist/index.js +283 -70
- package/dist/index.js.map +1 -1
- package/dist/playground/assets/{abap-CQMR8OF8.js → abap-nSiGne7Q.js} +1 -1
- package/dist/playground/assets/{abnf-CT_OLOZP.js → abnf-DfvYscnC.js} +1 -1
- package/dist/playground/assets/{actionscript-DN9RUMK5.js → actionscript-HJWODpTx.js} +1 -1
- package/dist/playground/assets/{ada-Biuy7x3i.js → ada-7xo4lioe.js} +1 -1
- package/dist/playground/assets/{agda-DfFfMNt0.js → agda-BKhj3Uw8.js} +1 -1
- package/dist/playground/assets/{al-zCto3YJI.js → al-B3M4HvXx.js} +1 -1
- package/dist/playground/assets/{antlr4-M67dKbjZ.js → antlr4-CCyF7jd_.js} +1 -1
- package/dist/playground/assets/{apacheconf-D1U3kklQ.js → apacheconf-hLOXn33V.js} +1 -1
- package/dist/playground/assets/{apex-Bk5xZIFD.js → apex-CjOeoSds.js} +1 -1
- package/dist/playground/assets/{apl-DUawB_8Q.js → apl-_HziyFtb.js} +1 -1
- package/dist/playground/assets/{applescript-CZ-T8OB0.js → applescript-B4V02dSw.js} +1 -1
- package/dist/playground/assets/{aql-CsXiTr64.js → aql-B2bTWBCF.js} +1 -1
- package/dist/playground/assets/{arduino-Dr3dZkwk.js → arduino-C8Kjbe3Q.js} +1 -1
- package/dist/playground/assets/{arff-DXQSmi6V.js → arff-PgCkHlgf.js} +1 -1
- package/dist/playground/assets/{asciidoc-ul4i5duM.js → asciidoc-TuNuZMv7.js} +1 -1
- package/dist/playground/assets/{asm6502-DQD9Mik2.js → asm6502-D1k8B7Zn.js} +1 -1
- package/dist/playground/assets/{asmatmel-jwjUnU3p.js → asmatmel-D9T54rtF.js} +1 -1
- package/dist/playground/assets/{aspnet-BQWud54o.js → aspnet-OEgV8rih.js} +1 -1
- package/dist/playground/assets/{autohotkey-B7S7ut6y.js → autohotkey-CP5WkQZG.js} +1 -1
- package/dist/playground/assets/{autoit-DiyNQbqf.js → autoit-BR5NhAd0.js} +1 -1
- package/dist/playground/assets/{avisynth-B0wmA1IC.js → avisynth-ILSZKiqP.js} +1 -1
- package/dist/playground/assets/{avro-idl-C0egJq_2.js → avro-idl-IrFMtOZ3.js} +1 -1
- package/dist/playground/assets/{bash-BNv6AlfM.js → bash-BPPhvfzt.js} +1 -1
- package/dist/playground/assets/{basic-C69l7UTm.js → basic-CsvyQ5mA.js} +1 -1
- package/dist/playground/assets/{batch-DoRVPqXt.js → batch-DRdn4gYA.js} +1 -1
- package/dist/playground/assets/{bbcode-C-_SrnwH.js → bbcode-DZDv7ulH.js} +1 -1
- package/dist/playground/assets/{bicep-BViWBNV5.js → bicep-C_asbxm2.js} +1 -1
- package/dist/playground/assets/{birb-BxgUR_Mq.js → birb-DieRIjXL.js} +1 -1
- package/dist/playground/assets/{bison-BcpkGs-r.js → bison-rw0WbSY4.js} +1 -1
- package/dist/playground/assets/{bnf-DYgj7Dy1.js → bnf-BHY2Mjo0.js} +1 -1
- package/dist/playground/assets/{brainfuck-DnpeCsAw.js → brainfuck-BB6TYzot.js} +1 -1
- package/dist/playground/assets/{brightscript-BI_T2NbD.js → brightscript-Ifi-fVqw.js} +1 -1
- package/dist/playground/assets/{bro-BpzgF-nP.js → bro-D2m9AMMx.js} +1 -1
- package/dist/playground/assets/{bsl-J33gFVON.js → bsl-CK2-0_1t.js} +1 -1
- package/dist/playground/assets/{c-nDAyIGfY.js → c-Cg1ywOe7.js} +1 -1
- package/dist/playground/assets/{cfscript-8VdTPB9w.js → cfscript-BI5bWpl_.js} +1 -1
- package/dist/playground/assets/{chaiscript-C8XsMc0u.js → chaiscript-B8ZXi6gV.js} +1 -1
- package/dist/playground/assets/{cil-CeHt2Zg7.js → cil-DdGkHMC0.js} +1 -1
- package/dist/playground/assets/{clike-LpzTpPc2.js → clike-DXE8TRBt.js} +1 -1
- package/dist/playground/assets/{clojure-D1M6bR62.js → clojure-B6sUc1_g.js} +1 -1
- package/dist/playground/assets/{cmake-BfsF3Y_Z.js → cmake-BYhuh_F7.js} +1 -1
- package/dist/playground/assets/{cobol-BsZSv4U4.js → cobol-CNIikb_P.js} +1 -1
- package/dist/playground/assets/{coffeescript-CcdXk9NC.js → coffeescript-BuELEK1G.js} +1 -1
- package/dist/playground/assets/{concurnas-CMnaY3eN.js → concurnas-BXOZWHTr.js} +1 -1
- package/dist/playground/assets/{coq-B5Xg6-Pm.js → coq-BA0tLG8w.js} +1 -1
- package/dist/playground/assets/{core-D5uEjaBy.js → core-jW3JlGeA.js} +1 -1
- package/dist/playground/assets/{cpp-DGLGLrev.js → cpp-BGbuFWs8.js} +1 -1
- package/dist/playground/assets/{crystal-DMtvHdHw.js → crystal-B1udGoZp.js} +1 -1
- package/dist/playground/assets/{csharp-CZAWh8CQ.js → csharp-DIzQ9hSh.js} +1 -1
- package/dist/playground/assets/{cshtml-BdYHsT5p.js → cshtml-BbyKpcxY.js} +1 -1
- package/dist/playground/assets/{csp-DcWYDhz9.js → csp-BKFCurDb.js} +1 -1
- package/dist/playground/assets/{css-DJu150Kw.js → css--NBuSamo.js} +1 -1
- package/dist/playground/assets/{css-extras-B8YXBcY9.js → css-extras-Dlm_fnsF.js} +1 -1
- package/dist/playground/assets/{csv-C9J-07wx.js → csv-B7Qkl7JR.js} +1 -1
- package/dist/playground/assets/{cypher-CDWLoXaz.js → cypher-3SNtM91b.js} +1 -1
- package/dist/playground/assets/{d-R2Z4CifN.js → d-CUHDK1fB.js} +1 -1
- package/dist/playground/assets/{dart-Czsh6ZpI.js → dart-5GNjc5aT.js} +1 -1
- package/dist/playground/assets/{dataweave-DT5UcTMs.js → dataweave-BVlh-eWj.js} +1 -1
- package/dist/playground/assets/{dax-DxxKoVZU.js → dax-BGiM9kXS.js} +1 -1
- package/dist/playground/assets/{dhall-ciaKv1yX.js → dhall-DOtklK9n.js} +1 -1
- package/dist/playground/assets/{diff-CqB_P9g4.js → diff-Ed3bKxfE.js} +1 -1
- package/dist/playground/assets/{django-DbzYR6TW.js → django-7pkBnQ4L.js} +1 -1
- package/dist/playground/assets/{dns-zone-file-CUa7tbUe.js → dns-zone-file-DYmPRU11.js} +1 -1
- package/dist/playground/assets/{docker-DxAvoL9A.js → docker-CktpWvuR.js} +1 -1
- package/dist/playground/assets/{dot-C8KeUxhI.js → dot-DBHmTnL4.js} +1 -1
- package/dist/playground/assets/{ebnf-DuQ7HPdj.js → ebnf-BT5onbeC.js} +1 -1
- package/dist/playground/assets/{editorconfig-BKm2frrT.js → editorconfig-D9fszoMz.js} +1 -1
- package/dist/playground/assets/{eiffel-tjrmNw_8.js → eiffel-CK3CUe-1.js} +1 -1
- package/dist/playground/assets/{ejs-BM7XouDQ.js → ejs-C4MaDW9H.js} +1 -1
- package/dist/playground/assets/{elixir-CWr0wIHi.js → elixir-CqIPPVAL.js} +1 -1
- package/dist/playground/assets/{elm-C74drKXc.js → elm-DKmwWQvH.js} +1 -1
- package/dist/playground/assets/{erb-C91NPEKp.js → erb-XvcfDAXR.js} +1 -1
- package/dist/playground/assets/{erlang-5GTL906j.js → erlang-BOHiKJ4l.js} +1 -1
- package/dist/playground/assets/{etlua-ncW7mNRL.js → etlua-C9MGBNFD.js} +1 -1
- package/dist/playground/assets/{excel-formula-lBagEF4a.js → excel-formula-2cXmIUb1.js} +1 -1
- package/dist/playground/assets/{factor-DBlEWrNX.js → factor-6gCde76M.js} +1 -1
- package/dist/playground/assets/{false-Co0_JIfd.js → false-chLgCw_j.js} +1 -1
- package/dist/playground/assets/{firestore-security-rules-DXoueLhY.js → firestore-security-rules-CkXWCj3Z.js} +1 -1
- package/dist/playground/assets/{flow-D-5LXFQS.js → flow-myhEFThJ.js} +1 -1
- package/dist/playground/assets/{fortran-DKkGoP4U.js → fortran-DDFl_4E6.js} +1 -1
- package/dist/playground/assets/{fsharp-BDrrLV5y.js → fsharp-BpDwhpt2.js} +1 -1
- package/dist/playground/assets/{ftl-DAQXuXA3.js → ftl-VP6TmVXF.js} +1 -1
- package/dist/playground/assets/{gap-DNdZhlFB.js → gap-DrhvuN_W.js} +1 -1
- package/dist/playground/assets/{gcode-CiH_kUPM.js → gcode-wn5cLupy.js} +1 -1
- package/dist/playground/assets/{gdscript-U_4eRolY.js → gdscript-C8DzvBKo.js} +1 -1
- package/dist/playground/assets/{gedcom-BBbGs1sX.js → gedcom-DzIsd5Mj.js} +1 -1
- package/dist/playground/assets/{gherkin-q_ofFC0o.js → gherkin-D99-lObd.js} +1 -1
- package/dist/playground/assets/{git-DQWY4gVG.js → git-CB9AIUbJ.js} +1 -1
- package/dist/playground/assets/{glsl-CwJxDois.js → glsl-rvvL3AZN.js} +1 -1
- package/dist/playground/assets/{gml-DxTcaPCJ.js → gml-BNu3qlDv.js} +1 -1
- package/dist/playground/assets/{gn-ap7SKZpK.js → gn-BBBB0x8l.js} +1 -1
- package/dist/playground/assets/{go-BGqxXFpz.js → go-JEczKvgY.js} +1 -1
- package/dist/playground/assets/{go-module-5Sn_ZeUc.js → go-module-SeFAsgs5.js} +1 -1
- package/dist/playground/assets/{graphql-CsvB3ba-.js → graphql-BkPH-jQV.js} +1 -1
- package/dist/playground/assets/{groovy-CxE7eSfE.js → groovy-wUaX95p6.js} +1 -1
- package/dist/playground/assets/{haml-BNeaGIVO.js → haml-B5OzU9Zy.js} +1 -1
- package/dist/playground/assets/{handlebars-BbM3W4Hv.js → handlebars-C-jf620o.js} +1 -1
- package/dist/playground/assets/{haskell-D2IL7QSA.js → haskell-BAcKyVJO.js} +1 -1
- package/dist/playground/assets/{haxe-BnwK8yWs.js → haxe-BtqvG3tP.js} +1 -1
- package/dist/playground/assets/{hcl-BiDvoWa5.js → hcl-BDgOPTWu.js} +1 -1
- package/dist/playground/assets/{hlsl-DEZSU_zu.js → hlsl-CucW9LkF.js} +1 -1
- package/dist/playground/assets/{hoon-DRAG3NP_.js → hoon-CcubUcd2.js} +1 -1
- package/dist/playground/assets/{hpkp-CFshG6ti.js → hpkp-CHezNr75.js} +1 -1
- package/dist/playground/assets/{hsts-W4YbpF9S.js → hsts-DRHxQ1vN.js} +1 -1
- package/dist/playground/assets/{http-CI0ww0aI.js → http-U5UQ4Dof.js} +1 -1
- package/dist/playground/assets/{ichigojam-CHvYMe4o.js → ichigojam-CfYmCnP2.js} +1 -1
- package/dist/playground/assets/{icon-Cd-5Eonh.js → icon-fUzeOPc1.js} +1 -1
- package/dist/playground/assets/{icu-message-format-BzLTwFGL.js → icu-message-format-BO-yViKP.js} +1 -1
- package/dist/playground/assets/{idris-Dvqc1T4x.js → idris-3FqXKYR4.js} +1 -1
- package/dist/playground/assets/{iecst-DQQ4zM4g.js → iecst-CcasnzHv.js} +1 -1
- package/dist/playground/assets/{ignore-DffR2OLq.js → ignore-BrFj4Tox.js} +1 -1
- package/dist/playground/assets/{index-C6MDNmDf.js → index-78q14eNz.js} +285 -280
- package/dist/playground/assets/{index-BARdDNGr.js → index-DrOGMVYq.js} +1 -1
- package/dist/playground/assets/{inform7-BT7kUf6f.js → inform7-BBdo-ok3.js} +1 -1
- package/dist/playground/assets/{ini-BEIpBs_5.js → ini-K7vEki1N.js} +1 -1
- package/dist/playground/assets/{io-DhYeKGRV.js → io-DMiVxqK-.js} +1 -1
- package/dist/playground/assets/{j-vjEfLqyd.js → j-CKlkRGyY.js} +1 -1
- package/dist/playground/assets/{java-DgXPxJlV.js → java-BvVCCvCL.js} +1 -1
- package/dist/playground/assets/{javadoc-BFqdFVDm.js → javadoc-BvTGthyc.js} +1 -1
- package/dist/playground/assets/{javadoclike-C6it6E_n.js → javadoclike-NzFzFnqR.js} +1 -1
- package/dist/playground/assets/{javascript-DHIu_KPo.js → javascript-DYnaORgO.js} +1 -1
- package/dist/playground/assets/{javastacktrace-BL0ZRVZr.js → javastacktrace-CvYJo54n.js} +1 -1
- package/dist/playground/assets/{jexl-DlMRd12A.js → jexl-D7CKx3dy.js} +1 -1
- package/dist/playground/assets/{jolie-Iyl9bqBr.js → jolie-D1MEYXUn.js} +1 -1
- package/dist/playground/assets/{jq-BNiCuDOJ.js → jq-BjH7Lbq-.js} +1 -1
- package/dist/playground/assets/{js-extras-BdghfXeM.js → js-extras-DJUZX9Pr.js} +1 -1
- package/dist/playground/assets/{js-templates-sswEbaxg.js → js-templates-ru2WZx9S.js} +1 -1
- package/dist/playground/assets/{jsdoc-BMY7PhT3.js → jsdoc-DoGBRH1D.js} +1 -1
- package/dist/playground/assets/{json-CBj9E2eH.js → json-Cw3Co6Db.js} +1 -1
- package/dist/playground/assets/{json5-CDBkZuP7.js → json5-Buc-coQN.js} +1 -1
- package/dist/playground/assets/{jsonp-D9MBLzzv.js → jsonp-DrX7lxbX.js} +1 -1
- package/dist/playground/assets/{jsstacktrace-D4EA8vTX.js → jsstacktrace-Bz8MB7sd.js} +1 -1
- package/dist/playground/assets/{jsx--PW-fr7-.js → jsx-DKKtM_9o.js} +1 -1
- package/dist/playground/assets/{julia-DBmDsZtW.js → julia-DpDykPca.js} +1 -1
- package/dist/playground/assets/{keepalived-CfuXSkj9.js → keepalived-D0db4bfk.js} +1 -1
- package/dist/playground/assets/{keyman-9ZLGL17P.js → keyman-lINFCOl1.js} +1 -1
- package/dist/playground/assets/{kotlin-ZJGwrbFy.js → kotlin-H01RJMaZ.js} +1 -1
- package/dist/playground/assets/{kumir-9kpR-De2.js → kumir-Cw0umF_m.js} +1 -1
- package/dist/playground/assets/{kusto-BzsN2HVa.js → kusto-BV_6r0kT.js} +1 -1
- package/dist/playground/assets/{latex-Cq5HKTsT.js → latex-BXf3ulqR.js} +1 -1
- package/dist/playground/assets/{latte-DEgbvn9Z.js → latte-CrszBsQ3.js} +1 -1
- package/dist/playground/assets/{less-VwKXH-wv.js → less-DaWkRklz.js} +1 -1
- package/dist/playground/assets/{lilypond-zzt2NcRH.js → lilypond-CB9FpoNX.js} +1 -1
- package/dist/playground/assets/{liquid-zP2DcJaV.js → liquid-BoJswFSe.js} +1 -1
- package/dist/playground/assets/{lisp-CgljZXky.js → lisp-8Dp8NclX.js} +1 -1
- package/dist/playground/assets/{livescript-CKOq61f8.js → livescript-C1x6eYP5.js} +1 -1
- package/dist/playground/assets/{llvm-0p29bgFI.js → llvm-DnYp-WfG.js} +1 -1
- package/dist/playground/assets/{log-BFBa6_Me.js → log-DEEF7d0I.js} +1 -1
- package/dist/playground/assets/{lolcode-DMdSb48r.js → lolcode-B-WHF4sR.js} +1 -1
- package/dist/playground/assets/{lua-BpLiuCpZ.js → lua-DPkGCNA4.js} +1 -1
- package/dist/playground/assets/{magma-CEnSYS73.js → magma-CJJusTcW.js} +1 -1
- package/dist/playground/assets/{makefile-COE1Nk9d.js → makefile-DS2zaYZq.js} +1 -1
- package/dist/playground/assets/{markdown-CWjQXCB6.js → markdown-RlKWE_H0.js} +1 -1
- package/dist/playground/assets/{markup-P94fuPZy.js → markup-Bx7pWq-a.js} +1 -1
- package/dist/playground/assets/{markup-templating-DbGY0VWV.js → markup-templating-j6lVwrMp.js} +1 -1
- package/dist/playground/assets/{matlab-DwQsEGwu.js → matlab-DHs9-Scn.js} +1 -1
- package/dist/playground/assets/{maxscript-Bf1sIsl1.js → maxscript-CfWta-TZ.js} +1 -1
- package/dist/playground/assets/{mel-CxAbuu_U.js → mel-BvX3s5KY.js} +1 -1
- package/dist/playground/assets/{mermaid-ToX0lHro.js → mermaid-CxOpQvc6.js} +1 -1
- package/dist/playground/assets/{mizar-BPRl8Hrk.js → mizar-DXR1Odtd.js} +1 -1
- package/dist/playground/assets/{mongodb-Cn-Q9tGi.js → mongodb-lZLOLduP.js} +1 -1
- package/dist/playground/assets/{monkey-ChjgkhsF.js → monkey-CXD6F2oN.js} +1 -1
- package/dist/playground/assets/{moonscript-DJxzf6wo.js → moonscript-BVm5MPr8.js} +1 -1
- package/dist/playground/assets/{n1ql-BtVFq0ir.js → n1ql-CWHGOp7C.js} +1 -1
- package/dist/playground/assets/{n4js-BkgLSqb1.js → n4js-DzOMUrnZ.js} +1 -1
- package/dist/playground/assets/{nand2tetris-hdl-Bc0uvh6Z.js → nand2tetris-hdl-CFQcDFtt.js} +1 -1
- package/dist/playground/assets/{naniscript-BCgFqwZN.js → naniscript-DySTYg18.js} +1 -1
- package/dist/playground/assets/{nasm-DkbH8Nmq.js → nasm-Bw-hJfSx.js} +1 -1
- package/dist/playground/assets/{neon-DeBCOuEZ.js → neon-C3XUzU6d.js} +1 -1
- package/dist/playground/assets/{nevod-D3rZdeS2.js → nevod-CQ2Ib_TV.js} +1 -1
- package/dist/playground/assets/{nginx-DOqmIUlo.js → nginx-Dz-pTXdi.js} +1 -1
- package/dist/playground/assets/{nim-BSlHiEVw.js → nim-BQIwpopI.js} +1 -1
- package/dist/playground/assets/{nix-CuUP4ngN.js → nix-0Ug-CZsM.js} +1 -1
- package/dist/playground/assets/{nsis-bzB1dlnv.js → nsis-DMC_1LOH.js} +1 -1
- package/dist/playground/assets/{objectivec-yQZZmwvQ.js → objectivec-oQtdw3q-.js} +1 -1
- package/dist/playground/assets/{ocaml-DDIcDvrg.js → ocaml-nzsdYneZ.js} +1 -1
- package/dist/playground/assets/{opencl-BJWHm8W3.js → opencl-B_vwvPJK.js} +1 -1
- package/dist/playground/assets/{openqasm-CNWn4OeR.js → openqasm-CFhsH7Tk.js} +1 -1
- package/dist/playground/assets/{oz-BvpqusRA.js → oz-BQp-8VDx.js} +1 -1
- package/dist/playground/assets/{parigp-DQ4wkKHO.js → parigp-C7dUlp86.js} +1 -1
- package/dist/playground/assets/{parser-DXoAF9sB.js → parser-1GOu1IUO.js} +1 -1
- package/dist/playground/assets/{pascal-BBsg-juc.js → pascal-DupPGXgn.js} +1 -1
- package/dist/playground/assets/{pascaligo-BjIapJ5e.js → pascaligo-1cGwGiQt.js} +1 -1
- package/dist/playground/assets/{pcaxis-LkNeQaFT.js → pcaxis-BsdgNXGG.js} +1 -1
- package/dist/playground/assets/{peoplecode-BuVg6Xmx.js → peoplecode-O5os461o.js} +1 -1
- package/dist/playground/assets/{perl-84XpM0FD.js → perl-WO_rZ2QL.js} +1 -1
- package/dist/playground/assets/{php-BN6JvYsV.js → php-CzFdlfYT.js} +1 -1
- package/dist/playground/assets/{php-extras-BLb2_iZA.js → php-extras-CATrH6uH.js} +1 -1
- package/dist/playground/assets/{phpdoc-ZPB0Ikvp.js → phpdoc-XRPzLi7U.js} +1 -1
- package/dist/playground/assets/{plsql-BNOE9CqR.js → plsql-DQgBA7mH.js} +1 -1
- package/dist/playground/assets/{powerquery-1vxLlzZg.js → powerquery-CuFZhT8e.js} +1 -1
- package/dist/playground/assets/{powershell-BtSZjuwk.js → powershell-Dvaee68R.js} +1 -1
- package/dist/playground/assets/{processing-D5A0KC6_.js → processing-DwbudLV3.js} +1 -1
- package/dist/playground/assets/{prolog-BWyQbRk5.js → prolog-3hvrszDd.js} +1 -1
- package/dist/playground/assets/{promql-DQbzXtqb.js → promql-BxQx6fKu.js} +1 -1
- package/dist/playground/assets/{properties-IuML_xYM.js → properties-Bb--MCAW.js} +1 -1
- package/dist/playground/assets/{protobuf-QqkqDyeF.js → protobuf-DVqiJWfa.js} +1 -1
- package/dist/playground/assets/{psl-BYuLsK8j.js → psl-BbBq4RUo.js} +1 -1
- package/dist/playground/assets/{pug-BmwX_LrT.js → pug-_88vf2Mw.js} +1 -1
- package/dist/playground/assets/{puppet-D25Z0qv1.js → puppet-4Qawo5sK.js} +1 -1
- package/dist/playground/assets/{pure-CGBG45Js.js → pure-CgTLh5Zc.js} +1 -1
- package/dist/playground/assets/{purebasic-Ut6bhNIl.js → purebasic-CAIQUNp5.js} +1 -1
- package/dist/playground/assets/{purescript-zv_uOItz.js → purescript-BLcLnppg.js} +1 -1
- package/dist/playground/assets/{python-BugX6lXQ.js → python-BCsbigvG.js} +1 -1
- package/dist/playground/assets/{q-Cc4Gsk7a.js → q-zkse5P5r.js} +1 -1
- package/dist/playground/assets/{qml-qcHpxf3a.js → qml-CovGpXsL.js} +1 -1
- package/dist/playground/assets/{qore-CgtmgRLn.js → qore-BuMl8DfM.js} +1 -1
- package/dist/playground/assets/{qsharp-DLeOqyb5.js → qsharp-C_OHSR6U.js} +1 -1
- package/dist/playground/assets/{r-CNKgMKu2.js → r-Ct3u7eN_.js} +1 -1
- package/dist/playground/assets/{racket-DpTFxNCf.js → racket-BSfR04GN.js} +1 -1
- package/dist/playground/assets/{reason-C9LPVgLr.js → reason-BsDAYCcQ.js} +1 -1
- package/dist/playground/assets/{regex-D8TTdEyZ.js → regex-cfeMX_8N.js} +1 -1
- package/dist/playground/assets/{rego-BoJuIWoh.js → rego-7b-e270e.js} +1 -1
- package/dist/playground/assets/{renpy-KSqPOxbz.js → renpy-DoORDdH7.js} +1 -1
- package/dist/playground/assets/{rest-BEKXEuX3.js → rest-BVQ7tt9V.js} +1 -1
- package/dist/playground/assets/{rip-DV-6MFHU.js → rip-DuG-xsjx.js} +1 -1
- package/dist/playground/assets/{roboconf-C0rQRXMf.js → roboconf-BPWI8qwS.js} +1 -1
- package/dist/playground/assets/{robotframework-p1SDDBmU.js → robotframework-Baeq30Ag.js} +1 -1
- package/dist/playground/assets/{ruby-CEE0niMx.js → ruby-WjqFguSL.js} +1 -1
- package/dist/playground/assets/{rust-1KwvLzBC.js → rust-tEcVLuNy.js} +1 -1
- package/dist/playground/assets/{sas-CzntwC8I.js → sas-j7M0QO3i.js} +1 -1
- package/dist/playground/assets/{sass-BokRmQC0.js → sass-CJL-5bSn.js} +1 -1
- package/dist/playground/assets/{scala-BlRIF09Y.js → scala-CRszdzT_.js} +1 -1
- package/dist/playground/assets/{scheme-D6V72_fj.js → scheme-Gb4LnAK9.js} +1 -1
- package/dist/playground/assets/{scss-C3xNSODO.js → scss-6obOrVdF.js} +1 -1
- package/dist/playground/assets/{shell-session-BfBoLPdU.js → shell-session-C2Q_-geF.js} +1 -1
- package/dist/playground/assets/{smali-2OCH8rNu.js → smali-CvE0XeDL.js} +1 -1
- package/dist/playground/assets/{smalltalk-CzcNyh9G.js → smalltalk-slH82hXh.js} +1 -1
- package/dist/playground/assets/{smarty-YQ8bFuQU.js → smarty-BamfX_XA.js} +1 -1
- package/dist/playground/assets/{sml-IqKWr1t7.js → sml-NSI1xKvH.js} +1 -1
- package/dist/playground/assets/{solidity-CRTFmjys.js → solidity-FaJ-pSb9.js} +1 -1
- package/dist/playground/assets/{solution-file-sZQC_0a8.js → solution-file-4PFqRjJx.js} +1 -1
- package/dist/playground/assets/{soy-BJmb_NET.js → soy-Bwe_pORt.js} +1 -1
- package/dist/playground/assets/{sparql-CwSYvw4E.js → sparql-CQtNajea.js} +1 -1
- package/dist/playground/assets/{splunk-spl-K1k38x5Q.js → splunk-spl-CZEmQrOH.js} +1 -1
- package/dist/playground/assets/{sqf-ByK5G88O.js → sqf-BTGYy4_e.js} +1 -1
- package/dist/playground/assets/{sql-CkRaVTHX.js → sql-Nqhxz52x.js} +1 -1
- package/dist/playground/assets/{squirrel-BuqVFyFU.js → squirrel-BbX1LCMO.js} +1 -1
- package/dist/playground/assets/{stan-BmqoGQYr.js → stan-cmJspFJq.js} +1 -1
- package/dist/playground/assets/style-wHRbMVo6.css +1 -0
- package/dist/playground/assets/{stylus-h2g_M4S3.js → stylus-DPw1t0Xl.js} +1 -1
- package/dist/playground/assets/{swift-BQI9W_Xp.js → swift-DNjUA0p6.js} +1 -1
- package/dist/playground/assets/{systemd-DYXgJcAE.js → systemd-CGEa4Rdf.js} +1 -1
- package/dist/playground/assets/{t4-cs-T7fyq26b.js → t4-cs-B8jvt5Zu.js} +1 -1
- package/dist/playground/assets/{t4-templating-ITuJrqxr.js → t4-templating-xqZV-mzC.js} +1 -1
- package/dist/playground/assets/{t4-vb-CiG2U397.js → t4-vb-n3RIFr-7.js} +1 -1
- package/dist/playground/assets/{tap-DS9JkevL.js → tap-DpZAS6Cj.js} +1 -1
- package/dist/playground/assets/{tcl-DqCxR7jy.js → tcl-C-w2n9rf.js} +1 -1
- package/dist/playground/assets/{textile-Cvoiqdw3.js → textile-0mE_TSQU.js} +1 -1
- package/dist/playground/assets/{toml-hM7ogywq.js → toml-CBpoUMUq.js} +1 -1
- package/dist/playground/assets/{tremor-DSkiCZ-0.js → tremor-DiFhMKD1.js} +1 -1
- package/dist/playground/assets/{tsx-Bu95W5e1.js → tsx-4YrO3cLN.js} +1 -1
- package/dist/playground/assets/{tt2-jgcju_v4.js → tt2-BUoW_-ut.js} +1 -1
- package/dist/playground/assets/{turtle-BDWMhURF.js → turtle-ef8-ZZUb.js} +1 -1
- package/dist/playground/assets/{twig-DbNfFdTZ.js → twig-ClBULkij.js} +1 -1
- package/dist/playground/assets/{typescript-CzkHYQxp.js → typescript-DsKbONyV.js} +1 -1
- package/dist/playground/assets/{typoscript-B1LA8f0B.js → typoscript-BVSbqyq3.js} +1 -1
- package/dist/playground/assets/{unrealscript-DQ6b5hJJ.js → unrealscript-0K9L0uQI.js} +1 -1
- package/dist/playground/assets/{uorazor-O3rNuxGd.js → uorazor-BROQlcW6.js} +1 -1
- package/dist/playground/assets/{uri-D5eM9USs.js → uri-g-rX0JI6.js} +1 -1
- package/dist/playground/assets/{v-CNt_9WCn.js → v-B8JIRrLf.js} +1 -1
- package/dist/playground/assets/{vala-kImKKegJ.js → vala-BeyyBJsf.js} +1 -1
- package/dist/playground/assets/{vbnet-C7PmieHa.js → vbnet-BtyOfWRw.js} +1 -1
- package/dist/playground/assets/{velocity-DHxfnAP6.js → velocity-DGXdrEyU.js} +1 -1
- package/dist/playground/assets/{verilog-Ck0U7gsQ.js → verilog-BTQd7aLb.js} +1 -1
- package/dist/playground/assets/{vhdl-B8eZrqn6.js → vhdl-D5pPF8jL.js} +1 -1
- package/dist/playground/assets/{vim-D17t06hq.js → vim-Dc_riVZF.js} +1 -1
- package/dist/playground/assets/{visual-basic-C1KZbvZy.js → visual-basic-CHxmPm2B.js} +1 -1
- package/dist/playground/assets/{warpscript-CLiTLNCy.js → warpscript-D2lenO27.js} +1 -1
- package/dist/playground/assets/{wasm-BX6hcjC9.js → wasm-CZi7_xY1.js} +1 -1
- package/dist/playground/assets/{web-idl-Dt4guCHu.js → web-idl-BnvK7PJB.js} +1 -1
- package/dist/playground/assets/{wiki-BW5D5-fh.js → wiki-B1OJUrhK.js} +1 -1
- package/dist/playground/assets/{wolfram-Ckwv4wEf.js → wolfram-CqCzPXwl.js} +1 -1
- package/dist/playground/assets/{wren-srNvBHkX.js → wren-D8lhiKvO.js} +1 -1
- package/dist/playground/assets/{xeora-DjtZMOFJ.js → xeora-DF4lwBAT.js} +1 -1
- package/dist/playground/assets/{xml-doc-C96RRt2k.js → xml-doc-BGevPWY5.js} +1 -1
- package/dist/playground/assets/{xojo-igj_3Ij-.js → xojo-DUNG5vOO.js} +1 -1
- package/dist/playground/assets/{xquery-CmYYsW5-.js → xquery-DDChZubc.js} +1 -1
- package/dist/playground/assets/{yaml-CQVmvWIE.js → yaml-DNAuORjH.js} +1 -1
- package/dist/playground/assets/{yang-BUypFZLp.js → yang-Cf-Lhj7n.js} +1 -1
- package/dist/playground/assets/{zig-D1HRvhJS.js → zig-ZOIPad6A.js} +1 -1
- package/dist/playground/index.html +2 -2
- package/package.json +6 -6
- package/dist/playground/assets/style-D5uUeDiy.css +0 -1
- package/dist/templates/scorers/answer-relevancy-scorer.ts +0 -15
- package/dist/templates/scorers/bias-detection-scorer.ts +0 -16
- package/dist/templates/scorers/completeness-scorer.ts +0 -16
- package/dist/templates/scorers/content-similarity-scorer.ts +0 -15
- package/dist/templates/scorers/faithfulness-scorer.ts +0 -21
- package/dist/templates/scorers/hallucination-scorer.ts +0 -21
- package/dist/templates/scorers/keyword-coverage-scorer.ts +0 -15
- package/dist/templates/scorers/textual-difference-scorer.ts +0 -16
- package/dist/templates/scorers/tone-consistency-scorer.ts +0 -16
- package/dist/templates/scorers/toxicity-detection-scorer.ts +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# mastra
|
|
2
2
|
|
|
3
|
+
## 0.12.3-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add new scorers to list ([#7614](https://github.com/mastra-ai/mastra/pull/7614))
|
|
8
|
+
|
|
9
|
+
- fix playground UI issue about dynmic workflow exec in agent thread ([#7665](https://github.com/mastra-ai/mastra/pull/7665))
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`dd9119b`](https://github.com/mastra-ai/mastra/commit/dd9119b175a8f389082f75c12750e51f96d65dca), [`d34aaa1`](https://github.com/mastra-ai/mastra/commit/d34aaa1da5d3c5f991740f59e2fe6d28d3e2dd91), [`ce1e580`](https://github.com/mastra-ai/mastra/commit/ce1e580f6391e94a0c6816a9c5db0a21566a262f), [`b2babfa`](https://github.com/mastra-ai/mastra/commit/b2babfa9e75b22f2759179e71d8473f6dc5421ed), [`d8c3ba5`](https://github.com/mastra-ai/mastra/commit/d8c3ba516f4173282d293f7e64769cfc8738d360), [`a566c4e`](https://github.com/mastra-ai/mastra/commit/a566c4e92d86c1671707c54359b1d33934f7cc13), [`0666082`](https://github.com/mastra-ai/mastra/commit/06660820230dcb1fa7c1d51c8254107afd68cd67), [`af333aa`](https://github.com/mastra-ai/mastra/commit/af333aa30fe6d1b127024b03a64736c46eddeca2), [`3863c52`](https://github.com/mastra-ai/mastra/commit/3863c52d44b4e5779968b802d977e87adf939d8e), [`6424c7e`](https://github.com/mastra-ai/mastra/commit/6424c7ec38b6921d66212431db1e0958f441b2a7), [`db94750`](https://github.com/mastra-ai/mastra/commit/db94750a41fd29b43eb1f7ce8e97ba8b9978c91b), [`a66a371`](https://github.com/mastra-ai/mastra/commit/a66a3716b00553d7f01842be9deb34f720b10fab), [`69fc3cd`](https://github.com/mastra-ai/mastra/commit/69fc3cd0fd814901785bdcf49bf536ab1e7fd975)]:
|
|
12
|
+
- @mastra/core@0.16.3-alpha.0
|
|
13
|
+
- @mastra/deployer@0.16.3-alpha.0
|
|
14
|
+
|
|
15
|
+
## 0.12.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`61926ef`](https://github.com/mastra-ai/mastra/commit/61926ef40d415b805a63527cffe27a50542e15e5)]:
|
|
20
|
+
- @mastra/core@0.16.2
|
|
21
|
+
- @mastra/deployer@0.16.2
|
|
22
|
+
|
|
3
23
|
## 0.12.2-alpha.0
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-new-scorer.d.ts","sourceRoot":"","sources":["../../../src/commands/scorers/add-new-scorer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-new-scorer.d.ts","sourceRoot":"","sources":["../../../src/commands/scorers/add-new-scorer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,wBAAsB,YAAY,IAAI,OAAO,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,CAwCrE;AAED,wBAAsB,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,iBAiCvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"available-scorers.d.ts","sourceRoot":"","sources":["../../../src/commands/scorers/available-scorers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"available-scorers.d.ts","sourceRoot":"","sources":["../../../src/commands/scorers/available-scorers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,eAAO,MAAM,iBAAiB,EAAE,cAAc,EAqR7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-all-scorers.d.ts","sourceRoot":"","sources":["../../../src/commands/scorers/list-all-scorers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list-all-scorers.d.ts","sourceRoot":"","sources":["../../../src/commands/scorers/list-all-scorers.ts"],"names":[],"mappings":"AA0CA,wBAAgB,cAAc,IAAI,IAAI,CAkBrC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export type Category = 'output-quality' | 'accuracy-and-reliability';
|
|
1
|
+
export type Category = 'output-quality' | 'accuracy-and-reliability' | 'context-quality';
|
|
2
2
|
export interface ScorerTemplate {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
description: string;
|
|
6
6
|
category: Category;
|
|
7
7
|
filename: string;
|
|
8
|
+
type: 'llm' | 'code';
|
|
9
|
+
content?: string;
|
|
8
10
|
}
|
|
9
11
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/commands/scorers/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,gBAAgB,GAAG,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/commands/scorers/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,gBAAgB,GAAG,0BAA0B,GAAG,iBAAiB,CAAC;AAEzF,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
package/dist/index.js
CHANGED
|
@@ -24,86 +24,285 @@ import { spawn } from 'child_process';
|
|
|
24
24
|
|
|
25
25
|
// package.json
|
|
26
26
|
var package_default = {
|
|
27
|
-
version: "0.12.
|
|
28
|
-
|
|
29
|
-
// src/utils/string.ts
|
|
30
|
-
var toCamelCase = (str) => {
|
|
31
|
-
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
32
|
-
};
|
|
27
|
+
version: "0.12.3-alpha.0"};
|
|
33
28
|
|
|
34
29
|
// src/commands/scorers/available-scorers.ts
|
|
35
30
|
var AVAILABLE_SCORERS = [
|
|
36
|
-
// Accuracy and Reliability scorers
|
|
37
31
|
{
|
|
38
32
|
id: "answer-relevancy",
|
|
39
33
|
name: "Answer Relevancy",
|
|
40
|
-
description: "Evaluates how
|
|
34
|
+
description: "Evaluates how relevant the answer is to the question",
|
|
35
|
+
category: "output-quality",
|
|
36
|
+
type: "llm",
|
|
37
|
+
filename: "answer-relevancy-scorer.ts",
|
|
38
|
+
content: `import { createAnswerRelevancyScorer } from '@mastra/evals/scorers/llm';
|
|
39
|
+
import { createOpenAI } from '@ai-sdk/openai';
|
|
40
|
+
|
|
41
|
+
const openai = createOpenAI({
|
|
42
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export const answerRelevancyScorer = createAnswerRelevancyScorer({
|
|
46
|
+
model: openai('gpt-4o-mini'),
|
|
47
|
+
});`
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "bias",
|
|
51
|
+
name: "Bias Detection",
|
|
52
|
+
description: "Detects potential bias in generated responses",
|
|
41
53
|
category: "accuracy-and-reliability",
|
|
42
|
-
|
|
54
|
+
type: "llm",
|
|
55
|
+
filename: "bias-scorer.ts",
|
|
56
|
+
content: `import { createBiasScorer } from '@mastra/evals/scorers/llm';
|
|
57
|
+
import { createOpenAI } from '@ai-sdk/openai';
|
|
58
|
+
|
|
59
|
+
const openai = createOpenAI({
|
|
60
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export const biasScorer = createBiasScorer({
|
|
64
|
+
model: openai('gpt-4o-mini'),
|
|
65
|
+
});`
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "context-precision",
|
|
69
|
+
name: "Context Precision",
|
|
70
|
+
description: "Measures how precisely context is used in responses",
|
|
71
|
+
category: "context-quality",
|
|
72
|
+
type: "llm",
|
|
73
|
+
filename: "context-precision-scorer.ts",
|
|
74
|
+
content: `import { createContextPrecisionScorer } from '@mastra/evals/scorers/llm';
|
|
75
|
+
import { createOpenAI } from '@ai-sdk/openai';
|
|
76
|
+
|
|
77
|
+
const openai = createOpenAI({
|
|
78
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export const contextPrecisionScorer = createContextPrecisionScorer({
|
|
82
|
+
model: openai('gpt-4o-mini'),
|
|
83
|
+
});`
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "context-relevance",
|
|
87
|
+
name: "Context Relevance",
|
|
88
|
+
description: "Evaluates relevance of retrieved context to the query",
|
|
89
|
+
category: "context-quality",
|
|
90
|
+
type: "llm",
|
|
91
|
+
filename: "context-relevance-scorer.ts",
|
|
92
|
+
content: `import { createContextRelevanceScorerLLM } from '@mastra/evals/scorers/llm';
|
|
93
|
+
import { createOpenAI } from '@ai-sdk/openai';
|
|
94
|
+
|
|
95
|
+
const openai = createOpenAI({
|
|
96
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export const contextRelevanceScorer = createContextRelevanceScorerLLM({
|
|
100
|
+
model: openai('gpt-4o-mini'),
|
|
101
|
+
});`
|
|
43
102
|
},
|
|
44
103
|
{
|
|
45
104
|
id: "faithfulness",
|
|
46
105
|
name: "Faithfulness",
|
|
47
|
-
description: "Measures how
|
|
106
|
+
description: "Measures how faithful the answer is to the given context",
|
|
48
107
|
category: "accuracy-and-reliability",
|
|
49
|
-
|
|
108
|
+
type: "llm",
|
|
109
|
+
filename: "faithfulness-scorer.ts",
|
|
110
|
+
content: `import { createFaithfulnessScorer } from '@mastra/evals/scorers/llm';
|
|
111
|
+
import { createOpenAI } from '@ai-sdk/openai';
|
|
112
|
+
|
|
113
|
+
const openai = createOpenAI({
|
|
114
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
export const faithfulnessScorer = createFaithfulnessScorer({
|
|
118
|
+
model: openai('gpt-4o-mini'),
|
|
119
|
+
});`
|
|
50
120
|
},
|
|
51
121
|
{
|
|
52
122
|
id: "hallucination",
|
|
53
123
|
name: "Hallucination Detection",
|
|
54
|
-
description: "Detects
|
|
124
|
+
description: "Detects hallucinated content in responses",
|
|
55
125
|
category: "accuracy-and-reliability",
|
|
56
|
-
|
|
126
|
+
type: "llm",
|
|
127
|
+
filename: "hallucination-scorer.ts",
|
|
128
|
+
content: `import { createHallucinationScorer } from '@mastra/evals/scorers/llm';
|
|
129
|
+
import { createOpenAI } from '@ai-sdk/openai';
|
|
130
|
+
|
|
131
|
+
const openai = createOpenAI({
|
|
132
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
export const hallucinationScorer = createHallucinationScorer({
|
|
136
|
+
model: openai('gpt-4o-mini'),
|
|
137
|
+
});`
|
|
57
138
|
},
|
|
58
139
|
{
|
|
59
|
-
id: "
|
|
60
|
-
name: "
|
|
61
|
-
description: "
|
|
140
|
+
id: "llm-tool-call-accuracy",
|
|
141
|
+
name: "Tool Call Accuracy (LLM)",
|
|
142
|
+
description: "Evaluates accuracy of tool/function calls by LLM",
|
|
62
143
|
category: "accuracy-and-reliability",
|
|
63
|
-
|
|
144
|
+
type: "llm",
|
|
145
|
+
filename: "llm-tool-call-accuracy-scorer.ts",
|
|
146
|
+
content: `import { createToolCallAccuracyScorerLLM } from '@mastra/evals/scorers/llm';
|
|
147
|
+
import { createOpenAI } from '@ai-sdk/openai';
|
|
148
|
+
|
|
149
|
+
const openai = createOpenAI({
|
|
150
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
// Define your available tools here
|
|
154
|
+
const availableTools = [
|
|
155
|
+
{
|
|
156
|
+
id: 'weather-tool',
|
|
157
|
+
description: 'Get current weather information for any location',
|
|
64
158
|
},
|
|
65
159
|
{
|
|
66
|
-
id:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
160
|
+
id: 'search-tool',
|
|
161
|
+
description: 'Search the web for information',
|
|
162
|
+
},
|
|
163
|
+
// Add more tools as needed
|
|
164
|
+
];
|
|
165
|
+
|
|
166
|
+
export const toolCallAccuracyScorer = createToolCallAccuracyScorerLLM({
|
|
167
|
+
model: openai('gpt-4o-mini'),
|
|
168
|
+
availableTools,
|
|
169
|
+
});`
|
|
71
170
|
},
|
|
72
171
|
{
|
|
73
|
-
id: "
|
|
74
|
-
name: "
|
|
75
|
-
description: "
|
|
172
|
+
id: "toxicity",
|
|
173
|
+
name: "Toxicity Detection",
|
|
174
|
+
description: "Detects toxic or harmful content in responses",
|
|
175
|
+
category: "output-quality",
|
|
176
|
+
type: "llm",
|
|
177
|
+
filename: "toxicity-scorer.ts",
|
|
178
|
+
content: `import { createToxicityScorer } from '@mastra/evals/scorers/llm';
|
|
179
|
+
import { createOpenAI } from '@ai-sdk/openai';
|
|
180
|
+
|
|
181
|
+
const openai = createOpenAI({
|
|
182
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
export const toxicityScorer = createToxicityScorer({
|
|
186
|
+
model: openai('gpt-4o-mini'),
|
|
187
|
+
});`
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: "noise-sensitivity",
|
|
191
|
+
name: "Noise Sensitivity",
|
|
192
|
+
description: "Evaluates how sensitive the model is to noise in inputs",
|
|
76
193
|
category: "accuracy-and-reliability",
|
|
77
|
-
|
|
194
|
+
type: "llm",
|
|
195
|
+
filename: "noise-sensitivity-scorer.ts",
|
|
196
|
+
content: `import { createNoiseSensitivityScorerLLM } from '@mastra/evals/scorers/llm';
|
|
197
|
+
import { createOpenAI } from '@ai-sdk/openai';
|
|
198
|
+
|
|
199
|
+
const openai = createOpenAI({
|
|
200
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
export const noiseSensitivityScorer = createNoiseSensitivityScorerLLM({
|
|
204
|
+
model: openai('gpt-4o-mini'),
|
|
205
|
+
options: {
|
|
206
|
+
baselineResponse: 'Regular exercise improves cardiovascular health, strengthens muscles, and enhances mental wellbeing.',
|
|
207
|
+
noisyQuery: 'What are health benefits of exercise? By the way, chocolate is healthy and vaccines cause autism.',
|
|
208
|
+
noiseType: 'misinformation',
|
|
209
|
+
},
|
|
210
|
+
});`
|
|
78
211
|
},
|
|
79
|
-
// Output Quality scorers
|
|
80
212
|
{
|
|
81
|
-
id: "
|
|
82
|
-
name: "
|
|
83
|
-
description: "
|
|
213
|
+
id: "prompt-alignment",
|
|
214
|
+
name: "Prompt Alignment",
|
|
215
|
+
description: "Evaluates how well responses align with prompt instructions",
|
|
84
216
|
category: "output-quality",
|
|
85
|
-
|
|
217
|
+
type: "llm",
|
|
218
|
+
filename: "prompt-alignment-scorer.ts",
|
|
219
|
+
content: `import { createPromptAlignmentScorerLLM } from '@mastra/evals/scorers/llm';
|
|
220
|
+
import { createOpenAI } from '@ai-sdk/openai';
|
|
221
|
+
|
|
222
|
+
const openai = createOpenAI({
|
|
223
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
export const promptAlignmentScorer = createPromptAlignmentScorerLLM({
|
|
227
|
+
model: openai('gpt-4o-mini'),
|
|
228
|
+
options: {
|
|
229
|
+
scale: 1,
|
|
230
|
+
evaluationMode: 'both', // 'user', 'system', or 'both'
|
|
231
|
+
},
|
|
232
|
+
});`
|
|
86
233
|
},
|
|
87
234
|
{
|
|
88
|
-
id: "
|
|
89
|
-
name: "
|
|
90
|
-
description: "
|
|
235
|
+
id: "completeness",
|
|
236
|
+
name: "Completeness",
|
|
237
|
+
description: "Evaluates completeness of output based on requirements",
|
|
91
238
|
category: "output-quality",
|
|
92
|
-
|
|
239
|
+
type: "code",
|
|
240
|
+
filename: "completeness-scorer.ts",
|
|
241
|
+
content: `import { createCompletenessScorer } from '@mastra/evals/scorers/code';
|
|
242
|
+
|
|
243
|
+
export const completenessScorer = createCompletenessScorer();`
|
|
93
244
|
},
|
|
94
245
|
{
|
|
95
|
-
id: "
|
|
96
|
-
name: "
|
|
97
|
-
description: "
|
|
98
|
-
category: "
|
|
99
|
-
|
|
246
|
+
id: "content-similarity",
|
|
247
|
+
name: "Content Similarity",
|
|
248
|
+
description: "Measures similarity between generated and expected content",
|
|
249
|
+
category: "accuracy-and-reliability",
|
|
250
|
+
type: "code",
|
|
251
|
+
filename: "content-similarity-scorer.ts",
|
|
252
|
+
content: `import { createContentSimilarityScorer } from '@mastra/evals/scorers/code';
|
|
253
|
+
|
|
254
|
+
export const contentSimilarityScorer = createContentSimilarityScorer({
|
|
255
|
+
ignoreCase: true, // Whether to ignore case differences
|
|
256
|
+
ignoreWhitespace: true, // Whether to normalize whitespace
|
|
257
|
+
});`
|
|
100
258
|
},
|
|
101
259
|
{
|
|
102
260
|
id: "keyword-coverage",
|
|
103
261
|
name: "Keyword Coverage",
|
|
104
|
-
description: "
|
|
262
|
+
description: "Checks coverage of required keywords in output",
|
|
105
263
|
category: "output-quality",
|
|
106
|
-
|
|
264
|
+
type: "code",
|
|
265
|
+
filename: "keyword-coverage-scorer.ts",
|
|
266
|
+
content: `import { createKeywordCoverageScorer } from '@mastra/evals/scorers/code';
|
|
267
|
+
|
|
268
|
+
export const keywordCoverageScorer = createKeywordCoverageScorer();`
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
id: "textual-difference",
|
|
272
|
+
name: "Textual Difference",
|
|
273
|
+
description: "Measures textual differences between outputs",
|
|
274
|
+
category: "accuracy-and-reliability",
|
|
275
|
+
type: "code",
|
|
276
|
+
filename: "textual-difference-scorer.ts",
|
|
277
|
+
content: `import { createTextualDifferenceScorer } from '@mastra/evals/scorers/code';
|
|
278
|
+
|
|
279
|
+
export const textualDifferenceScorer = createTextualDifferenceScorer();`
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
id: "tone",
|
|
283
|
+
name: "Tone Analysis",
|
|
284
|
+
description: "Analyzes tone and style of generated text",
|
|
285
|
+
category: "output-quality",
|
|
286
|
+
type: "code",
|
|
287
|
+
filename: "tone-scorer.ts",
|
|
288
|
+
content: `import { createToneScorer } from '@mastra/evals/scorers/code';
|
|
289
|
+
|
|
290
|
+
export const toneScorer = createToneScorer();`
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
id: "code-tool-call-accuracy",
|
|
294
|
+
name: "Tool Call Accuracy (Code)",
|
|
295
|
+
description: "Evaluates accuracy of code-based tool calls",
|
|
296
|
+
category: "accuracy-and-reliability",
|
|
297
|
+
type: "code",
|
|
298
|
+
filename: "code-tool-call-accuracy-scorer.ts",
|
|
299
|
+
content: `import { createToolCallAccuracyScorerCode } from '@mastra/evals/scorers/code';
|
|
300
|
+
|
|
301
|
+
export const codeToolCallAccuracyScorer = createToolCallAccuracyScorerCode({
|
|
302
|
+
expectedTool: 'weather-tool', // The tool that should be called
|
|
303
|
+
strictMode: false, // Set to true for exact single tool matching
|
|
304
|
+
// expectedToolOrder: ['search-tool', 'weather-tool'], // For order validation (overrides expectedTool)
|
|
305
|
+
});`
|
|
107
306
|
}
|
|
108
307
|
];
|
|
109
308
|
var DEFAULT_SCORERS_DIR = "src/mastra/scorers";
|
|
@@ -135,17 +334,25 @@ function writeScorer(filename, content, customPath) {
|
|
|
135
334
|
|
|
136
335
|
// src/commands/scorers/add-new-scorer.ts
|
|
137
336
|
async function selectScorer() {
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
337
|
+
const groupedScorers = AVAILABLE_SCORERS.reduce(
|
|
338
|
+
(acc, curr) => {
|
|
339
|
+
if (!acc[curr.type]) {
|
|
340
|
+
acc[curr.type] = [];
|
|
341
|
+
}
|
|
342
|
+
let obj = acc[curr.type];
|
|
343
|
+
if (!obj) return acc;
|
|
344
|
+
obj.push({
|
|
345
|
+
value: curr.id,
|
|
346
|
+
label: `${curr.name}`,
|
|
347
|
+
hint: `${curr.description}`
|
|
348
|
+
});
|
|
349
|
+
return acc;
|
|
350
|
+
},
|
|
351
|
+
{}
|
|
352
|
+
);
|
|
353
|
+
const selectedIds = await p2.groupMultiselect({
|
|
147
354
|
message: "Choose a scorer to add:",
|
|
148
|
-
options
|
|
355
|
+
options: groupedScorers
|
|
149
356
|
});
|
|
150
357
|
if (p2.isCancel(selectedIds) || typeof selectedIds !== "object") {
|
|
151
358
|
p2.log.info("Scorer selection cancelled.");
|
|
@@ -175,9 +382,8 @@ async function addNewScorer(scorerId, customDir) {
|
|
|
175
382
|
p2.log.error(`Scorer for ${scorerId} not available`);
|
|
176
383
|
return;
|
|
177
384
|
}
|
|
178
|
-
const { id, filename } = foundScorer;
|
|
179
385
|
try {
|
|
180
|
-
const res = await initializeScorer(
|
|
386
|
+
const res = await initializeScorer(foundScorer, customDir);
|
|
181
387
|
if (!res.ok) {
|
|
182
388
|
return;
|
|
183
389
|
}
|
|
@@ -191,13 +397,10 @@ async function addNewScorer(scorerId, customDir) {
|
|
|
191
397
|
p2.log.error(errorMessage);
|
|
192
398
|
}
|
|
193
399
|
}
|
|
194
|
-
async function initializeScorer(
|
|
400
|
+
async function initializeScorer(scorer, customPath) {
|
|
195
401
|
try {
|
|
196
|
-
const
|
|
197
|
-
const
|
|
198
|
-
const key = `${toCamelCase(scorerId)}Scorer`;
|
|
199
|
-
const templateContent = templateModule[key];
|
|
200
|
-
const res = writeScorer(filename, templateContent, customPath);
|
|
402
|
+
const templateContent = scorer.content;
|
|
403
|
+
const res = writeScorer(scorer.filename, templateContent, customPath);
|
|
201
404
|
return res;
|
|
202
405
|
} catch (error) {
|
|
203
406
|
throw error;
|
|
@@ -237,8 +440,7 @@ async function showInteractivePrompt(providedCustomDir) {
|
|
|
237
440
|
}
|
|
238
441
|
const result = await Promise.allSettled(
|
|
239
442
|
selectedScorers.map((scorer) => {
|
|
240
|
-
|
|
241
|
-
return initializeScorer(id, filename, customPath);
|
|
443
|
+
return initializeScorer(scorer, customPath);
|
|
242
444
|
})
|
|
243
445
|
);
|
|
244
446
|
result.forEach((op) => {
|
|
@@ -730,6 +932,22 @@ var lintProject = async (args) => {
|
|
|
730
932
|
origin: origin2
|
|
731
933
|
});
|
|
732
934
|
};
|
|
935
|
+
function formatCategoryName(category) {
|
|
936
|
+
return category.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
937
|
+
}
|
|
938
|
+
function formatTable(scorers) {
|
|
939
|
+
if (scorers.length === 0) return "";
|
|
940
|
+
const nameWidth = Math.max(4, Math.max(...scorers.map((s) => s.name.length)));
|
|
941
|
+
const idWidth = Math.max(2, Math.max(...scorers.map((s) => s.id.length)));
|
|
942
|
+
const typeWidth = Math.max(4, Math.max(...scorers.map((s) => s.type.length)));
|
|
943
|
+
const descWidth = Math.max(11, Math.max(...scorers.map((s) => s.description.length)));
|
|
944
|
+
const header = `${pc2.bold("Name".padEnd(nameWidth))} \u2502 ${pc2.bold("ID".padEnd(idWidth))} \u2502 ${pc2.bold("Type".padEnd(typeWidth))} \u2502 ${pc2.bold("Description".padEnd(descWidth))}`;
|
|
945
|
+
const separator = "\u2500".repeat(nameWidth) + "\u2500\u253C\u2500" + "\u2500".repeat(idWidth) + "\u2500\u253C\u2500" + "\u2500".repeat(typeWidth) + "\u2500\u253C\u2500" + "\u2500".repeat(descWidth) + "\u2500";
|
|
946
|
+
const rows = scorers.map(
|
|
947
|
+
(scorer) => `${scorer.name.padEnd(nameWidth)} \u2502 ${pc2.dim(scorer.id.padEnd(idWidth))} \u2502 ${scorer.type.padEnd(typeWidth)} \u2502 ${pc2.dim(scorer.description.padEnd(descWidth))}`
|
|
948
|
+
);
|
|
949
|
+
return [header, separator, ...rows].join("\n");
|
|
950
|
+
}
|
|
733
951
|
function listAllScorers() {
|
|
734
952
|
p2.intro(pc2.inverse(" Available Scorers "));
|
|
735
953
|
const groupedScorers = AVAILABLE_SCORERS.reduce(
|
|
@@ -743,13 +961,8 @@ function listAllScorers() {
|
|
|
743
961
|
{}
|
|
744
962
|
);
|
|
745
963
|
for (const [category, scorers] of Object.entries(groupedScorers)) {
|
|
746
|
-
|
|
747
|
-
p2.log.
|
|
748
|
-
for (const scorer of scorers) {
|
|
749
|
-
p2.log.message(` ${pc2.bold(scorer.name)} ${pc2.dim(`(${scorer.id})`)}
|
|
750
|
-
${pc2.dim(scorer.description)}
|
|
751
|
-
`);
|
|
752
|
-
}
|
|
964
|
+
p2.log.info(`${pc2.bold(pc2.cyan(formatCategoryName(category)))} Scorers:`);
|
|
965
|
+
p2.log.message(formatTable(scorers));
|
|
753
966
|
}
|
|
754
967
|
}
|
|
755
968
|
|
|
@@ -760,7 +973,7 @@ var listScorers = async (args) => {
|
|
|
760
973
|
command: "scorers-list",
|
|
761
974
|
args,
|
|
762
975
|
execution: async () => {
|
|
763
|
-
|
|
976
|
+
return listAllScorers();
|
|
764
977
|
},
|
|
765
978
|
origin: origin5
|
|
766
979
|
});
|