@langwatch/mcp-server 2.2.0 → 3.0.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 +26 -0
- package/dist/add-dashboard-widget-55UI6H22.js +44 -0
- package/dist/add-dashboard-widget-MJHIC3CC.js +45 -0
- package/dist/{archive-project-SPVHXK6A.js → archive-project-K5UD7A6X.js} +4 -4
- package/dist/{archive-project-KWFM3I5Z.js → archive-project-L4PAKT34.js} +4 -4
- package/dist/{archive-run-plan-65QN3XRX.js → archive-run-plan-5HSQG2HX.js} +4 -4
- package/dist/{archive-run-plan-Z4SYE6BP.js → archive-run-plan-AOKNYQIO.js} +4 -4
- package/dist/{archive-scenario-FXEYQNEH.js → archive-scenario-2CWJW2VD.js} +4 -4
- package/dist/{archive-scenario-A6QV5LOW.js → archive-scenario-5IJQESHH.js} +4 -4
- package/dist/{archive-test-suite-NKZDZY3D.js → archive-test-suite-OPB7NFI7.js} +4 -4
- package/dist/{archive-test-suite-5ADQ3KPQ.js → archive-test-suite-ZC3TN6VH.js} +4 -4
- package/dist/{assign-prompt-tag-5IUZXJ2T.js → assign-prompt-tag-6DDE6ZZ5.js} +3 -3
- package/dist/{assign-prompt-tag-HBZLBIFD.js → assign-prompt-tag-D7O23MJM.js} +3 -3
- package/dist/{chunk-HGELNIVY.js → chunk-4RX3G62A.js} +3 -3
- package/dist/{chunk-UWLE5T2F.js → chunk-7CZQDZ2K.js} +10 -3
- package/dist/{chunk-I7ATIZED.js → chunk-7GETGE6B.js} +2 -2
- package/dist/{chunk-3OCG3QPU.js → chunk-AASW2TO2.js} +2 -2
- package/dist/{chunk-UTJCWXPZ.js → chunk-B4RFWIUP.js} +2 -2
- package/dist/{chunk-B4J3PJLX.js → chunk-D2HS73VI.js} +2 -6
- package/dist/{chunk-H6WGMG2T.js → chunk-DULFP3MK.js} +1 -1
- package/dist/{chunk-YCARO42Z.js → chunk-EYPJBL7P.js} +3 -3
- package/dist/{chunk-SUPUUC4W.js → chunk-GA5JUSPT.js} +2 -2
- package/dist/{chunk-Y34DHR5K.js → chunk-HLQJXUR6.js} +2 -2
- package/dist/{chunk-SXFC3FNH.js → chunk-KILVK3FS.js} +2 -2
- package/dist/chunk-MOCU5XWF.js +79 -0
- package/dist/chunk-O2WGVCED.js +41 -0
- package/dist/{chunk-NKMTIHIJ.js → chunk-QXLMHLRC.js} +2 -2
- package/dist/{chunk-J7PQKBLD.js → chunk-R5YJIYPF.js} +512 -402
- package/dist/{chunk-JRJPH75H.js → chunk-RFC2SBEX.js} +2 -2
- package/dist/{chunk-UNJM3BIL.js → chunk-SHSVN3SE.js} +2 -2
- package/dist/{chunk-PTDR56Z3.js → chunk-VOUGDY2O.js} +2 -2
- package/dist/chunk-WCKZDOGF.js +31 -0
- package/dist/{chunk-7VNSRCXO.js → chunk-XQYH52SI.js} +2 -2
- package/dist/{chunk-VMWJD732.js → chunk-YCIUEZVK.js} +2 -2
- package/dist/{config-EAKW6F26.js → config-2WQGMAEN.js} +2 -2
- package/dist/config.js +1 -1
- package/dist/{create-agent-AYZ3LB3V.js → create-agent-6JNLMYQD.js} +4 -4
- package/dist/{create-agent-S5ZBCEFT.js → create-agent-IRZOU4R5.js} +4 -4
- package/dist/create-analytics-report-N4L4V5QL.js +19 -0
- package/dist/create-analytics-report-QEHXG7FU.js +18 -0
- package/dist/{create-annotation-VUSXULQK.js → create-annotation-CCEGIZ67.js} +4 -4
- package/dist/{create-annotation-LHNCLHYP.js → create-annotation-DTHCMWHB.js} +4 -4
- package/dist/{create-api-key-NNYKARMG.js → create-api-key-JKM2DSZO.js} +4 -4
- package/dist/{create-api-key-T4KSNPKB.js → create-api-key-JPEUIXGM.js} +4 -4
- package/dist/{create-dataset-LUP5PVDM.js → create-dataset-DJNXYJ5B.js} +4 -4
- package/dist/{create-dataset-2MC4SD4O.js → create-dataset-WON4SOTC.js} +4 -4
- package/dist/{create-dataset-records-NSKBZP3G.js → create-dataset-records-TMEOTLTO.js} +4 -4
- package/dist/{create-dataset-records-W4GLN2FV.js → create-dataset-records-UJBW3C7C.js} +4 -4
- package/dist/{create-evaluator-HMTYO5SS.js → create-evaluator-N5AEHI4K.js} +4 -4
- package/dist/{create-evaluator-643G6LXL.js → create-evaluator-XYNY2YFY.js} +4 -4
- package/dist/create-mcp-server.cjs +769 -570
- package/dist/create-mcp-server.js +502 -392
- package/dist/{create-project-KAIC46UY.js → create-project-EY4XZ7TH.js} +4 -4
- package/dist/{create-project-6N7PIYRY.js → create-project-YL345T5L.js} +4 -4
- package/dist/{create-prompt-E67LXIYT.js → create-prompt-JZQNQ7I3.js} +3 -3
- package/dist/{create-prompt-PKJ7EDRR.js → create-prompt-ZUMQHHX7.js} +3 -3
- package/dist/{create-prompt-tag-4YO3FSJ3.js → create-prompt-tag-CJ5FZ436.js} +3 -3
- package/dist/{create-prompt-tag-OPQUEXWB.js → create-prompt-tag-JFP2Q3PO.js} +3 -3
- package/dist/{create-scenario-5PJBMAXO.js → create-scenario-CQU2SSFB.js} +4 -4
- package/dist/{create-scenario-UEM77OE7.js → create-scenario-S6OWWKJO.js} +4 -4
- package/dist/{create-test-suite-SZEPVXSE.js → create-test-suite-OLGCAGJA.js} +4 -4
- package/dist/{create-test-suite-4IPXVSFQ.js → create-test-suite-Y7P2RI4L.js} +4 -4
- package/dist/{create-trigger-PRELMT6J.js → create-trigger-4CNBTISJ.js} +4 -4
- package/dist/{create-trigger-5HZSCRAN.js → create-trigger-RQ653WYF.js} +4 -4
- package/dist/dashboards-BA7M6CMO.js +90 -0
- package/dist/dashboards-U663GUIB.js +91 -0
- package/dist/{delete-agent-QMEK3XHK.js → delete-agent-J2Q4DRZ2.js} +4 -4
- package/dist/{delete-agent-JUIZWAXG.js → delete-agent-ZAU4LTXB.js} +4 -4
- package/dist/delete-analytics-report-QK6X7P4S.js +19 -0
- package/dist/delete-analytics-report-YUYLDHLL.js +18 -0
- package/dist/{delete-annotation-HY3O2OGR.js → delete-annotation-7X4NYXXM.js} +4 -4
- package/dist/{delete-annotation-VKIQWUYW.js → delete-annotation-KJOCDLV3.js} +4 -4
- package/dist/{delete-dataset-WKRUW4FP.js → delete-dataset-NXP7ZPPV.js} +4 -4
- package/dist/{delete-dataset-HQCR66MG.js → delete-dataset-RUTZBBVD.js} +4 -4
- package/dist/{delete-dataset-records-C2IQFFVQ.js → delete-dataset-records-4Z7DZCDW.js} +4 -4
- package/dist/{delete-dataset-records-SDUHQLLM.js → delete-dataset-records-75UAR5IS.js} +4 -4
- package/dist/{delete-evaluator-4SNSCLEE.js → delete-evaluator-E3CUNGTQ.js} +4 -4
- package/dist/{delete-evaluator-QP3QHTLN.js → delete-evaluator-RI4GALGX.js} +4 -4
- package/dist/{delete-prompt-tag-NZ4JQMYG.js → delete-prompt-tag-LE3WJPKS.js} +3 -3
- package/dist/{delete-prompt-tag-YYQ4VMAD.js → delete-prompt-tag-S4KBZTNG.js} +3 -3
- package/dist/{delete-workflow-JSWABL5F.js → delete-workflow-4CZFIQCQ.js} +4 -4
- package/dist/{delete-workflow-5J46T73T.js → delete-workflow-PWQPDW6H.js} +4 -4
- package/dist/{discover-schema-A33SLMXW.js → discover-schema-7WHIIATI.js} +4 -4
- package/dist/{discover-schema-55YJBFGQ.js → discover-schema-J2ANOBKO.js} +4 -4
- package/dist/{get-agent-LJQX7OF4.js → get-agent-5T3CXQOR.js} +4 -4
- package/dist/{get-agent-OTIYUFZA.js → get-agent-ZKYQJUQ7.js} +4 -4
- package/dist/{get-analytics-IQZKJHLW.js → get-analytics-4MPEK4KV.js} +3 -3
- package/dist/{get-analytics-DCS72353.js → get-analytics-ZLI3A4F5.js} +3 -3
- package/dist/get-analytics-report-JCKYMA2S.js +29 -0
- package/dist/get-analytics-report-SKIP2JWH.js +30 -0
- package/dist/{get-dataset-ALSP7RTX.js → get-dataset-APGZBYMH.js} +4 -4
- package/dist/{get-dataset-X4B5JDG2.js → get-dataset-LWXDVMVE.js} +4 -4
- package/dist/{get-evaluator-XEUZGZCH.js → get-evaluator-3A7BJBAB.js} +4 -4
- package/dist/{get-evaluator-ISMC4LLI.js → get-evaluator-IWNJINRY.js} +4 -4
- package/dist/{get-project-RM6FRCBK.js → get-project-EQVB4LEL.js} +4 -4
- package/dist/{get-project-5VKROSDH.js → get-project-RK6AJTEP.js} +4 -4
- package/dist/{get-prompt-OWXJZHQQ.js → get-prompt-TLG2T2DS.js} +3 -3
- package/dist/{get-prompt-W52DY36E.js → get-prompt-ZER557X3.js} +3 -3
- package/dist/{get-run-plan-RUXQ6PAX.js → get-run-plan-5X7DDJRN.js} +4 -4
- package/dist/{get-run-plan-BE3M2AUX.js → get-run-plan-PEHRO5M3.js} +4 -4
- package/dist/{get-scenario-YM4ODWW6.js → get-scenario-375W5D6I.js} +4 -4
- package/dist/{get-scenario-RNM7BAX2.js → get-scenario-UQX45ZZO.js} +4 -4
- package/dist/{get-simulation-run-LCFSMPGQ.js → get-simulation-run-2NBXJADG.js} +4 -4
- package/dist/{get-simulation-run-6GIATQE5.js → get-simulation-run-QZTLGL7W.js} +4 -4
- package/dist/{get-test-suite-GC2O7YH6.js → get-test-suite-GVIBDG7K.js} +4 -4
- package/dist/{get-test-suite-P5LJ6VLF.js → get-test-suite-OODIR3RI.js} +4 -4
- package/dist/{get-trace-SEF3FMR5.js → get-trace-AGCHVPJK.js} +3 -3
- package/dist/{get-trace-KBRVV4NN.js → get-trace-KJLYAZRC.js} +3 -3
- package/dist/{get-workflow-7PVED7JE.js → get-workflow-3TV2YYC5.js} +4 -4
- package/dist/{get-workflow-YXULW4GC.js → get-workflow-7LZSVPP2.js} +4 -4
- package/dist/{http-server-IR4QOS43.js → http-server-7CCN3EHJ.js} +245 -45
- package/dist/index.js +1750 -870
- package/dist/langwatch-api-analytics-reports-6CF6KUET.js +17 -0
- package/dist/langwatch-api-analytics-reports-RPFB5AO5.js +18 -0
- package/dist/{langwatch-api-annotations-TBHLCQ5R.js → langwatch-api-annotations-H4AI4TKG.js} +4 -4
- package/dist/{langwatch-api-annotations-6SA4OB4C.js → langwatch-api-annotations-QSJNUQQS.js} +4 -4
- package/dist/{langwatch-api-monitors-CBF3FGIM.js → langwatch-api-monitors-ENHLOL3S.js} +3 -3
- package/dist/{langwatch-api-monitors-YNWA2M5Y.js → langwatch-api-monitors-OHSGADTH.js} +3 -3
- package/dist/{langwatch-api-secrets-RNFO4LF2.js → langwatch-api-secrets-AGW6UUMD.js} +3 -3
- package/dist/{langwatch-api-secrets-ADTOJELP.js → langwatch-api-secrets-CLTS766Q.js} +3 -3
- package/dist/{langwatch-api-triggers-KQDQC6L5.js → langwatch-api-triggers-G5UWFNN2.js} +4 -4
- package/dist/{langwatch-api-triggers-QS7HDIVW.js → langwatch-api-triggers-QMR7KEXW.js} +4 -4
- package/dist/langwatch-api-workflows-HKTBIKKY.js +15 -0
- package/dist/{langwatch-api-workflows-OKC4FXIF.js → langwatch-api-workflows-OMROZH2O.js} +4 -4
- package/dist/{list-agents-HVYWEQMI.js → list-agents-BYWDNAHT.js} +4 -4
- package/dist/{list-agents-RBAOCF53.js → list-agents-MG24MHZE.js} +4 -4
- package/dist/list-analytics-reports-G3EPWGSQ.js +32 -0
- package/dist/list-analytics-reports-PPWIFRES.js +33 -0
- package/dist/{list-annotations-HJH4NBLD.js → list-annotations-QCLGEK5A.js} +4 -4
- package/dist/{list-annotations-J4UAHSUN.js → list-annotations-Y4EUBJHG.js} +4 -4
- package/dist/{list-api-keys-A2PMV435.js → list-api-keys-DAVOBPFK.js} +4 -4
- package/dist/{list-api-keys-7UTJRZDG.js → list-api-keys-JMW5WRXX.js} +4 -4
- package/dist/list-dashboards-2P3VJFRS.js +29 -0
- package/dist/list-dashboards-MW5O3MKH.js +30 -0
- package/dist/{list-dataset-records-WFM7F33C.js → list-dataset-records-KEHT7G6Q.js} +4 -4
- package/dist/{list-dataset-records-M5TKA6LK.js → list-dataset-records-KMLLMZAZ.js} +4 -4
- package/dist/{list-datasets-B5X4P7BQ.js → list-datasets-P3JK2ZHS.js} +4 -4
- package/dist/{list-datasets-THUKQHPX.js → list-datasets-Z7OOE4KI.js} +4 -4
- package/dist/{list-evaluators-MYH2OVCI.js → list-evaluators-7RRESBOU.js} +4 -4
- package/dist/{list-evaluators-NLVWF6K7.js → list-evaluators-VATJVOHR.js} +4 -4
- package/dist/{list-model-providers-3JUGP4YI.js → list-model-providers-OXDRPUCJ.js} +4 -4
- package/dist/{list-model-providers-H3XKORFO.js → list-model-providers-VXQJWDXU.js} +4 -4
- package/dist/{list-projects-6EJ5YYEW.js → list-projects-HUVK7L3W.js} +4 -4
- package/dist/{list-projects-YNNSRMLC.js → list-projects-X72ZXVY5.js} +4 -4
- package/dist/{list-prompt-tags-NVFQO6WX.js → list-prompt-tags-3I3LWFIR.js} +3 -3
- package/dist/{list-prompt-tags-XUQTTAH4.js → list-prompt-tags-DRHUH2ND.js} +3 -3
- package/dist/{list-prompts-IRI6AIXO.js → list-prompts-6DX3QECJ.js} +3 -3
- package/dist/{list-prompts-HSIMMHTF.js → list-prompts-PS423RU3.js} +3 -3
- package/dist/{list-run-plans-QALLCN2K.js → list-run-plans-5SXPOV3X.js} +4 -4
- package/dist/{list-run-plans-PX2XI6EK.js → list-run-plans-6VNHINPY.js} +4 -4
- package/dist/{list-scenarios-SSJQEMJP.js → list-scenarios-EQWCW7Q4.js} +4 -4
- package/dist/{list-scenarios-QZRPVHS4.js → list-scenarios-GKNH3YND.js} +4 -4
- package/dist/{list-simulation-runs-OEADLLQR.js → list-simulation-runs-KHY7KALI.js} +4 -4
- package/dist/{list-simulation-runs-KNOLGMDV.js → list-simulation-runs-PUDK32C2.js} +4 -4
- package/dist/{list-test-suites-ANAQBLDG.js → list-test-suites-7H2DRILK.js} +4 -4
- package/dist/{list-test-suites-N4WVLBKK.js → list-test-suites-GY56LGLY.js} +4 -4
- package/dist/{list-trigger-fires-JV3WFYYG.js → list-trigger-fires-7RZUP54Y.js} +4 -4
- package/dist/{list-trigger-fires-WTW4DVIW.js → list-trigger-fires-OZUF65LI.js} +4 -4
- package/dist/{list-triggers-SQNIG35Q.js → list-triggers-BGUCUXTJ.js} +4 -4
- package/dist/{list-triggers-V4Y356AK.js → list-triggers-XC5KMX4C.js} +4 -4
- package/dist/{list-workflows-ZHTX5LCL.js → list-workflows-55NYC3PC.js} +4 -4
- package/dist/{list-workflows-IMSX7SXU.js → list-workflows-HV7FUWZA.js} +4 -4
- package/dist/{rename-prompt-tag-IQI7MHOI.js → rename-prompt-tag-2I7Z5FCY.js} +3 -3
- package/dist/{rename-prompt-tag-PA2BRIE6.js → rename-prompt-tag-SZYTOWDX.js} +3 -3
- package/dist/{rename-test-suite-4J7UX5S2.js → rename-test-suite-27AYY33K.js} +4 -4
- package/dist/{rename-test-suite-NNVLMLKY.js → rename-test-suite-CLIEPZDO.js} +4 -4
- package/dist/{report-issue-AS34ZMJF.js → report-issue-5HSL7CNB.js} +28 -2
- package/dist/{report-issue-DCZFLGDO.js → report-issue-N7ND5TM6.js} +28 -2
- package/dist/{rerun-run-plan-TG2V4WM4.js → rerun-run-plan-O3VUZ6CG.js} +4 -4
- package/dist/{rerun-run-plan-ZI5OY3VA.js → rerun-run-plan-OJTVVGJI.js} +4 -4
- package/dist/{revoke-api-key-SFMEFWJC.js → revoke-api-key-BU6BKGCG.js} +4 -4
- package/dist/{revoke-api-key-3J3ZA4UB.js → revoke-api-key-NZNCFOIR.js} +4 -4
- package/dist/{run-agent-W4VJP72Z.js → run-agent-244O4Y5M.js} +4 -4
- package/dist/{run-agent-YNV6ZHW4.js → run-agent-HPCGZGYW.js} +4 -4
- package/dist/{run-plan-6C77GWG4.js → run-plan-2ZPGGZ4H.js} +4 -4
- package/dist/{run-plan-PAARQSI4.js → run-plan-KSXUYQT3.js} +4 -4
- package/dist/{run-query-KJDH544C.js → run-query-4LMOQ5UW.js} +4 -4
- package/dist/{run-query-T4QW2Z5O.js → run-query-BQUHIUC2.js} +4 -4
- package/dist/{run-test-suite-SQJELEZX.js → run-test-suite-P3WLVPXC.js} +4 -4
- package/dist/{run-test-suite-STB6NUJM.js → run-test-suite-UEOMCON6.js} +4 -4
- package/dist/{run-workflow-SP32SO5M.js → run-workflow-EFZ6HG5B.js} +4 -4
- package/dist/{run-workflow-D6PQNBI6.js → run-workflow-I4IHEN54.js} +4 -4
- package/dist/{search-traces-HCBGOG6R.js → search-traces-6IR7PR4L.js} +3 -3
- package/dist/{search-traces-HSTQ6WTQ.js → search-traces-BYML2NQ4.js} +3 -3
- package/dist/{set-model-provider-KDQ7C4EZ.js → set-model-provider-RBNGWFVI.js} +4 -4
- package/dist/{set-model-provider-GF7NXUJA.js → set-model-provider-SHEVKWRC.js} +4 -4
- package/dist/{update-agent-DWG43T2P.js → update-agent-PTKTM2B5.js} +4 -4
- package/dist/{update-agent-MXNOBS4H.js → update-agent-ZPXWRMS2.js} +4 -4
- package/dist/update-dashboard-widget-HKCBXH7X.js +62 -0
- package/dist/update-dashboard-widget-IP2TTQ5G.js +63 -0
- package/dist/{update-dataset-DQH3OHOU.js → update-dataset-GHIN6JR3.js} +4 -4
- package/dist/{update-dataset-SQZ6T4WX.js → update-dataset-IRVMY5PF.js} +4 -4
- package/dist/{update-dataset-record-7PLDGTMR.js → update-dataset-record-6VI7K2CL.js} +4 -4
- package/dist/{update-dataset-record-3AT4IPBC.js → update-dataset-record-Z3L7ACNF.js} +4 -4
- package/dist/{update-evaluator-4LFTKFPT.js → update-evaluator-5NLNE6VY.js} +4 -4
- package/dist/{update-evaluator-IGTX6PX4.js → update-evaluator-FEH7H6NS.js} +4 -4
- package/dist/{update-project-QVHSJRUP.js → update-project-75H3LDQT.js} +4 -4
- package/dist/{update-project-PLJIOZS6.js → update-project-QPR3QX55.js} +4 -4
- package/dist/{update-prompt-GDKRYJI3.js → update-prompt-BCDFTNLK.js} +3 -3
- package/dist/{update-prompt-MY263DYF.js → update-prompt-NPRXYSWA.js} +3 -3
- package/dist/{update-scenario-7KA3JDXA.js → update-scenario-BNOMDCMV.js} +4 -4
- package/dist/{update-scenario-MOHRQKAQ.js → update-scenario-EM5XGMB7.js} +4 -4
- package/package.json +2 -2
- package/pyproject.toml +17 -2
- package/src/config.d.ts +2 -0
- package/src/config.ts +2 -0
- package/src/create-mcp-server.ts +148 -41
- package/src/langwatch-api-analytics-reports.ts +62 -0
- package/src/langwatch-api-dashboard-widgets.ts +3 -68
- package/src/langwatch-api-dashboards.ts +110 -28
- package/src/langwatch-api-projects.ts +0 -17
- package/src/langwatch-api.ts +10 -0
- package/src/schemas/widget-sources.ts +33 -0
- package/src/tools/add-dashboard-widget.ts +20 -32
- package/src/tools/create-analytics-report.ts +7 -0
- package/src/tools/dashboard-widget-queries.ts +13 -0
- package/src/tools/dashboards.ts +104 -0
- package/src/tools/delete-analytics-report.ts +7 -0
- package/src/tools/get-analytics-report.ts +23 -0
- package/src/tools/list-analytics-reports.ts +27 -0
- package/src/tools/list-dashboards.ts +20 -21
- package/src/tools/report-issue.ts +2 -0
- package/src/tools/run-experiment.ts +5 -1
- package/src/tools/update-dashboard-widget.ts +29 -40
- package/uv.lock +667 -341
- package/dist/add-dashboard-widget-4ZC5UN73.js +0 -50
- package/dist/add-dashboard-widget-ACC6QYBG.js +0 -49
- package/dist/chunk-5FNCQRCX.js +0 -91
- package/dist/chunk-ILZDO25L.js +0 -36
- package/dist/chunk-K2I7Z3LZ.js +0 -28
- package/dist/create-dashboard-DHVFMEU4.js +0 -18
- package/dist/create-dashboard-WTKKS5Z6.js +0 -19
- package/dist/delete-dashboard-76N66XXL.js +0 -18
- package/dist/delete-dashboard-JVIVHNJM.js +0 -19
- package/dist/get-dashboard-5NYJEIX2.js +0 -29
- package/dist/get-dashboard-QMTYDQAZ.js +0 -30
- package/dist/langwatch-api-dashboards-6EO2VVZW.js +0 -17
- package/dist/langwatch-api-dashboards-NHU5BZD7.js +0 -18
- package/dist/langwatch-api-workflows-XGJE6SR5.js +0 -15
- package/dist/list-dashboard-boards-OPWROHMG.js +0 -33
- package/dist/list-dashboard-boards-U2GJ7GC5.js +0 -34
- package/dist/list-dashboards-ROSYFLDQ.js +0 -33
- package/dist/list-dashboards-RQ635ZU7.js +0 -32
- package/dist/update-dashboard-widget-CJKJLCDY.js +0 -71
- package/dist/update-dashboard-widget-CYQDS2NR.js +0 -70
- package/src/langwatch-api-boards.ts +0 -46
- package/src/tools/create-dashboard.ts +0 -7
- package/src/tools/dashboard-exists.ts +0 -25
- package/src/tools/delete-dashboard.ts +0 -7
- package/src/tools/get-dashboard.ts +0 -22
- package/src/tools/list-dashboard-boards.ts +0 -28
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
assertDashboardExists,
|
|
3
|
-
assignDashboardWidgetToDashboard,
|
|
4
|
-
createDashboardWidget,
|
|
5
|
-
deleteDashboardWidget,
|
|
6
|
-
normalizeDashboardWidgetQueries
|
|
7
|
-
} from "./chunk-5FNCQRCX.js";
|
|
8
|
-
import "./chunk-K2I7Z3LZ.js";
|
|
9
|
-
import {
|
|
10
|
-
getCurrentProject
|
|
11
|
-
} from "./chunk-B4J3PJLX.js";
|
|
12
|
-
import "./chunk-UWLE5T2F.js";
|
|
13
|
-
import "./chunk-H6WGMG2T.js";
|
|
14
|
-
import "./chunk-SAS5OB7F.js";
|
|
15
|
-
|
|
16
|
-
// src/tools/add-dashboard-widget.ts
|
|
17
|
-
async function handleAddDashboardWidget(params) {
|
|
18
|
-
const queries = normalizeDashboardWidgetQueries({ queries: params.queries });
|
|
19
|
-
const project = await getCurrentProject();
|
|
20
|
-
await assertDashboardExists({ projectId: project.id, dashboardId: params.dashboardId });
|
|
21
|
-
const widget = await createDashboardWidget({
|
|
22
|
-
projectId: project.id,
|
|
23
|
-
name: params.name,
|
|
24
|
-
code: params.code,
|
|
25
|
-
queries
|
|
26
|
-
});
|
|
27
|
-
try {
|
|
28
|
-
await assignDashboardWidgetToDashboard({
|
|
29
|
-
projectId: project.id,
|
|
30
|
-
widgetId: widget.id,
|
|
31
|
-
dashboardId: params.dashboardId
|
|
32
|
-
});
|
|
33
|
-
} catch (error) {
|
|
34
|
-
await deleteDashboardWidget({
|
|
35
|
-
projectId: project.id,
|
|
36
|
-
widgetId: widget.id
|
|
37
|
-
}).catch(() => {
|
|
38
|
-
});
|
|
39
|
-
throw error;
|
|
40
|
-
}
|
|
41
|
-
return [
|
|
42
|
-
`Widget "${params.name}" created and added to dashboard "${params.dashboardId}".`,
|
|
43
|
-
`**Widget ID**: ${widget.id}`,
|
|
44
|
-
`**Queries**: ${queries.map((q) => q.name).join(", ")}`
|
|
45
|
-
].join("\n");
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
handleAddDashboardWidget
|
|
49
|
-
};
|
|
50
|
-
//# sourceMappingURL=add-dashboard-widget-4ZC5UN73.js.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
assertDashboardExists,
|
|
3
|
-
assignDashboardWidgetToDashboard,
|
|
4
|
-
createDashboardWidget,
|
|
5
|
-
deleteDashboardWidget,
|
|
6
|
-
normalizeDashboardWidgetQueries
|
|
7
|
-
} from "./chunk-5FNCQRCX.js";
|
|
8
|
-
import "./chunk-K2I7Z3LZ.js";
|
|
9
|
-
import {
|
|
10
|
-
getCurrentProject
|
|
11
|
-
} from "./chunk-B4J3PJLX.js";
|
|
12
|
-
import "./chunk-UWLE5T2F.js";
|
|
13
|
-
import "./chunk-H6WGMG2T.js";
|
|
14
|
-
|
|
15
|
-
// src/tools/add-dashboard-widget.ts
|
|
16
|
-
async function handleAddDashboardWidget(params) {
|
|
17
|
-
const queries = normalizeDashboardWidgetQueries({ queries: params.queries });
|
|
18
|
-
const project = await getCurrentProject();
|
|
19
|
-
await assertDashboardExists({ projectId: project.id, dashboardId: params.dashboardId });
|
|
20
|
-
const widget = await createDashboardWidget({
|
|
21
|
-
projectId: project.id,
|
|
22
|
-
name: params.name,
|
|
23
|
-
code: params.code,
|
|
24
|
-
queries
|
|
25
|
-
});
|
|
26
|
-
try {
|
|
27
|
-
await assignDashboardWidgetToDashboard({
|
|
28
|
-
projectId: project.id,
|
|
29
|
-
widgetId: widget.id,
|
|
30
|
-
dashboardId: params.dashboardId
|
|
31
|
-
});
|
|
32
|
-
} catch (error) {
|
|
33
|
-
await deleteDashboardWidget({
|
|
34
|
-
projectId: project.id,
|
|
35
|
-
widgetId: widget.id
|
|
36
|
-
}).catch(() => {
|
|
37
|
-
});
|
|
38
|
-
throw error;
|
|
39
|
-
}
|
|
40
|
-
return [
|
|
41
|
-
`Widget "${params.name}" created and added to dashboard "${params.dashboardId}".`,
|
|
42
|
-
`**Widget ID**: ${widget.id}`,
|
|
43
|
-
`**Queries**: ${queries.map((q) => q.name).join(", ")}`
|
|
44
|
-
].join("\n");
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
handleAddDashboardWidget
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=add-dashboard-widget-ACC6QYBG.js.map
|
package/dist/chunk-5FNCQRCX.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getBoard
|
|
3
|
-
} from "./chunk-K2I7Z3LZ.js";
|
|
4
|
-
import {
|
|
5
|
-
LangWatchApiError,
|
|
6
|
-
makeRequest
|
|
7
|
-
} from "./chunk-UWLE5T2F.js";
|
|
8
|
-
|
|
9
|
-
// src/langwatch-api-dashboard-widgets.ts
|
|
10
|
-
async function createDashboardWidget(params) {
|
|
11
|
-
const { projectId, ...data } = params;
|
|
12
|
-
return makeRequest(
|
|
13
|
-
"POST",
|
|
14
|
-
`/api/v1/projects/${encodeURIComponent(projectId)}/analytics/dashboard-widgets`,
|
|
15
|
-
data
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
async function getDashboardWidget(params) {
|
|
19
|
-
return makeRequest(
|
|
20
|
-
"GET",
|
|
21
|
-
`/api/v1/projects/${encodeURIComponent(params.projectId)}/analytics/dashboard-widgets/${encodeURIComponent(params.widgetId)}`
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
async function updateDashboardWidget(params) {
|
|
25
|
-
const { projectId, widgetId, ...data } = params;
|
|
26
|
-
return makeRequest(
|
|
27
|
-
"PATCH",
|
|
28
|
-
`/api/v1/projects/${encodeURIComponent(projectId)}/analytics/dashboard-widgets/${encodeURIComponent(widgetId)}`,
|
|
29
|
-
data
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
async function assignDashboardWidgetToDashboard(params) {
|
|
33
|
-
return makeRequest(
|
|
34
|
-
"POST",
|
|
35
|
-
`/api/v1/projects/${encodeURIComponent(params.projectId)}/analytics/dashboard-widgets/${encodeURIComponent(params.widgetId)}/dashboard`,
|
|
36
|
-
{ dashboardId: params.dashboardId }
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
async function deleteDashboardWidget(params) {
|
|
40
|
-
await makeRequest(
|
|
41
|
-
"DELETE",
|
|
42
|
-
`/api/v1/projects/${encodeURIComponent(params.projectId)}/analytics/dashboard-widgets/${encodeURIComponent(params.widgetId)}`
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// src/tools/dashboard-exists.ts
|
|
47
|
-
async function assertDashboardExists({
|
|
48
|
-
projectId,
|
|
49
|
-
dashboardId
|
|
50
|
-
}) {
|
|
51
|
-
try {
|
|
52
|
-
await getBoard({ projectId, boardId: dashboardId });
|
|
53
|
-
} catch (error) {
|
|
54
|
-
if (error instanceof LangWatchApiError && error.status === 404) {
|
|
55
|
-
throw new Error(
|
|
56
|
-
`No dashboard with ID "${dashboardId}" was found in this project. Use list_dashboard_boards to find a valid dashboard ID.`
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
throw error;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// src/tools/dashboard-widget-queries.ts
|
|
64
|
-
var MAX_DASHBOARD_WIDGET_QUERIES = 8;
|
|
65
|
-
function normalizeDashboardWidgetQueries({
|
|
66
|
-
queries
|
|
67
|
-
}) {
|
|
68
|
-
const normalized = Array.isArray(queries) ? queries : Object.entries(queries).map(([name, sql]) => ({ name, sql }));
|
|
69
|
-
if (normalized.length === 0) {
|
|
70
|
-
throw new Error(
|
|
71
|
-
"Provide at least one named LWQL query in `queries`. Validate each query's SQL first with run_query."
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
if (normalized.length > MAX_DASHBOARD_WIDGET_QUERIES) {
|
|
75
|
-
throw new Error(
|
|
76
|
-
`A widget may declare at most ${MAX_DASHBOARD_WIDGET_QUERIES} queries, got ${normalized.length}.`
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
return normalized;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export {
|
|
83
|
-
createDashboardWidget,
|
|
84
|
-
getDashboardWidget,
|
|
85
|
-
updateDashboardWidget,
|
|
86
|
-
assignDashboardWidgetToDashboard,
|
|
87
|
-
deleteDashboardWidget,
|
|
88
|
-
assertDashboardExists,
|
|
89
|
-
normalizeDashboardWidgetQueries
|
|
90
|
-
};
|
|
91
|
-
//# sourceMappingURL=chunk-5FNCQRCX.js.map
|
package/dist/chunk-ILZDO25L.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
makeRequest
|
|
3
|
-
} from "./chunk-UWLE5T2F.js";
|
|
4
|
-
|
|
5
|
-
// src/langwatch-api-dashboards.ts
|
|
6
|
-
async function listDashboards() {
|
|
7
|
-
return makeRequest("GET", "/api/v1/dashboards");
|
|
8
|
-
}
|
|
9
|
-
async function getDashboard(id) {
|
|
10
|
-
return makeRequest(
|
|
11
|
-
"GET",
|
|
12
|
-
`/api/v1/dashboards/${encodeURIComponent(id)}`
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
async function createDashboard(data) {
|
|
16
|
-
return makeRequest("POST", "/api/v1/dashboards", data);
|
|
17
|
-
}
|
|
18
|
-
async function renameDashboard(id, data) {
|
|
19
|
-
return makeRequest(
|
|
20
|
-
"PATCH",
|
|
21
|
-
`/api/v1/dashboards/${encodeURIComponent(id)}`,
|
|
22
|
-
data
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
async function deleteDashboard(id) {
|
|
26
|
-
return makeRequest("DELETE", `/api/v1/dashboards/${encodeURIComponent(id)}`);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
listDashboards,
|
|
31
|
-
getDashboard,
|
|
32
|
-
createDashboard,
|
|
33
|
-
renameDashboard,
|
|
34
|
-
deleteDashboard
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=chunk-ILZDO25L.js.map
|
package/dist/chunk-K2I7Z3LZ.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
makeRequest
|
|
3
|
-
} from "./chunk-UWLE5T2F.js";
|
|
4
|
-
|
|
5
|
-
// src/langwatch-api-boards.ts
|
|
6
|
-
async function listBoards({
|
|
7
|
-
projectId
|
|
8
|
-
}) {
|
|
9
|
-
return makeRequest(
|
|
10
|
-
"GET",
|
|
11
|
-
`/api/v1/projects/${encodeURIComponent(projectId)}/analytics/boards`
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
async function getBoard({
|
|
15
|
-
projectId,
|
|
16
|
-
boardId
|
|
17
|
-
}) {
|
|
18
|
-
return makeRequest(
|
|
19
|
-
"GET",
|
|
20
|
-
`/api/v1/projects/${encodeURIComponent(projectId)}/analytics/boards/${encodeURIComponent(boardId)}`
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export {
|
|
25
|
-
listBoards,
|
|
26
|
-
getBoard
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=chunk-K2I7Z3LZ.js.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createDashboard
|
|
3
|
-
} from "./chunk-ILZDO25L.js";
|
|
4
|
-
import "./chunk-UWLE5T2F.js";
|
|
5
|
-
import "./chunk-H6WGMG2T.js";
|
|
6
|
-
|
|
7
|
-
// src/tools/create-dashboard.ts
|
|
8
|
-
async function handleCreateDashboard(params) {
|
|
9
|
-
const dashboard = await createDashboard({ name: params.name });
|
|
10
|
-
return `Dashboard created successfully!
|
|
11
|
-
|
|
12
|
-
**Name**: ${dashboard.name}
|
|
13
|
-
**ID**: ${dashboard.id}`;
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
handleCreateDashboard
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=create-dashboard-DHVFMEU4.js.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createDashboard
|
|
3
|
-
} from "./chunk-ILZDO25L.js";
|
|
4
|
-
import "./chunk-UWLE5T2F.js";
|
|
5
|
-
import "./chunk-H6WGMG2T.js";
|
|
6
|
-
import "./chunk-SAS5OB7F.js";
|
|
7
|
-
|
|
8
|
-
// src/tools/create-dashboard.ts
|
|
9
|
-
async function handleCreateDashboard(params) {
|
|
10
|
-
const dashboard = await createDashboard({ name: params.name });
|
|
11
|
-
return `Dashboard created successfully!
|
|
12
|
-
|
|
13
|
-
**Name**: ${dashboard.name}
|
|
14
|
-
**ID**: ${dashboard.id}`;
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
handleCreateDashboard
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=create-dashboard-WTKKS5Z6.js.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
deleteDashboard
|
|
3
|
-
} from "./chunk-ILZDO25L.js";
|
|
4
|
-
import "./chunk-UWLE5T2F.js";
|
|
5
|
-
import "./chunk-H6WGMG2T.js";
|
|
6
|
-
|
|
7
|
-
// src/tools/delete-dashboard.ts
|
|
8
|
-
async function handleDeleteDashboard(params) {
|
|
9
|
-
const result = await deleteDashboard(params.id);
|
|
10
|
-
return `Dashboard deleted successfully!
|
|
11
|
-
|
|
12
|
-
**Name**: ${result.name}
|
|
13
|
-
**ID**: ${result.id}`;
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
handleDeleteDashboard
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=delete-dashboard-76N66XXL.js.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
deleteDashboard
|
|
3
|
-
} from "./chunk-ILZDO25L.js";
|
|
4
|
-
import "./chunk-UWLE5T2F.js";
|
|
5
|
-
import "./chunk-H6WGMG2T.js";
|
|
6
|
-
import "./chunk-SAS5OB7F.js";
|
|
7
|
-
|
|
8
|
-
// src/tools/delete-dashboard.ts
|
|
9
|
-
async function handleDeleteDashboard(params) {
|
|
10
|
-
const result = await deleteDashboard(params.id);
|
|
11
|
-
return `Dashboard deleted successfully!
|
|
12
|
-
|
|
13
|
-
**Name**: ${result.name}
|
|
14
|
-
**ID**: ${result.id}`;
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
handleDeleteDashboard
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=delete-dashboard-JVIVHNJM.js.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getDashboard
|
|
3
|
-
} from "./chunk-ILZDO25L.js";
|
|
4
|
-
import "./chunk-UWLE5T2F.js";
|
|
5
|
-
import "./chunk-H6WGMG2T.js";
|
|
6
|
-
|
|
7
|
-
// src/tools/get-dashboard.ts
|
|
8
|
-
async function handleGetDashboard(params) {
|
|
9
|
-
const dashboard = await getDashboard(params.id);
|
|
10
|
-
const lines = [];
|
|
11
|
-
lines.push(`# ${dashboard.name}
|
|
12
|
-
`);
|
|
13
|
-
lines.push(`**ID**: ${dashboard.id}`);
|
|
14
|
-
lines.push(`**Order**: ${dashboard.order}`);
|
|
15
|
-
lines.push(`**Graphs**: ${Array.isArray(dashboard.graphs) ? dashboard.graphs.length : 0}`);
|
|
16
|
-
lines.push(`**Created**: ${dashboard.createdAt}`);
|
|
17
|
-
lines.push(`**Updated**: ${dashboard.updatedAt}`);
|
|
18
|
-
if (Array.isArray(dashboard.graphs) && dashboard.graphs.length > 0) {
|
|
19
|
-
lines.push("\n## Graphs\n");
|
|
20
|
-
lines.push("```json");
|
|
21
|
-
lines.push(JSON.stringify(dashboard.graphs, null, 2));
|
|
22
|
-
lines.push("```");
|
|
23
|
-
}
|
|
24
|
-
return lines.join("\n");
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
handleGetDashboard
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=get-dashboard-5NYJEIX2.js.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getDashboard
|
|
3
|
-
} from "./chunk-ILZDO25L.js";
|
|
4
|
-
import "./chunk-UWLE5T2F.js";
|
|
5
|
-
import "./chunk-H6WGMG2T.js";
|
|
6
|
-
import "./chunk-SAS5OB7F.js";
|
|
7
|
-
|
|
8
|
-
// src/tools/get-dashboard.ts
|
|
9
|
-
async function handleGetDashboard(params) {
|
|
10
|
-
const dashboard = await getDashboard(params.id);
|
|
11
|
-
const lines = [];
|
|
12
|
-
lines.push(`# ${dashboard.name}
|
|
13
|
-
`);
|
|
14
|
-
lines.push(`**ID**: ${dashboard.id}`);
|
|
15
|
-
lines.push(`**Order**: ${dashboard.order}`);
|
|
16
|
-
lines.push(`**Graphs**: ${Array.isArray(dashboard.graphs) ? dashboard.graphs.length : 0}`);
|
|
17
|
-
lines.push(`**Created**: ${dashboard.createdAt}`);
|
|
18
|
-
lines.push(`**Updated**: ${dashboard.updatedAt}`);
|
|
19
|
-
if (Array.isArray(dashboard.graphs) && dashboard.graphs.length > 0) {
|
|
20
|
-
lines.push("\n## Graphs\n");
|
|
21
|
-
lines.push("```json");
|
|
22
|
-
lines.push(JSON.stringify(dashboard.graphs, null, 2));
|
|
23
|
-
lines.push("```");
|
|
24
|
-
}
|
|
25
|
-
return lines.join("\n");
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
handleGetDashboard
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=get-dashboard-QMTYDQAZ.js.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createDashboard,
|
|
3
|
-
deleteDashboard,
|
|
4
|
-
getDashboard,
|
|
5
|
-
listDashboards,
|
|
6
|
-
renameDashboard
|
|
7
|
-
} from "./chunk-ILZDO25L.js";
|
|
8
|
-
import "./chunk-UWLE5T2F.js";
|
|
9
|
-
import "./chunk-H6WGMG2T.js";
|
|
10
|
-
export {
|
|
11
|
-
createDashboard,
|
|
12
|
-
deleteDashboard,
|
|
13
|
-
getDashboard,
|
|
14
|
-
listDashboards,
|
|
15
|
-
renameDashboard
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=langwatch-api-dashboards-6EO2VVZW.js.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createDashboard,
|
|
3
|
-
deleteDashboard,
|
|
4
|
-
getDashboard,
|
|
5
|
-
listDashboards,
|
|
6
|
-
renameDashboard
|
|
7
|
-
} from "./chunk-ILZDO25L.js";
|
|
8
|
-
import "./chunk-UWLE5T2F.js";
|
|
9
|
-
import "./chunk-H6WGMG2T.js";
|
|
10
|
-
import "./chunk-SAS5OB7F.js";
|
|
11
|
-
export {
|
|
12
|
-
createDashboard,
|
|
13
|
-
deleteDashboard,
|
|
14
|
-
getDashboard,
|
|
15
|
-
listDashboards,
|
|
16
|
-
renameDashboard
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=langwatch-api-dashboards-NHU5BZD7.js.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
deleteWorkflow,
|
|
3
|
-
getWorkflow,
|
|
4
|
-
listWorkflows,
|
|
5
|
-
runWorkflow
|
|
6
|
-
} from "./chunk-NKMTIHIJ.js";
|
|
7
|
-
import "./chunk-UWLE5T2F.js";
|
|
8
|
-
import "./chunk-H6WGMG2T.js";
|
|
9
|
-
export {
|
|
10
|
-
deleteWorkflow,
|
|
11
|
-
getWorkflow,
|
|
12
|
-
listWorkflows,
|
|
13
|
-
runWorkflow
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=langwatch-api-workflows-XGJE6SR5.js.map
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
listBoards
|
|
3
|
-
} from "./chunk-K2I7Z3LZ.js";
|
|
4
|
-
import {
|
|
5
|
-
getCurrentProject
|
|
6
|
-
} from "./chunk-B4J3PJLX.js";
|
|
7
|
-
import "./chunk-UWLE5T2F.js";
|
|
8
|
-
import "./chunk-H6WGMG2T.js";
|
|
9
|
-
|
|
10
|
-
// src/tools/list-dashboard-boards.ts
|
|
11
|
-
async function handleListDashboardBoards() {
|
|
12
|
-
const project = await getCurrentProject();
|
|
13
|
-
const { data: boards } = await listBoards({ projectId: project.id });
|
|
14
|
-
if (boards.length === 0) {
|
|
15
|
-
return "No dashboards found in this project. Create one in the Dashboards area first.";
|
|
16
|
-
}
|
|
17
|
-
return [
|
|
18
|
-
`# Dashboards (${boards.length} total)
|
|
19
|
-
`,
|
|
20
|
-
...boards.flatMap((board) => [
|
|
21
|
-
`## ${board.name}`,
|
|
22
|
-
`**ID**: ${board.id}`,
|
|
23
|
-
`**Widgets**: ${board.widgetCount}`,
|
|
24
|
-
`**URL**: ${board.platformUrl}`,
|
|
25
|
-
""
|
|
26
|
-
]),
|
|
27
|
-
"> Pass the ID to `add_dashboard_widget` to add a widget to that dashboard."
|
|
28
|
-
].join("\n");
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
handleListDashboardBoards
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=list-dashboard-boards-OPWROHMG.js.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
listBoards
|
|
3
|
-
} from "./chunk-K2I7Z3LZ.js";
|
|
4
|
-
import {
|
|
5
|
-
getCurrentProject
|
|
6
|
-
} from "./chunk-B4J3PJLX.js";
|
|
7
|
-
import "./chunk-UWLE5T2F.js";
|
|
8
|
-
import "./chunk-H6WGMG2T.js";
|
|
9
|
-
import "./chunk-SAS5OB7F.js";
|
|
10
|
-
|
|
11
|
-
// src/tools/list-dashboard-boards.ts
|
|
12
|
-
async function handleListDashboardBoards() {
|
|
13
|
-
const project = await getCurrentProject();
|
|
14
|
-
const { data: boards } = await listBoards({ projectId: project.id });
|
|
15
|
-
if (boards.length === 0) {
|
|
16
|
-
return "No dashboards found in this project. Create one in the Dashboards area first.";
|
|
17
|
-
}
|
|
18
|
-
return [
|
|
19
|
-
`# Dashboards (${boards.length} total)
|
|
20
|
-
`,
|
|
21
|
-
...boards.flatMap((board) => [
|
|
22
|
-
`## ${board.name}`,
|
|
23
|
-
`**ID**: ${board.id}`,
|
|
24
|
-
`**Widgets**: ${board.widgetCount}`,
|
|
25
|
-
`**URL**: ${board.platformUrl}`,
|
|
26
|
-
""
|
|
27
|
-
]),
|
|
28
|
-
"> Pass the ID to `add_dashboard_widget` to add a widget to that dashboard."
|
|
29
|
-
].join("\n");
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
handleListDashboardBoards
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=list-dashboard-boards-U2GJ7GC5.js.map
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
listDashboards
|
|
3
|
-
} from "./chunk-ILZDO25L.js";
|
|
4
|
-
import "./chunk-UWLE5T2F.js";
|
|
5
|
-
import "./chunk-H6WGMG2T.js";
|
|
6
|
-
import "./chunk-SAS5OB7F.js";
|
|
7
|
-
|
|
8
|
-
// src/tools/list-dashboards.ts
|
|
9
|
-
async function handleListDashboards() {
|
|
10
|
-
const result = await listDashboards();
|
|
11
|
-
const dashboards = result.data;
|
|
12
|
-
if (!Array.isArray(dashboards) || dashboards.length === 0) {
|
|
13
|
-
return "No dashboards found in this project.\n\n> Tip: Use `platform_create_dashboard` to create a new dashboard.";
|
|
14
|
-
}
|
|
15
|
-
const lines = [];
|
|
16
|
-
lines.push(`# Dashboards (${dashboards.length} total)
|
|
17
|
-
`);
|
|
18
|
-
for (const d of dashboards) {
|
|
19
|
-
lines.push(`## ${d.name}`);
|
|
20
|
-
lines.push(`**ID**: ${d.id}`);
|
|
21
|
-
lines.push(`**Graphs**: ${d.graphCount}`);
|
|
22
|
-
lines.push(`**Updated**: ${d.updatedAt}`);
|
|
23
|
-
lines.push("");
|
|
24
|
-
}
|
|
25
|
-
lines.push(
|
|
26
|
-
"> Use `platform_get_dashboard` with the ID to see dashboard details including graphs."
|
|
27
|
-
);
|
|
28
|
-
return lines.join("\n");
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
handleListDashboards
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=list-dashboards-ROSYFLDQ.js.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
listDashboards
|
|
3
|
-
} from "./chunk-ILZDO25L.js";
|
|
4
|
-
import "./chunk-UWLE5T2F.js";
|
|
5
|
-
import "./chunk-H6WGMG2T.js";
|
|
6
|
-
|
|
7
|
-
// src/tools/list-dashboards.ts
|
|
8
|
-
async function handleListDashboards() {
|
|
9
|
-
const result = await listDashboards();
|
|
10
|
-
const dashboards = result.data;
|
|
11
|
-
if (!Array.isArray(dashboards) || dashboards.length === 0) {
|
|
12
|
-
return "No dashboards found in this project.\n\n> Tip: Use `platform_create_dashboard` to create a new dashboard.";
|
|
13
|
-
}
|
|
14
|
-
const lines = [];
|
|
15
|
-
lines.push(`# Dashboards (${dashboards.length} total)
|
|
16
|
-
`);
|
|
17
|
-
for (const d of dashboards) {
|
|
18
|
-
lines.push(`## ${d.name}`);
|
|
19
|
-
lines.push(`**ID**: ${d.id}`);
|
|
20
|
-
lines.push(`**Graphs**: ${d.graphCount}`);
|
|
21
|
-
lines.push(`**Updated**: ${d.updatedAt}`);
|
|
22
|
-
lines.push("");
|
|
23
|
-
}
|
|
24
|
-
lines.push(
|
|
25
|
-
"> Use `platform_get_dashboard` with the ID to see dashboard details including graphs."
|
|
26
|
-
);
|
|
27
|
-
return lines.join("\n");
|
|
28
|
-
}
|
|
29
|
-
export {
|
|
30
|
-
handleListDashboards
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=list-dashboards-RQ635ZU7.js.map
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
assertDashboardExists,
|
|
3
|
-
getDashboardWidget,
|
|
4
|
-
normalizeDashboardWidgetQueries,
|
|
5
|
-
updateDashboardWidget
|
|
6
|
-
} from "./chunk-5FNCQRCX.js";
|
|
7
|
-
import "./chunk-K2I7Z3LZ.js";
|
|
8
|
-
import {
|
|
9
|
-
getCurrentProject
|
|
10
|
-
} from "./chunk-B4J3PJLX.js";
|
|
11
|
-
import {
|
|
12
|
-
LangWatchApiError
|
|
13
|
-
} from "./chunk-UWLE5T2F.js";
|
|
14
|
-
import "./chunk-H6WGMG2T.js";
|
|
15
|
-
import "./chunk-SAS5OB7F.js";
|
|
16
|
-
|
|
17
|
-
// src/tools/update-dashboard-widget.ts
|
|
18
|
-
async function handleUpdateDashboardWidget(params) {
|
|
19
|
-
const { dashboardId, widgetId, name, code, description } = params;
|
|
20
|
-
if (name === void 0 && code === void 0 && params.queries === void 0 && description === void 0) {
|
|
21
|
-
throw new Error("Provide at least one of name, code, queries or description to change.");
|
|
22
|
-
}
|
|
23
|
-
const queries = params.queries === void 0 ? void 0 : normalizeDashboardWidgetQueries({ queries: params.queries });
|
|
24
|
-
const project = await getCurrentProject();
|
|
25
|
-
await assertDashboardExists({ projectId: project.id, dashboardId });
|
|
26
|
-
const current = await getWidgetOnDashboard({ projectId: project.id, widgetId, dashboardId });
|
|
27
|
-
const widget = await updateDashboardWidget({
|
|
28
|
-
projectId: project.id,
|
|
29
|
-
widgetId: current.id,
|
|
30
|
-
...name === void 0 ? {} : { name },
|
|
31
|
-
...code === void 0 ? {} : { code },
|
|
32
|
-
...queries === void 0 ? {} : { queries },
|
|
33
|
-
...description === void 0 ? {} : { description }
|
|
34
|
-
});
|
|
35
|
-
return [
|
|
36
|
-
`Widget "${widget.name}" updated on dashboard "${dashboardId}".`,
|
|
37
|
-
`**Widget ID**: ${widget.id}`,
|
|
38
|
-
`**Queries**: ${widget.definition.queries.map((query) => query.name).join(", ") || "(none)"}`,
|
|
39
|
-
"",
|
|
40
|
-
"```json",
|
|
41
|
-
JSON.stringify(widget, null, 2),
|
|
42
|
-
"```"
|
|
43
|
-
].join("\n");
|
|
44
|
-
}
|
|
45
|
-
async function getWidgetOnDashboard({
|
|
46
|
-
projectId,
|
|
47
|
-
widgetId,
|
|
48
|
-
dashboardId
|
|
49
|
-
}) {
|
|
50
|
-
let widget;
|
|
51
|
-
try {
|
|
52
|
-
widget = await getDashboardWidget({ projectId, widgetId });
|
|
53
|
-
} catch (error) {
|
|
54
|
-
if (error instanceof LangWatchApiError && error.status === 404) {
|
|
55
|
-
throw new Error(
|
|
56
|
-
`No widget with ID "${widgetId}" was found in this project. Use the widget ID add_dashboard_widget returned.`
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
throw error;
|
|
60
|
-
}
|
|
61
|
-
if (widget.dashboardId !== dashboardId) {
|
|
62
|
-
throw new Error(
|
|
63
|
-
`Widget "${widgetId}" is not on dashboard "${dashboardId}". Pass the dashboard the widget was added to.`
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
return widget;
|
|
67
|
-
}
|
|
68
|
-
export {
|
|
69
|
-
handleUpdateDashboardWidget
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=update-dashboard-widget-CJKJLCDY.js.map
|