mastra 0.12.2 → 0.12.3-alpha.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.
- package/CHANGELOG.md +22 -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-D_ebjhKZ.js} +1 -1
- package/dist/playground/assets/{abnf-CT_OLOZP.js → abnf-zvvru_oq.js} +1 -1
- package/dist/playground/assets/{actionscript-DN9RUMK5.js → actionscript-B_6ewhse.js} +1 -1
- package/dist/playground/assets/{ada-Biuy7x3i.js → ada-u4-_k5dl.js} +1 -1
- package/dist/playground/assets/{agda-DfFfMNt0.js → agda-Dn6lCKpb.js} +1 -1
- package/dist/playground/assets/{al-zCto3YJI.js → al-NDHDsyUt.js} +1 -1
- package/dist/playground/assets/{antlr4-M67dKbjZ.js → antlr4-hZ1-0RIH.js} +1 -1
- package/dist/playground/assets/{apacheconf-D1U3kklQ.js → apacheconf-CfrCmyLf.js} +1 -1
- package/dist/playground/assets/{apex-Bk5xZIFD.js → apex-B9SAU2x_.js} +1 -1
- package/dist/playground/assets/{apl-DUawB_8Q.js → apl-MMz14-Nn.js} +1 -1
- package/dist/playground/assets/{applescript-CZ-T8OB0.js → applescript-DsV1ISvE.js} +1 -1
- package/dist/playground/assets/{aql-CsXiTr64.js → aql-PAXdM9ms.js} +1 -1
- package/dist/playground/assets/{arduino-Dr3dZkwk.js → arduino-Ci9aGPIG.js} +1 -1
- package/dist/playground/assets/{arff-DXQSmi6V.js → arff-BRAUPlkW.js} +1 -1
- package/dist/playground/assets/{asciidoc-ul4i5duM.js → asciidoc-DA6xyM9b.js} +1 -1
- package/dist/playground/assets/{asm6502-DQD9Mik2.js → asm6502-Cd3HG1LG.js} +1 -1
- package/dist/playground/assets/{asmatmel-jwjUnU3p.js → asmatmel-DBCRsMYw.js} +1 -1
- package/dist/playground/assets/{aspnet-BQWud54o.js → aspnet-0aJAxL7s.js} +1 -1
- package/dist/playground/assets/{autohotkey-B7S7ut6y.js → autohotkey-dtn_J-rS.js} +1 -1
- package/dist/playground/assets/{autoit-DiyNQbqf.js → autoit-DVYTCvTB.js} +1 -1
- package/dist/playground/assets/{avisynth-B0wmA1IC.js → avisynth-9iRIL2cj.js} +1 -1
- package/dist/playground/assets/{avro-idl-C0egJq_2.js → avro-idl-CBz_Mfsy.js} +1 -1
- package/dist/playground/assets/{bash-BNv6AlfM.js → bash-DoUgrCmH.js} +1 -1
- package/dist/playground/assets/{basic-C69l7UTm.js → basic-CoMiPkJA.js} +1 -1
- package/dist/playground/assets/{batch-DoRVPqXt.js → batch-DhXPuHuF.js} +1 -1
- package/dist/playground/assets/{bbcode-C-_SrnwH.js → bbcode-B9t0EcE3.js} +1 -1
- package/dist/playground/assets/{bicep-BViWBNV5.js → bicep-BBsJ7Cg0.js} +1 -1
- package/dist/playground/assets/{birb-BxgUR_Mq.js → birb-CNrtB8hP.js} +1 -1
- package/dist/playground/assets/{bison-BcpkGs-r.js → bison-1tDbU3PP.js} +1 -1
- package/dist/playground/assets/{bnf-DYgj7Dy1.js → bnf-pR3W2BRW.js} +1 -1
- package/dist/playground/assets/{brainfuck-DnpeCsAw.js → brainfuck-Ndu4D5GT.js} +1 -1
- package/dist/playground/assets/{brightscript-BI_T2NbD.js → brightscript-BEr0LCGW.js} +1 -1
- package/dist/playground/assets/{bro-BpzgF-nP.js → bro-pdLeT5hD.js} +1 -1
- package/dist/playground/assets/{bsl-J33gFVON.js → bsl-C3-56Bht.js} +1 -1
- package/dist/playground/assets/{c-nDAyIGfY.js → c-0LmSD2Dl.js} +1 -1
- package/dist/playground/assets/{cfscript-8VdTPB9w.js → cfscript-BRezRFMn.js} +1 -1
- package/dist/playground/assets/{chaiscript-C8XsMc0u.js → chaiscript-CR8kyiUY.js} +1 -1
- package/dist/playground/assets/{cil-CeHt2Zg7.js → cil-BmGWOILQ.js} +1 -1
- package/dist/playground/assets/{clike-LpzTpPc2.js → clike-ewkJ8Haw.js} +1 -1
- package/dist/playground/assets/{clojure-D1M6bR62.js → clojure-Bbz1GRI8.js} +1 -1
- package/dist/playground/assets/{cmake-BfsF3Y_Z.js → cmake-BC5msjDR.js} +1 -1
- package/dist/playground/assets/{cobol-BsZSv4U4.js → cobol-BXcygHVC.js} +1 -1
- package/dist/playground/assets/{coffeescript-CcdXk9NC.js → coffeescript-DeeV7rmh.js} +1 -1
- package/dist/playground/assets/{concurnas-CMnaY3eN.js → concurnas-WNsXVA7R.js} +1 -1
- package/dist/playground/assets/{coq-B5Xg6-Pm.js → coq-Dbx-pFZW.js} +1 -1
- package/dist/playground/assets/{core-D5uEjaBy.js → core-Dik-NcJH.js} +1 -1
- package/dist/playground/assets/{cpp-DGLGLrev.js → cpp-B90P78rw.js} +1 -1
- package/dist/playground/assets/{crystal-DMtvHdHw.js → crystal-Brcwjzh6.js} +1 -1
- package/dist/playground/assets/{csharp-CZAWh8CQ.js → csharp-D8zHUn3y.js} +1 -1
- package/dist/playground/assets/{cshtml-BdYHsT5p.js → cshtml-1Zbfzz85.js} +1 -1
- package/dist/playground/assets/{csp-DcWYDhz9.js → csp-R6DtlISv.js} +1 -1
- package/dist/playground/assets/{css-DJu150Kw.js → css-Cud3hIWI.js} +1 -1
- package/dist/playground/assets/{css-extras-B8YXBcY9.js → css-extras-C_nnsGE6.js} +1 -1
- package/dist/playground/assets/{csv-C9J-07wx.js → csv-WokrR-EC.js} +1 -1
- package/dist/playground/assets/{cypher-CDWLoXaz.js → cypher-B_1MBHOA.js} +1 -1
- package/dist/playground/assets/{d-R2Z4CifN.js → d-CrS_VNjb.js} +1 -1
- package/dist/playground/assets/{dart-Czsh6ZpI.js → dart-CWol3iji.js} +1 -1
- package/dist/playground/assets/{dataweave-DT5UcTMs.js → dataweave-CucgELbh.js} +1 -1
- package/dist/playground/assets/{dax-DxxKoVZU.js → dax-C5frpQDI.js} +1 -1
- package/dist/playground/assets/{dhall-ciaKv1yX.js → dhall-TmtcsNpz.js} +1 -1
- package/dist/playground/assets/{diff-CqB_P9g4.js → diff-DJauloEM.js} +1 -1
- package/dist/playground/assets/{django-DbzYR6TW.js → django-ffqXyTlC.js} +1 -1
- package/dist/playground/assets/{dns-zone-file-CUa7tbUe.js → dns-zone-file-Bv0KckDI.js} +1 -1
- package/dist/playground/assets/{docker-DxAvoL9A.js → docker-KexRxnBv.js} +1 -1
- package/dist/playground/assets/{dot-C8KeUxhI.js → dot-tmy2WVog.js} +1 -1
- package/dist/playground/assets/{ebnf-DuQ7HPdj.js → ebnf-aavnC3ni.js} +1 -1
- package/dist/playground/assets/{editorconfig-BKm2frrT.js → editorconfig-ykBx_e01.js} +1 -1
- package/dist/playground/assets/{eiffel-tjrmNw_8.js → eiffel-C3kjKqc_.js} +1 -1
- package/dist/playground/assets/{ejs-BM7XouDQ.js → ejs-Epz3IAj8.js} +1 -1
- package/dist/playground/assets/{elixir-CWr0wIHi.js → elixir-tPd3E124.js} +1 -1
- package/dist/playground/assets/{elm-C74drKXc.js → elm-DCU0ten4.js} +1 -1
- package/dist/playground/assets/{erb-C91NPEKp.js → erb-B7uUn6Sp.js} +1 -1
- package/dist/playground/assets/{erlang-5GTL906j.js → erlang-5cYrYTL1.js} +1 -1
- package/dist/playground/assets/{etlua-ncW7mNRL.js → etlua-DG6LkGQV.js} +1 -1
- package/dist/playground/assets/{excel-formula-lBagEF4a.js → excel-formula-Bw6ihWqN.js} +1 -1
- package/dist/playground/assets/{factor-DBlEWrNX.js → factor-CMerJX5G.js} +1 -1
- package/dist/playground/assets/{false-Co0_JIfd.js → false-B7eP8YE3.js} +1 -1
- package/dist/playground/assets/{firestore-security-rules-DXoueLhY.js → firestore-security-rules-B0iFwm7G.js} +1 -1
- package/dist/playground/assets/{flow-D-5LXFQS.js → flow-B8iaWovm.js} +1 -1
- package/dist/playground/assets/{fortran-DKkGoP4U.js → fortran-C7P4swvn.js} +1 -1
- package/dist/playground/assets/{fsharp-BDrrLV5y.js → fsharp-wIPtDuzi.js} +1 -1
- package/dist/playground/assets/{ftl-DAQXuXA3.js → ftl-BTjceIJS.js} +1 -1
- package/dist/playground/assets/{gap-DNdZhlFB.js → gap-BN301rLz.js} +1 -1
- package/dist/playground/assets/{gcode-CiH_kUPM.js → gcode-CoicmKQi.js} +1 -1
- package/dist/playground/assets/{gdscript-U_4eRolY.js → gdscript-DOYYK2Ug.js} +1 -1
- package/dist/playground/assets/{gedcom-BBbGs1sX.js → gedcom-B5TXm7F9.js} +1 -1
- package/dist/playground/assets/{gherkin-q_ofFC0o.js → gherkin-Do_JwZp-.js} +1 -1
- package/dist/playground/assets/{git-DQWY4gVG.js → git-GHZlR1Sg.js} +1 -1
- package/dist/playground/assets/{glsl-CwJxDois.js → glsl-C4XbmDE0.js} +1 -1
- package/dist/playground/assets/{gml-DxTcaPCJ.js → gml-D9yzzdyx.js} +1 -1
- package/dist/playground/assets/{gn-ap7SKZpK.js → gn-D8WPj8Od.js} +1 -1
- package/dist/playground/assets/{go-BGqxXFpz.js → go-CCCEXCA-.js} +1 -1
- package/dist/playground/assets/{go-module-5Sn_ZeUc.js → go-module-I3eK5AmE.js} +1 -1
- package/dist/playground/assets/{graphql-CsvB3ba-.js → graphql-o2kUG0Hi.js} +1 -1
- package/dist/playground/assets/{groovy-CxE7eSfE.js → groovy-BVP1OLiU.js} +1 -1
- package/dist/playground/assets/{haml-BNeaGIVO.js → haml-BMUo0D9K.js} +1 -1
- package/dist/playground/assets/{handlebars-BbM3W4Hv.js → handlebars-CQxhETBb.js} +1 -1
- package/dist/playground/assets/{haskell-D2IL7QSA.js → haskell-PN2jxpwD.js} +1 -1
- package/dist/playground/assets/{haxe-BnwK8yWs.js → haxe-C-OtGYXl.js} +1 -1
- package/dist/playground/assets/{hcl-BiDvoWa5.js → hcl-BZ-pLUvf.js} +1 -1
- package/dist/playground/assets/{hlsl-DEZSU_zu.js → hlsl-uSh8MA6V.js} +1 -1
- package/dist/playground/assets/{hoon-DRAG3NP_.js → hoon-HQlg_hAF.js} +1 -1
- package/dist/playground/assets/{hpkp-CFshG6ti.js → hpkp-CYxJ9Ivi.js} +1 -1
- package/dist/playground/assets/{hsts-W4YbpF9S.js → hsts-CFUt8igq.js} +1 -1
- package/dist/playground/assets/{http-CI0ww0aI.js → http-Ci-ra0gv.js} +1 -1
- package/dist/playground/assets/{ichigojam-CHvYMe4o.js → ichigojam-gQuXSczt.js} +1 -1
- package/dist/playground/assets/{icon-Cd-5Eonh.js → icon-R0es4QhC.js} +1 -1
- package/dist/playground/assets/{icu-message-format-BzLTwFGL.js → icu-message-format-vVZ8XJx_.js} +1 -1
- package/dist/playground/assets/{idris-Dvqc1T4x.js → idris-DW5ygJnE.js} +1 -1
- package/dist/playground/assets/{iecst-DQQ4zM4g.js → iecst-DBfXfAkm.js} +1 -1
- package/dist/playground/assets/{ignore-DffR2OLq.js → ignore-Dkx1wW2I.js} +1 -1
- package/dist/playground/assets/{index-C6MDNmDf.js → index-BYivM1Yd.js} +285 -280
- package/dist/playground/assets/{index-BARdDNGr.js → index-DH97YLOy.js} +1 -1
- package/dist/playground/assets/{inform7-BT7kUf6f.js → inform7-DMpnkUS9.js} +1 -1
- package/dist/playground/assets/{ini-BEIpBs_5.js → ini-BUjYJX3U.js} +1 -1
- package/dist/playground/assets/{io-DhYeKGRV.js → io-DPZ-Nvn8.js} +1 -1
- package/dist/playground/assets/{j-vjEfLqyd.js → j-BGhtNGD-.js} +1 -1
- package/dist/playground/assets/{java-DgXPxJlV.js → java-C_LMAm5u.js} +1 -1
- package/dist/playground/assets/{javadoc-BFqdFVDm.js → javadoc-hljPQbLO.js} +1 -1
- package/dist/playground/assets/{javadoclike-C6it6E_n.js → javadoclike-DM-EPfFy.js} +1 -1
- package/dist/playground/assets/{javascript-DHIu_KPo.js → javascript-D9_WoAT6.js} +1 -1
- package/dist/playground/assets/{javastacktrace-BL0ZRVZr.js → javastacktrace-CaZQpCB9.js} +1 -1
- package/dist/playground/assets/{jexl-DlMRd12A.js → jexl-BLFTwKbr.js} +1 -1
- package/dist/playground/assets/{jolie-Iyl9bqBr.js → jolie-BfN2cFP9.js} +1 -1
- package/dist/playground/assets/{jq-BNiCuDOJ.js → jq-BkmeYKrt.js} +1 -1
- package/dist/playground/assets/{js-extras-BdghfXeM.js → js-extras-L5qcn3-N.js} +1 -1
- package/dist/playground/assets/{js-templates-sswEbaxg.js → js-templates-CRFTv2oO.js} +1 -1
- package/dist/playground/assets/{jsdoc-BMY7PhT3.js → jsdoc-BFUWmYUf.js} +1 -1
- package/dist/playground/assets/{json-CBj9E2eH.js → json-BbPKGtYk.js} +1 -1
- package/dist/playground/assets/{json5-CDBkZuP7.js → json5-DVHlf10o.js} +1 -1
- package/dist/playground/assets/{jsonp-D9MBLzzv.js → jsonp-ClqVoPuu.js} +1 -1
- package/dist/playground/assets/{jsstacktrace-D4EA8vTX.js → jsstacktrace-DnOw6JGu.js} +1 -1
- package/dist/playground/assets/{jsx--PW-fr7-.js → jsx-BBQHT1nT.js} +1 -1
- package/dist/playground/assets/{julia-DBmDsZtW.js → julia-Dywzjt67.js} +1 -1
- package/dist/playground/assets/{keepalived-CfuXSkj9.js → keepalived-zoXPqxj1.js} +1 -1
- package/dist/playground/assets/{keyman-9ZLGL17P.js → keyman-_C55gh0Q.js} +1 -1
- package/dist/playground/assets/{kotlin-ZJGwrbFy.js → kotlin-DgxF_9gQ.js} +1 -1
- package/dist/playground/assets/{kumir-9kpR-De2.js → kumir-DM9v99wO.js} +1 -1
- package/dist/playground/assets/{kusto-BzsN2HVa.js → kusto-POmYV_gF.js} +1 -1
- package/dist/playground/assets/{latex-Cq5HKTsT.js → latex-Bch3cmKy.js} +1 -1
- package/dist/playground/assets/{latte-DEgbvn9Z.js → latte-CMaKPb0n.js} +1 -1
- package/dist/playground/assets/{less-VwKXH-wv.js → less-rgZ2JV2A.js} +1 -1
- package/dist/playground/assets/{lilypond-zzt2NcRH.js → lilypond-C0R9kK-c.js} +1 -1
- package/dist/playground/assets/{liquid-zP2DcJaV.js → liquid-BbtCRjs4.js} +1 -1
- package/dist/playground/assets/{lisp-CgljZXky.js → lisp-BRQeSTH1.js} +1 -1
- package/dist/playground/assets/{livescript-CKOq61f8.js → livescript-CfCMqRZn.js} +1 -1
- package/dist/playground/assets/{llvm-0p29bgFI.js → llvm-AyJCHBim.js} +1 -1
- package/dist/playground/assets/{log-BFBa6_Me.js → log-CtmpsAvm.js} +1 -1
- package/dist/playground/assets/{lolcode-DMdSb48r.js → lolcode--RDFtroa.js} +1 -1
- package/dist/playground/assets/{lua-BpLiuCpZ.js → lua-Bcow8HK1.js} +1 -1
- package/dist/playground/assets/{magma-CEnSYS73.js → magma-BFphvaMS.js} +1 -1
- package/dist/playground/assets/{makefile-COE1Nk9d.js → makefile-C8hgH0Uq.js} +1 -1
- package/dist/playground/assets/{markdown-CWjQXCB6.js → markdown-D2HxsuM9.js} +1 -1
- package/dist/playground/assets/{markup-P94fuPZy.js → markup-qTMC8s8r.js} +1 -1
- package/dist/playground/assets/{markup-templating-DbGY0VWV.js → markup-templating-DnuFxCVo.js} +1 -1
- package/dist/playground/assets/{matlab-DwQsEGwu.js → matlab-C06yn0Y4.js} +1 -1
- package/dist/playground/assets/{maxscript-Bf1sIsl1.js → maxscript-BuDbxZNJ.js} +1 -1
- package/dist/playground/assets/{mel-CxAbuu_U.js → mel-BVhh6pBQ.js} +1 -1
- package/dist/playground/assets/{mermaid-ToX0lHro.js → mermaid-BN58d4WL.js} +1 -1
- package/dist/playground/assets/{mizar-BPRl8Hrk.js → mizar-D9CLOVCu.js} +1 -1
- package/dist/playground/assets/{mongodb-Cn-Q9tGi.js → mongodb-C0ST381v.js} +1 -1
- package/dist/playground/assets/{monkey-ChjgkhsF.js → monkey-V3EnGAn3.js} +1 -1
- package/dist/playground/assets/{moonscript-DJxzf6wo.js → moonscript-fb5kH5ab.js} +1 -1
- package/dist/playground/assets/{n1ql-BtVFq0ir.js → n1ql-DudjlXn3.js} +1 -1
- package/dist/playground/assets/{n4js-BkgLSqb1.js → n4js-YWOed4_6.js} +1 -1
- package/dist/playground/assets/{nand2tetris-hdl-Bc0uvh6Z.js → nand2tetris-hdl-DnubZqf4.js} +1 -1
- package/dist/playground/assets/{naniscript-BCgFqwZN.js → naniscript-DqcTVyS8.js} +1 -1
- package/dist/playground/assets/{nasm-DkbH8Nmq.js → nasm-CINMDA8E.js} +1 -1
- package/dist/playground/assets/{neon-DeBCOuEZ.js → neon-DL6P2Lj-.js} +1 -1
- package/dist/playground/assets/{nevod-D3rZdeS2.js → nevod-dqltuzH3.js} +1 -1
- package/dist/playground/assets/{nginx-DOqmIUlo.js → nginx-BIaxx-4-.js} +1 -1
- package/dist/playground/assets/{nim-BSlHiEVw.js → nim-Cgexr-8q.js} +1 -1
- package/dist/playground/assets/{nix-CuUP4ngN.js → nix-Cf-HlmzM.js} +1 -1
- package/dist/playground/assets/{nsis-bzB1dlnv.js → nsis-sU5Blswr.js} +1 -1
- package/dist/playground/assets/{objectivec-yQZZmwvQ.js → objectivec-B7GO1Kfm.js} +1 -1
- package/dist/playground/assets/{ocaml-DDIcDvrg.js → ocaml-BEXs5FWD.js} +1 -1
- package/dist/playground/assets/{opencl-BJWHm8W3.js → opencl-BRG-OWGQ.js} +1 -1
- package/dist/playground/assets/{openqasm-CNWn4OeR.js → openqasm-CV3Dj6lO.js} +1 -1
- package/dist/playground/assets/{oz-BvpqusRA.js → oz-BIg0ngEC.js} +1 -1
- package/dist/playground/assets/{parigp-DQ4wkKHO.js → parigp-Dx0l8bol.js} +1 -1
- package/dist/playground/assets/{parser-DXoAF9sB.js → parser-vr3q8W4m.js} +1 -1
- package/dist/playground/assets/{pascal-BBsg-juc.js → pascal-D5-ui7MB.js} +1 -1
- package/dist/playground/assets/{pascaligo-BjIapJ5e.js → pascaligo-DrJxZQ70.js} +1 -1
- package/dist/playground/assets/{pcaxis-LkNeQaFT.js → pcaxis-Dd743qkc.js} +1 -1
- package/dist/playground/assets/{peoplecode-BuVg6Xmx.js → peoplecode-CpNEFTio.js} +1 -1
- package/dist/playground/assets/{perl-84XpM0FD.js → perl-Btm-YIGG.js} +1 -1
- package/dist/playground/assets/{php-BN6JvYsV.js → php-CndkqGYi.js} +1 -1
- package/dist/playground/assets/{php-extras-BLb2_iZA.js → php-extras-DNHdYFDn.js} +1 -1
- package/dist/playground/assets/{phpdoc-ZPB0Ikvp.js → phpdoc-B1U3kTVE.js} +1 -1
- package/dist/playground/assets/{plsql-BNOE9CqR.js → plsql-37QmUw8R.js} +1 -1
- package/dist/playground/assets/{powerquery-1vxLlzZg.js → powerquery-Br13vAgM.js} +1 -1
- package/dist/playground/assets/{powershell-BtSZjuwk.js → powershell-CPKZRABY.js} +1 -1
- package/dist/playground/assets/{processing-D5A0KC6_.js → processing-BqHM1GbI.js} +1 -1
- package/dist/playground/assets/{prolog-BWyQbRk5.js → prolog-CGYibcB0.js} +1 -1
- package/dist/playground/assets/{promql-DQbzXtqb.js → promql-N5SeeFvs.js} +1 -1
- package/dist/playground/assets/{properties-IuML_xYM.js → properties-BHIO5sJl.js} +1 -1
- package/dist/playground/assets/{protobuf-QqkqDyeF.js → protobuf-VZ7xWYcT.js} +1 -1
- package/dist/playground/assets/{psl-BYuLsK8j.js → psl-CS88tBja.js} +1 -1
- package/dist/playground/assets/{pug-BmwX_LrT.js → pug-wS0Rox0v.js} +1 -1
- package/dist/playground/assets/{puppet-D25Z0qv1.js → puppet-BWX7KXpH.js} +1 -1
- package/dist/playground/assets/{pure-CGBG45Js.js → pure-Da2gnPOC.js} +1 -1
- package/dist/playground/assets/{purebasic-Ut6bhNIl.js → purebasic-6ixfNOcl.js} +1 -1
- package/dist/playground/assets/{purescript-zv_uOItz.js → purescript-B0lrMDz-.js} +1 -1
- package/dist/playground/assets/{python-BugX6lXQ.js → python-BSrN3Pik.js} +1 -1
- package/dist/playground/assets/{q-Cc4Gsk7a.js → q-D0mwUxN0.js} +1 -1
- package/dist/playground/assets/{qml-qcHpxf3a.js → qml-DRdlYnfY.js} +1 -1
- package/dist/playground/assets/{qore-CgtmgRLn.js → qore-BAJSoDGz.js} +1 -1
- package/dist/playground/assets/{qsharp-DLeOqyb5.js → qsharp-CVjb2KqB.js} +1 -1
- package/dist/playground/assets/{r-CNKgMKu2.js → r-CCISUA0K.js} +1 -1
- package/dist/playground/assets/{racket-DpTFxNCf.js → racket-DmM0lFk3.js} +1 -1
- package/dist/playground/assets/{reason-C9LPVgLr.js → reason-Ck8MjHXh.js} +1 -1
- package/dist/playground/assets/{regex-D8TTdEyZ.js → regex-DnocvRjs.js} +1 -1
- package/dist/playground/assets/{rego-BoJuIWoh.js → rego-DqvGnbGs.js} +1 -1
- package/dist/playground/assets/{renpy-KSqPOxbz.js → renpy-T_7WaRY8.js} +1 -1
- package/dist/playground/assets/{rest-BEKXEuX3.js → rest-CBXbjr9w.js} +1 -1
- package/dist/playground/assets/{rip-DV-6MFHU.js → rip-O8Uar5PY.js} +1 -1
- package/dist/playground/assets/{roboconf-C0rQRXMf.js → roboconf-D4wIonDB.js} +1 -1
- package/dist/playground/assets/{robotframework-p1SDDBmU.js → robotframework-B9504K8l.js} +1 -1
- package/dist/playground/assets/{ruby-CEE0niMx.js → ruby-tpCFSQF9.js} +1 -1
- package/dist/playground/assets/{rust-1KwvLzBC.js → rust-shQr4sfo.js} +1 -1
- package/dist/playground/assets/{sas-CzntwC8I.js → sas-De8Nrswg.js} +1 -1
- package/dist/playground/assets/{sass-BokRmQC0.js → sass-CnPrJtFf.js} +1 -1
- package/dist/playground/assets/{scala-BlRIF09Y.js → scala-Cflg15fv.js} +1 -1
- package/dist/playground/assets/{scheme-D6V72_fj.js → scheme-PF0wGi8W.js} +1 -1
- package/dist/playground/assets/{scss-C3xNSODO.js → scss-DPbAXjnQ.js} +1 -1
- package/dist/playground/assets/{shell-session-BfBoLPdU.js → shell-session-DTsMmaXu.js} +1 -1
- package/dist/playground/assets/{smali-2OCH8rNu.js → smali-DVAgP9dS.js} +1 -1
- package/dist/playground/assets/{smalltalk-CzcNyh9G.js → smalltalk-D7-9d13J.js} +1 -1
- package/dist/playground/assets/{smarty-YQ8bFuQU.js → smarty-CCISmQaQ.js} +1 -1
- package/dist/playground/assets/{sml-IqKWr1t7.js → sml-DKYcw7kl.js} +1 -1
- package/dist/playground/assets/{solidity-CRTFmjys.js → solidity-CiotyK1h.js} +1 -1
- package/dist/playground/assets/{solution-file-sZQC_0a8.js → solution-file-oDzqbMGB.js} +1 -1
- package/dist/playground/assets/{soy-BJmb_NET.js → soy-CulLKK3d.js} +1 -1
- package/dist/playground/assets/{sparql-CwSYvw4E.js → sparql-BnZz89R-.js} +1 -1
- package/dist/playground/assets/{splunk-spl-K1k38x5Q.js → splunk-spl-cWqun1A6.js} +1 -1
- package/dist/playground/assets/{sqf-ByK5G88O.js → sqf-CvUgiatI.js} +1 -1
- package/dist/playground/assets/{sql-CkRaVTHX.js → sql-CkEzsAWn.js} +1 -1
- package/dist/playground/assets/{squirrel-BuqVFyFU.js → squirrel-C_1oWC3R.js} +1 -1
- package/dist/playground/assets/{stan-BmqoGQYr.js → stan-idxLxTne.js} +1 -1
- package/dist/playground/assets/style-wHRbMVo6.css +1 -0
- package/dist/playground/assets/{stylus-h2g_M4S3.js → stylus-CTy9SV6-.js} +1 -1
- package/dist/playground/assets/{swift-BQI9W_Xp.js → swift-CETvxkx-.js} +1 -1
- package/dist/playground/assets/{systemd-DYXgJcAE.js → systemd-BcHrPkSS.js} +1 -1
- package/dist/playground/assets/{t4-cs-T7fyq26b.js → t4-cs-Cv6bZq26.js} +1 -1
- package/dist/playground/assets/{t4-templating-ITuJrqxr.js → t4-templating-DVju6dPe.js} +1 -1
- package/dist/playground/assets/{t4-vb-CiG2U397.js → t4-vb-Bt4oD8tm.js} +1 -1
- package/dist/playground/assets/{tap-DS9JkevL.js → tap-BhryD8W0.js} +1 -1
- package/dist/playground/assets/{tcl-DqCxR7jy.js → tcl-Cs1vQsAd.js} +1 -1
- package/dist/playground/assets/{textile-Cvoiqdw3.js → textile-C8k8GY3s.js} +1 -1
- package/dist/playground/assets/{toml-hM7ogywq.js → toml-CKpPEeWM.js} +1 -1
- package/dist/playground/assets/{tremor-DSkiCZ-0.js → tremor-B9en9AGn.js} +1 -1
- package/dist/playground/assets/{tsx-Bu95W5e1.js → tsx-Bj5tmogn.js} +1 -1
- package/dist/playground/assets/{tt2-jgcju_v4.js → tt2-BT7t1sg6.js} +1 -1
- package/dist/playground/assets/{turtle-BDWMhURF.js → turtle-X1o2rN-S.js} +1 -1
- package/dist/playground/assets/{twig-DbNfFdTZ.js → twig-DFfmR4JS.js} +1 -1
- package/dist/playground/assets/{typescript-CzkHYQxp.js → typescript-_A5wYl3X.js} +1 -1
- package/dist/playground/assets/{typoscript-B1LA8f0B.js → typoscript-Bc3_pLyv.js} +1 -1
- package/dist/playground/assets/{unrealscript-DQ6b5hJJ.js → unrealscript-Bo5iU_bM.js} +1 -1
- package/dist/playground/assets/{uorazor-O3rNuxGd.js → uorazor-BYLFTjkn.js} +1 -1
- package/dist/playground/assets/{uri-D5eM9USs.js → uri-V5hJ64nX.js} +1 -1
- package/dist/playground/assets/{v-CNt_9WCn.js → v-JpBTGEwa.js} +1 -1
- package/dist/playground/assets/{vala-kImKKegJ.js → vala-DJM2Of2Y.js} +1 -1
- package/dist/playground/assets/{vbnet-C7PmieHa.js → vbnet-BEnSAlBY.js} +1 -1
- package/dist/playground/assets/{velocity-DHxfnAP6.js → velocity-BpD0aad9.js} +1 -1
- package/dist/playground/assets/{verilog-Ck0U7gsQ.js → verilog-DbPnLvhi.js} +1 -1
- package/dist/playground/assets/{vhdl-B8eZrqn6.js → vhdl-WNiPUQO6.js} +1 -1
- package/dist/playground/assets/{vim-D17t06hq.js → vim-L8wA9a_9.js} +1 -1
- package/dist/playground/assets/{visual-basic-C1KZbvZy.js → visual-basic-CRR-uMKL.js} +1 -1
- package/dist/playground/assets/{warpscript-CLiTLNCy.js → warpscript-B_cd2t7O.js} +1 -1
- package/dist/playground/assets/{wasm-BX6hcjC9.js → wasm-CDgEG09P.js} +1 -1
- package/dist/playground/assets/{web-idl-Dt4guCHu.js → web-idl-CoxC6Q3Y.js} +1 -1
- package/dist/playground/assets/{wiki-BW5D5-fh.js → wiki-Bo3ia0FB.js} +1 -1
- package/dist/playground/assets/{wolfram-Ckwv4wEf.js → wolfram-HZNJOTDl.js} +1 -1
- package/dist/playground/assets/{wren-srNvBHkX.js → wren-CSwxHQNY.js} +1 -1
- package/dist/playground/assets/{xeora-DjtZMOFJ.js → xeora-BZVBqX4U.js} +1 -1
- package/dist/playground/assets/{xml-doc-C96RRt2k.js → xml-doc-DY-O0I1v.js} +1 -1
- package/dist/playground/assets/{xojo-igj_3Ij-.js → xojo-ZbYitQWW.js} +1 -1
- package/dist/playground/assets/{xquery-CmYYsW5-.js → xquery-OPsmQhCV.js} +1 -1
- package/dist/playground/assets/{yaml-CQVmvWIE.js → yaml-CgUeWX6z.js} +1 -1
- package/dist/playground/assets/{yang-BUypFZLp.js → yang-5E8iVVoh.js} +1 -1
- package/dist/playground/assets/{zig-D1HRvhJS.js → zig-CfeNBkdJ.js} +1 -1
- package/dist/playground/index.html +2 -2
- package/package.json +7 -7
- 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,27 @@
|
|
|
1
1
|
# mastra
|
|
2
2
|
|
|
3
|
+
## 0.12.3-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Client SDK Agents, Mastra server - support runtimeContext with GET requests ([#7734](https://github.com/mastra-ai/mastra/pull/7734))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`2a6585f`](https://github.com/mastra-ai/mastra/commit/2a6585f7cb71f023f805d521d1c3c95fb9a3aa59), [`3d26e83`](https://github.com/mastra-ai/mastra/commit/3d26e8353a945719028f087cc6ac4b06f0ce27d2), [`56e55d1`](https://github.com/mastra-ai/mastra/commit/56e55d1e9eb63e7d9e41aa46e012aae471256812), [`4c81b65`](https://github.com/mastra-ai/mastra/commit/4c81b65a28d128560bdf63bc9b8a1bddd4884812)]:
|
|
10
|
+
- @mastra/core@0.16.3-alpha.1
|
|
11
|
+
- @mastra/deployer@0.16.3-alpha.1
|
|
12
|
+
|
|
13
|
+
## 0.12.3-alpha.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Add new scorers to list ([#7614](https://github.com/mastra-ai/mastra/pull/7614))
|
|
18
|
+
|
|
19
|
+
- fix playground UI issue about dynmic workflow exec in agent thread ([#7665](https://github.com/mastra-ai/mastra/pull/7665))
|
|
20
|
+
|
|
21
|
+
- 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)]:
|
|
22
|
+
- @mastra/core@0.16.3-alpha.0
|
|
23
|
+
- @mastra/deployer@0.16.3-alpha.0
|
|
24
|
+
|
|
3
25
|
## 0.12.2
|
|
4
26
|
|
|
5
27
|
### 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.1"};
|
|
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
|
});
|