@langwatch/server 3.1.0-beta.5 → 3.1.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/langwatch/package.json +1 -1
  2. package/langwatch/pnpm-workspace.yaml +0 -1
  3. package/mcp-server/.env.example +2 -0
  4. package/mcp-server/.eslintrc.cjs +36 -0
  5. package/mcp-server/CHANGELOG.md +165 -0
  6. package/mcp-server/CONTRIBUTING.md +96 -0
  7. package/mcp-server/README.md +172 -0
  8. package/mcp-server/dist/archive-scenario-WJ2A7ETN.js +19 -0
  9. package/mcp-server/dist/archive-suite-4JOM4SSL.js +15 -0
  10. package/mcp-server/dist/assign-prompt-tag-GL7EAAF3.js +19 -0
  11. package/mcp-server/dist/chunk-2GT7IFWK.js +40 -0
  12. package/mcp-server/dist/chunk-2WPLXEKF.js +127 -0
  13. package/mcp-server/dist/chunk-4AUB2BIA.js +71 -0
  14. package/mcp-server/dist/chunk-BWWY5KEF.js +71 -0
  15. package/mcp-server/dist/chunk-CCWCIJJ3.js +22 -0
  16. package/mcp-server/dist/chunk-EGH5RPXM.js +25 -0
  17. package/mcp-server/dist/chunk-EUQDVOSU.js +39 -0
  18. package/mcp-server/dist/chunk-HYMIWO3U.js +44 -0
  19. package/mcp-server/dist/chunk-IE4M5OGE.js +42 -0
  20. package/mcp-server/dist/chunk-LUMEZEHL.js +48 -0
  21. package/mcp-server/dist/chunk-NUFPTHKU.js +9 -0
  22. package/mcp-server/dist/chunk-UDHJYT6P.js +1567 -0
  23. package/mcp-server/dist/chunk-WQG2DFHX.js +86 -0
  24. package/mcp-server/dist/chunk-WVI5CJ6S.js +21 -0
  25. package/mcp-server/dist/chunk-ZVS4UKN2.js +35 -0
  26. package/mcp-server/dist/chunk-ZXKLPC2E.js +27 -0
  27. package/mcp-server/dist/config.d.ts +17 -0
  28. package/mcp-server/dist/config.js +13 -0
  29. package/mcp-server/dist/create-agent-MBOOT3XK.js +23 -0
  30. package/mcp-server/dist/create-annotation-XMV6A7ED.js +24 -0
  31. package/mcp-server/dist/create-dashboard-VRKLFVZJ.js +18 -0
  32. package/mcp-server/dist/create-dataset-7HQPZCRE.js +22 -0
  33. package/mcp-server/dist/create-dataset-records-2NIVFYTV.js +22 -0
  34. package/mcp-server/dist/create-evaluator-WYFRFLRC.js +27 -0
  35. package/mcp-server/dist/create-mcp-server.d.ts +8 -0
  36. package/mcp-server/dist/create-mcp-server.js +8 -0
  37. package/mcp-server/dist/create-prompt-IEN7O6JT.js +39 -0
  38. package/mcp-server/dist/create-prompt-tag-CAEZ45VO.js +17 -0
  39. package/mcp-server/dist/create-scenario-6YHSMGLP.js +26 -0
  40. package/mcp-server/dist/create-suite-H5XOFDE5.js +38 -0
  41. package/mcp-server/dist/delete-agent-JKTNBWAA.js +18 -0
  42. package/mcp-server/dist/delete-annotation-ACMDV6QO.js +17 -0
  43. package/mcp-server/dist/delete-dashboard-VJSR7CRU.js +18 -0
  44. package/mcp-server/dist/delete-dataset-RTTTWP4D.js +20 -0
  45. package/mcp-server/dist/delete-dataset-records-KNQTIPQK.js +21 -0
  46. package/mcp-server/dist/delete-evaluator-7FVC5WM4.js +15 -0
  47. package/mcp-server/dist/delete-prompt-tag-ZMZUAGFW.js +17 -0
  48. package/mcp-server/dist/delete-workflow-EYQ3T4RQ.js +17 -0
  49. package/mcp-server/dist/discover-evaluator-schema-H23XCLNE.js +1402 -0
  50. package/mcp-server/dist/discover-scenario-schema-MEEEVND7.js +65 -0
  51. package/mcp-server/dist/discover-schema-3T52ORPB.js +446 -0
  52. package/mcp-server/dist/get-agent-E3QSTVKG.js +28 -0
  53. package/mcp-server/dist/get-analytics-2OHV763I.js +72 -0
  54. package/mcp-server/dist/get-dashboard-PC7JDHH6.js +29 -0
  55. package/mcp-server/dist/get-dataset-H5IK5FVU.js +48 -0
  56. package/mcp-server/dist/get-evaluator-UWVUPYTM.js +47 -0
  57. package/mcp-server/dist/get-prompt-WZUOLLQC.js +45 -0
  58. package/mcp-server/dist/get-scenario-Q6LCNUYN.js +33 -0
  59. package/mcp-server/dist/get-simulation-run-Z2XKO256.js +56 -0
  60. package/mcp-server/dist/get-suite-BXK5TN7P.js +44 -0
  61. package/mcp-server/dist/get-trace-4EJAYVBG.js +50 -0
  62. package/mcp-server/dist/get-workflow-O34QJLHD.js +25 -0
  63. package/mcp-server/dist/http-server-RSTXN4CN.js +224 -0
  64. package/mcp-server/dist/index.d.ts +2 -0
  65. package/mcp-server/dist/index.js +67774 -0
  66. package/mcp-server/dist/langwatch-api-annotations-ERBG27RF.js +17 -0
  67. package/mcp-server/dist/langwatch-api-dashboards-G6TR7VVO.js +17 -0
  68. package/mcp-server/dist/langwatch-api-monitors-WSXZLS2B.js +52 -0
  69. package/mcp-server/dist/langwatch-api-secrets-RR5DKG2X.js +40 -0
  70. package/mcp-server/dist/langwatch-api-triggers-2RTNSWQY.js +30 -0
  71. package/mcp-server/dist/langwatch-api-workflows-VJRIIDZ7.js +15 -0
  72. package/mcp-server/dist/list-agents-AW3P6FJV.js +32 -0
  73. package/mcp-server/dist/list-annotations-QNCGWPQ3.js +33 -0
  74. package/mcp-server/dist/list-dashboards-R7RK2IXL.js +32 -0
  75. package/mcp-server/dist/list-dataset-records-WVCSQP7P.js +39 -0
  76. package/mcp-server/dist/list-datasets-KEXRLDEU.js +60 -0
  77. package/mcp-server/dist/list-evaluators-7R2LB4JH.js +34 -0
  78. package/mcp-server/dist/list-model-providers-OBYJCKBX.js +35 -0
  79. package/mcp-server/dist/list-prompt-tags-6LY3ZPYI.js +23 -0
  80. package/mcp-server/dist/list-prompts-VWEZ4CDE.js +32 -0
  81. package/mcp-server/dist/list-scenarios-TXD4W2ZJ.js +40 -0
  82. package/mcp-server/dist/list-simulation-runs-RHPOLMFI.js +43 -0
  83. package/mcp-server/dist/list-suites-FSGBX27Z.js +42 -0
  84. package/mcp-server/dist/list-workflows-VRGEZ3EN.js +35 -0
  85. package/mcp-server/dist/rename-prompt-tag-VOJJLX4M.js +18 -0
  86. package/mcp-server/dist/run-agent-KTCC7TB7.js +36 -0
  87. package/mcp-server/dist/run-evaluation-2X3V3Q6L.js +64 -0
  88. package/mcp-server/dist/run-suite-BTMHGI2D.js +29 -0
  89. package/mcp-server/dist/run-workflow-IGAYGKJL.js +36 -0
  90. package/mcp-server/dist/search-traces-VYFUIMXH.js +72 -0
  91. package/mcp-server/dist/set-model-provider-W5IUI326.js +33 -0
  92. package/mcp-server/dist/update-agent-4BB7EYLR.js +20 -0
  93. package/mcp-server/dist/update-dataset-CXBKZ4W3.js +22 -0
  94. package/mcp-server/dist/update-dataset-record-HOHAMHXG.js +19 -0
  95. package/mcp-server/dist/update-evaluator-IVOR6FTR.js +24 -0
  96. package/mcp-server/dist/update-prompt-OWQAKE7K.js +24 -0
  97. package/mcp-server/dist/update-scenario-GDFVILPN.js +27 -0
  98. package/mcp-server/dist/update-suite-BXYUYSPT.js +39 -0
  99. package/mcp-server/package.json +79 -0
  100. package/mcp-server/pnpm-lock.yaml +6103 -0
  101. package/mcp-server/pnpm-workspace.yaml +2 -0
  102. package/mcp-server/pyproject.toml +17 -0
  103. package/mcp-server/src/__tests__/all-tools.integration.test.ts +1681 -0
  104. package/mcp-server/src/__tests__/config.unit.test.ts +169 -0
  105. package/mcp-server/src/__tests__/datasets.integration.test.ts +603 -0
  106. package/mcp-server/src/__tests__/datasets.unit.test.ts +240 -0
  107. package/mcp-server/src/__tests__/date-parsing.unit.test.ts +78 -0
  108. package/mcp-server/src/__tests__/discover-evaluator-schema.unit.test.ts +89 -0
  109. package/mcp-server/src/__tests__/discover-schema.unit.test.ts +118 -0
  110. package/mcp-server/src/__tests__/docker.integration.test.ts +234 -0
  111. package/mcp-server/src/__tests__/evaluator-tools.unit.test.ts +262 -0
  112. package/mcp-server/src/__tests__/http-transport.integration.test.ts +397 -0
  113. package/mcp-server/src/__tests__/integration.integration.test.ts +288 -0
  114. package/mcp-server/src/__tests__/langwatch-api.unit.test.ts +455 -0
  115. package/mcp-server/src/__tests__/model-provider-tools.unit.test.ts +190 -0
  116. package/mcp-server/src/__tests__/scenario-tools.integration.test.ts +286 -0
  117. package/mcp-server/src/__tests__/scenario-tools.unit.test.ts +185 -0
  118. package/mcp-server/src/__tests__/schemas.unit.test.ts +85 -0
  119. package/mcp-server/src/__tests__/tools.unit.test.ts +900 -0
  120. package/mcp-server/src/config.d.ts +15 -0
  121. package/mcp-server/src/config.ts +107 -0
  122. package/mcp-server/src/create-mcp-server.d.ts +6 -0
  123. package/mcp-server/src/create-mcp-server.ts +1799 -0
  124. package/mcp-server/src/http-server.ts +329 -0
  125. package/mcp-server/src/index.ts +46 -0
  126. package/mcp-server/src/langwatch-api-agents.ts +108 -0
  127. package/mcp-server/src/langwatch-api-annotations.ts +49 -0
  128. package/mcp-server/src/langwatch-api-dashboards.ts +48 -0
  129. package/mcp-server/src/langwatch-api-datasets.ts +191 -0
  130. package/mcp-server/src/langwatch-api-evaluators.ts +80 -0
  131. package/mcp-server/src/langwatch-api-model-providers.ts +41 -0
  132. package/mcp-server/src/langwatch-api-monitors.ts +82 -0
  133. package/mcp-server/src/langwatch-api-scenarios.ts +67 -0
  134. package/mcp-server/src/langwatch-api-secrets.ts +48 -0
  135. package/mcp-server/src/langwatch-api-simulation-runs.ts +51 -0
  136. package/mcp-server/src/langwatch-api-suites.ts +118 -0
  137. package/mcp-server/src/langwatch-api-triggers.ts +48 -0
  138. package/mcp-server/src/langwatch-api-workflows.ts +41 -0
  139. package/mcp-server/src/langwatch-api.ts +299 -0
  140. package/mcp-server/src/schemas/analytics-groups.ts +78 -0
  141. package/mcp-server/src/schemas/analytics-metrics.ts +179 -0
  142. package/mcp-server/src/schemas/create-dataset.ts +48 -0
  143. package/mcp-server/src/schemas/filter-fields.ts +119 -0
  144. package/mcp-server/src/schemas/index.ts +4 -0
  145. package/mcp-server/src/tools/archive-scenario.ts +19 -0
  146. package/mcp-server/src/tools/archive-suite.ts +12 -0
  147. package/mcp-server/src/tools/assign-prompt-tag.ts +16 -0
  148. package/mcp-server/src/tools/create-agent.ts +15 -0
  149. package/mcp-server/src/tools/create-annotation.ts +18 -0
  150. package/mcp-server/src/tools/create-dashboard.ts +7 -0
  151. package/mcp-server/src/tools/create-dataset-records.ts +23 -0
  152. package/mcp-server/src/tools/create-dataset.ts +22 -0
  153. package/mcp-server/src/tools/create-evaluator.ts +33 -0
  154. package/mcp-server/src/tools/create-prompt-tag.ts +12 -0
  155. package/mcp-server/src/tools/create-prompt.ts +58 -0
  156. package/mcp-server/src/tools/create-scenario.ts +30 -0
  157. package/mcp-server/src/tools/create-suite.ts +42 -0
  158. package/mcp-server/src/tools/delete-agent.ts +7 -0
  159. package/mcp-server/src/tools/delete-annotation.ts +7 -0
  160. package/mcp-server/src/tools/delete-dashboard.ts +7 -0
  161. package/mcp-server/src/tools/delete-dataset-records.ts +22 -0
  162. package/mcp-server/src/tools/delete-dataset.ts +20 -0
  163. package/mcp-server/src/tools/delete-evaluator.ts +12 -0
  164. package/mcp-server/src/tools/delete-prompt-tag.ts +12 -0
  165. package/mcp-server/src/tools/delete-workflow.ts +7 -0
  166. package/mcp-server/src/tools/discover-evaluator-schema.ts +143 -0
  167. package/mcp-server/src/tools/discover-scenario-schema.ts +71 -0
  168. package/mcp-server/src/tools/discover-schema.ts +106 -0
  169. package/mcp-server/src/tools/format-dataset-mutation.ts +25 -0
  170. package/mcp-server/src/tools/get-agent.ts +21 -0
  171. package/mcp-server/src/tools/get-analytics.ts +98 -0
  172. package/mcp-server/src/tools/get-dashboard.ts +22 -0
  173. package/mcp-server/src/tools/get-dataset.ts +63 -0
  174. package/mcp-server/src/tools/get-evaluator.ts +53 -0
  175. package/mcp-server/src/tools/get-prompt.ts +54 -0
  176. package/mcp-server/src/tools/get-scenario.ts +36 -0
  177. package/mcp-server/src/tools/get-simulation-run.ts +60 -0
  178. package/mcp-server/src/tools/get-suite.ts +47 -0
  179. package/mcp-server/src/tools/get-trace.ts +61 -0
  180. package/mcp-server/src/tools/get-workflow.ts +17 -0
  181. package/mcp-server/src/tools/list-agents.ts +27 -0
  182. package/mcp-server/src/tools/list-annotations.ts +33 -0
  183. package/mcp-server/src/tools/list-dashboards.ts +27 -0
  184. package/mcp-server/src/tools/list-dataset-records.ts +46 -0
  185. package/mcp-server/src/tools/list-datasets.ts +80 -0
  186. package/mcp-server/src/tools/list-evaluators.ts +37 -0
  187. package/mcp-server/src/tools/list-model-providers.ts +40 -0
  188. package/mcp-server/src/tools/list-prompt-tags.ts +21 -0
  189. package/mcp-server/src/tools/list-prompts.ts +34 -0
  190. package/mcp-server/src/tools/list-scenarios.ts +47 -0
  191. package/mcp-server/src/tools/list-simulation-runs.ts +49 -0
  192. package/mcp-server/src/tools/list-suites.ts +43 -0
  193. package/mcp-server/src/tools/list-workflows.ts +31 -0
  194. package/mcp-server/src/tools/rename-prompt-tag.ts +14 -0
  195. package/mcp-server/src/tools/run-agent.ts +36 -0
  196. package/mcp-server/src/tools/run-evaluation.ts +87 -0
  197. package/mcp-server/src/tools/run-suite.ts +28 -0
  198. package/mcp-server/src/tools/run-workflow.ts +36 -0
  199. package/mcp-server/src/tools/search-traces.ts +91 -0
  200. package/mcp-server/src/tools/set-model-provider.ts +46 -0
  201. package/mcp-server/src/tools/update-agent.ts +13 -0
  202. package/mcp-server/src/tools/update-dataset-record.ts +21 -0
  203. package/mcp-server/src/tools/update-dataset.ts +23 -0
  204. package/mcp-server/src/tools/update-evaluator.ts +30 -0
  205. package/mcp-server/src/tools/update-prompt.ts +31 -0
  206. package/mcp-server/src/tools/update-scenario.ts +32 -0
  207. package/mcp-server/src/tools/update-suite.ts +44 -0
  208. package/mcp-server/src/utils/date-parsing.ts +31 -0
  209. package/mcp-server/src/utils/escape-markdown.ts +12 -0
  210. package/mcp-server/tsconfig.json +27 -0
  211. package/mcp-server/uv.lock +2731 -0
  212. package/package.json +2 -1
  213. package/packages/server/dist/cli.cjs +6 -2
@@ -0,0 +1,17 @@
1
+ import {
2
+ createAnnotation,
3
+ deleteAnnotation,
4
+ getAnnotation,
5
+ getAnnotationsByTrace,
6
+ listAnnotations
7
+ } from "./chunk-IE4M5OGE.js";
8
+ import "./chunk-2WPLXEKF.js";
9
+ import "./chunk-BWWY5KEF.js";
10
+ export {
11
+ createAnnotation,
12
+ deleteAnnotation,
13
+ getAnnotation,
14
+ getAnnotationsByTrace,
15
+ listAnnotations
16
+ };
17
+ //# sourceMappingURL=langwatch-api-annotations-ERBG27RF.js.map
@@ -0,0 +1,17 @@
1
+ import {
2
+ createDashboard,
3
+ deleteDashboard,
4
+ getDashboard,
5
+ listDashboards,
6
+ renameDashboard
7
+ } from "./chunk-EUQDVOSU.js";
8
+ import "./chunk-2WPLXEKF.js";
9
+ import "./chunk-BWWY5KEF.js";
10
+ export {
11
+ createDashboard,
12
+ deleteDashboard,
13
+ getDashboard,
14
+ listDashboards,
15
+ renameDashboard
16
+ };
17
+ //# sourceMappingURL=langwatch-api-dashboards-G6TR7VVO.js.map
@@ -0,0 +1,52 @@
1
+ import {
2
+ makeRequest
3
+ } from "./chunk-2WPLXEKF.js";
4
+ import "./chunk-BWWY5KEF.js";
5
+
6
+ // src/langwatch-api-monitors.ts
7
+ async function listMonitors() {
8
+ return makeRequest("GET", "/api/monitors");
9
+ }
10
+ async function getMonitor(id) {
11
+ return makeRequest(
12
+ "GET",
13
+ `/api/monitors/${encodeURIComponent(id)}`
14
+ );
15
+ }
16
+ async function createMonitor(data) {
17
+ return makeRequest("POST", "/api/monitors", {
18
+ ...data,
19
+ preconditions: [],
20
+ parameters: data.parameters ?? {}
21
+ });
22
+ }
23
+ async function updateMonitor(params) {
24
+ const { id, ...data } = params;
25
+ return makeRequest(
26
+ "PATCH",
27
+ `/api/monitors/${encodeURIComponent(id)}`,
28
+ data
29
+ );
30
+ }
31
+ async function toggleMonitor(params) {
32
+ return makeRequest(
33
+ "POST",
34
+ `/api/monitors/${encodeURIComponent(params.id)}/toggle`,
35
+ { enabled: params.enabled }
36
+ );
37
+ }
38
+ async function deleteMonitor(id) {
39
+ return makeRequest(
40
+ "DELETE",
41
+ `/api/monitors/${encodeURIComponent(id)}`
42
+ );
43
+ }
44
+ export {
45
+ createMonitor,
46
+ deleteMonitor,
47
+ getMonitor,
48
+ listMonitors,
49
+ toggleMonitor,
50
+ updateMonitor
51
+ };
52
+ //# sourceMappingURL=langwatch-api-monitors-WSXZLS2B.js.map
@@ -0,0 +1,40 @@
1
+ import {
2
+ makeRequest
3
+ } from "./chunk-2WPLXEKF.js";
4
+ import "./chunk-BWWY5KEF.js";
5
+
6
+ // src/langwatch-api-secrets.ts
7
+ async function listSecrets() {
8
+ return makeRequest("GET", "/api/secrets");
9
+ }
10
+ async function getSecret(id) {
11
+ return makeRequest(
12
+ "GET",
13
+ `/api/secrets/${encodeURIComponent(id)}`
14
+ );
15
+ }
16
+ async function createSecret(data) {
17
+ return makeRequest("POST", "/api/secrets", data);
18
+ }
19
+ async function updateSecret(params) {
20
+ const { id, value } = params;
21
+ return makeRequest(
22
+ "PUT",
23
+ `/api/secrets/${encodeURIComponent(id)}`,
24
+ { value }
25
+ );
26
+ }
27
+ async function deleteSecret(id) {
28
+ return makeRequest(
29
+ "DELETE",
30
+ `/api/secrets/${encodeURIComponent(id)}`
31
+ );
32
+ }
33
+ export {
34
+ createSecret,
35
+ deleteSecret,
36
+ getSecret,
37
+ listSecrets,
38
+ updateSecret
39
+ };
40
+ //# sourceMappingURL=langwatch-api-secrets-RR5DKG2X.js.map
@@ -0,0 +1,30 @@
1
+ import {
2
+ makeRequest
3
+ } from "./chunk-2WPLXEKF.js";
4
+ import "./chunk-BWWY5KEF.js";
5
+
6
+ // src/langwatch-api-triggers.ts
7
+ async function listTriggers() {
8
+ return makeRequest("GET", "/api/triggers");
9
+ }
10
+ async function getTrigger(id) {
11
+ return makeRequest("GET", `/api/triggers/${encodeURIComponent(id)}`);
12
+ }
13
+ async function createTrigger(data) {
14
+ return makeRequest("POST", "/api/triggers", data);
15
+ }
16
+ async function updateTrigger(params) {
17
+ const { id, ...data } = params;
18
+ return makeRequest("PATCH", `/api/triggers/${encodeURIComponent(id)}`, data);
19
+ }
20
+ async function deleteTrigger(id) {
21
+ return makeRequest("DELETE", `/api/triggers/${encodeURIComponent(id)}`);
22
+ }
23
+ export {
24
+ createTrigger,
25
+ deleteTrigger,
26
+ getTrigger,
27
+ listTriggers,
28
+ updateTrigger
29
+ };
30
+ //# sourceMappingURL=langwatch-api-triggers-2RTNSWQY.js.map
@@ -0,0 +1,15 @@
1
+ import {
2
+ deleteWorkflow,
3
+ getWorkflow,
4
+ listWorkflows,
5
+ runWorkflow
6
+ } from "./chunk-ZVS4UKN2.js";
7
+ import "./chunk-2WPLXEKF.js";
8
+ import "./chunk-BWWY5KEF.js";
9
+ export {
10
+ deleteWorkflow,
11
+ getWorkflow,
12
+ listWorkflows,
13
+ runWorkflow
14
+ };
15
+ //# sourceMappingURL=langwatch-api-workflows-VJRIIDZ7.js.map
@@ -0,0 +1,32 @@
1
+ import {
2
+ listAgents
3
+ } from "./chunk-4AUB2BIA.js";
4
+ import "./chunk-2WPLXEKF.js";
5
+ import "./chunk-BWWY5KEF.js";
6
+
7
+ // src/tools/list-agents.ts
8
+ async function handleListAgents() {
9
+ const result = await listAgents({ limit: 100 });
10
+ const agents = result.data;
11
+ if (!Array.isArray(agents) || agents.length === 0) {
12
+ return "No agents found in this project.\n\n> Tip: Use `platform_create_agent` to create your first agent.";
13
+ }
14
+ const lines = [];
15
+ lines.push(`# Agents (${result.pagination.total} total)
16
+ `);
17
+ for (const a of agents) {
18
+ lines.push(`## ${a.name}`);
19
+ lines.push(`**ID**: ${a.id}`);
20
+ lines.push(`**Type**: ${a.type}`);
21
+ lines.push(`**Updated**: ${a.updatedAt}`);
22
+ lines.push("");
23
+ }
24
+ lines.push(
25
+ "> Use `platform_get_agent` with the ID to see full agent details including config."
26
+ );
27
+ return lines.join("\n");
28
+ }
29
+ export {
30
+ handleListAgents
31
+ };
32
+ //# sourceMappingURL=list-agents-AW3P6FJV.js.map
@@ -0,0 +1,33 @@
1
+ import {
2
+ getAnnotationsByTrace,
3
+ listAnnotations
4
+ } from "./chunk-IE4M5OGE.js";
5
+ import "./chunk-2WPLXEKF.js";
6
+ import "./chunk-BWWY5KEF.js";
7
+
8
+ // src/tools/list-annotations.ts
9
+ async function handleListAnnotations(params) {
10
+ const annotations = params.traceId ? await getAnnotationsByTrace(params.traceId) : await listAnnotations();
11
+ if (!Array.isArray(annotations) || annotations.length === 0) {
12
+ return params.traceId ? `No annotations found for trace "${params.traceId}".
13
+
14
+ > Tip: Use \`platform_create_annotation\` to annotate a trace.` : "No annotations found in this project.\n\n> Tip: Use `platform_create_annotation` to annotate a trace.";
15
+ }
16
+ const lines = [];
17
+ lines.push(`# Annotations (${annotations.length} total)
18
+ `);
19
+ for (const a of annotations) {
20
+ const rating = a.isThumbsUp === true ? "\u{1F44D}" : a.isThumbsUp === false ? "\u{1F44E}" : "\u2014";
21
+ lines.push(`## Annotation ${a.id ?? "\u2014"}`);
22
+ lines.push(`**Trace ID**: ${a.traceId ?? "\u2014"}`);
23
+ lines.push(`**Rating**: ${rating}`);
24
+ if (a.comment) lines.push(`**Comment**: ${a.comment}`);
25
+ if (a.email) lines.push(`**By**: ${a.email}`);
26
+ lines.push("");
27
+ }
28
+ return lines.join("\n");
29
+ }
30
+ export {
31
+ handleListAnnotations
32
+ };
33
+ //# sourceMappingURL=list-annotations-QNCGWPQ3.js.map
@@ -0,0 +1,32 @@
1
+ import {
2
+ listDashboards
3
+ } from "./chunk-EUQDVOSU.js";
4
+ import "./chunk-2WPLXEKF.js";
5
+ import "./chunk-BWWY5KEF.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-R7RK2IXL.js.map
@@ -0,0 +1,39 @@
1
+ import {
2
+ escapeMarkdown
3
+ } from "./chunk-NUFPTHKU.js";
4
+ import {
5
+ listDatasetRecords
6
+ } from "./chunk-WQG2DFHX.js";
7
+ import "./chunk-2WPLXEKF.js";
8
+ import "./chunk-BWWY5KEF.js";
9
+
10
+ // src/tools/list-dataset-records.ts
11
+ async function handleListDatasetRecords(params) {
12
+ const response = await listDatasetRecords({
13
+ slugOrId: params.slugOrId,
14
+ page: params.page,
15
+ limit: params.limit
16
+ });
17
+ if (params.format === "json") {
18
+ return JSON.stringify(response, null, 2);
19
+ }
20
+ const { data: records, pagination } = response;
21
+ if (records.length === 0) {
22
+ return "No records found in this dataset.";
23
+ }
24
+ const lines = [];
25
+ lines.push(`# Records (page ${pagination.page} of ${pagination.totalPages}, ${pagination.total} total)
26
+ `);
27
+ for (const record of records) {
28
+ lines.push(`**${escapeMarkdown(record.id)}**: ${escapeMarkdown(JSON.stringify(record.entry))}`);
29
+ }
30
+ if (pagination.page < pagination.totalPages) {
31
+ lines.push("");
32
+ lines.push(`> Use \`platform_list_dataset_records\` with \`page: ${pagination.page + 1}\` to see the next page.`);
33
+ }
34
+ return lines.join("\n");
35
+ }
36
+ export {
37
+ handleListDatasetRecords
38
+ };
39
+ //# sourceMappingURL=list-dataset-records-WVCSQP7P.js.map
@@ -0,0 +1,60 @@
1
+ import {
2
+ escapeMarkdown
3
+ } from "./chunk-NUFPTHKU.js";
4
+ import {
5
+ listDatasets
6
+ } from "./chunk-WQG2DFHX.js";
7
+ import "./chunk-2WPLXEKF.js";
8
+ import "./chunk-BWWY5KEF.js";
9
+
10
+ // src/tools/list-datasets.ts
11
+ async function fetchAllDatasets() {
12
+ const PAGE_SIZE = 100;
13
+ const datasets = [];
14
+ let page = 1;
15
+ let total = 0;
16
+ while (true) {
17
+ const response = await listDatasets({ page, limit: PAGE_SIZE });
18
+ total = response.pagination.total;
19
+ datasets.push(...response.data);
20
+ if (datasets.length >= total || response.data.length === 0) {
21
+ break;
22
+ }
23
+ page++;
24
+ }
25
+ return { datasets, total };
26
+ }
27
+ async function handleListDatasets(params = {}) {
28
+ if (params.format === "json") {
29
+ const { datasets: datasets2, total: total2 } = await fetchAllDatasets();
30
+ return JSON.stringify({ data: datasets2, total: total2 }, null, 2);
31
+ }
32
+ const { datasets, total } = await fetchAllDatasets();
33
+ if (datasets.length === 0) {
34
+ return "No datasets found in this project.\n\n> Tip: Use `platform_create_dataset` to create your first dataset.";
35
+ }
36
+ const lines = [];
37
+ lines.push(`# Datasets (${total} total)
38
+ `);
39
+ for (const ds of datasets) {
40
+ lines.push(`## ${escapeMarkdown(ds.name)}`);
41
+ lines.push(`**Slug**: ${escapeMarkdown(ds.slug)}`);
42
+ lines.push(`**ID**: ${ds.id}`);
43
+ if (Array.isArray(ds.columnTypes) && ds.columnTypes.length > 0) {
44
+ const colNames = ds.columnTypes.map((c) => c.name).join(", ");
45
+ lines.push(`**Columns**: ${colNames}`);
46
+ }
47
+ lines.push(
48
+ `**Records**: ${ds.recordCount ?? "unknown"}`
49
+ );
50
+ lines.push("");
51
+ }
52
+ lines.push(
53
+ "> Use `platform_get_dataset` with the slug to see full dataset details and records."
54
+ );
55
+ return lines.join("\n");
56
+ }
57
+ export {
58
+ handleListDatasets
59
+ };
60
+ //# sourceMappingURL=list-datasets-KEXRLDEU.js.map
@@ -0,0 +1,34 @@
1
+ import {
2
+ getEvaluatorType,
3
+ listEvaluators
4
+ } from "./chunk-HYMIWO3U.js";
5
+ import "./chunk-2WPLXEKF.js";
6
+ import "./chunk-BWWY5KEF.js";
7
+
8
+ // src/tools/list-evaluators.ts
9
+ async function handleListEvaluators() {
10
+ const evaluators = await listEvaluators();
11
+ if (!Array.isArray(evaluators) || evaluators.length === 0) {
12
+ return "No evaluators found in this project.\n\n> Tip: Use `platform_create_evaluator` to create your first evaluator. Call `discover_schema({ category: 'evaluators' })` to see available evaluator types.";
13
+ }
14
+ const lines = [];
15
+ lines.push(`# Evaluators (${evaluators.length} total)
16
+ `);
17
+ for (const e of evaluators) {
18
+ const evaluatorType = getEvaluatorType(e);
19
+ lines.push(`## ${e.name}`);
20
+ lines.push(`**ID**: ${e.id}`);
21
+ if (e.slug) lines.push(`**Slug**: ${e.slug}`);
22
+ if (evaluatorType) lines.push(`**Type**: ${evaluatorType}`);
23
+ lines.push(`**Kind**: ${e.type}`);
24
+ lines.push("");
25
+ }
26
+ lines.push(
27
+ "> Use `platform_get_evaluator` with the ID or slug to see full evaluator details."
28
+ );
29
+ return lines.join("\n");
30
+ }
31
+ export {
32
+ handleListEvaluators
33
+ };
34
+ //# sourceMappingURL=list-evaluators-7R2LB4JH.js.map
@@ -0,0 +1,35 @@
1
+ import {
2
+ listModelProviders
3
+ } from "./chunk-CCWCIJJ3.js";
4
+ import "./chunk-2WPLXEKF.js";
5
+ import "./chunk-BWWY5KEF.js";
6
+
7
+ // src/tools/list-model-providers.ts
8
+ async function handleListModelProviders() {
9
+ const providers = await listModelProviders();
10
+ const entries = Object.entries(providers);
11
+ if (entries.length === 0) {
12
+ return "No model providers configured for this project.\n\n> Tip: Use `platform_set_model_provider` to configure an API key for a model provider.";
13
+ }
14
+ const lines = [];
15
+ lines.push(`# Model Providers (${entries.length} total)
16
+ `);
17
+ for (const [key, provider] of entries) {
18
+ const status = provider.enabled ? "enabled" : "disabled";
19
+ lines.push(`## ${key}`);
20
+ lines.push(`**Status**: ${status}`);
21
+ if (provider.customKeys) {
22
+ const keyFields = Object.entries(provider.customKeys).map(([k, v]) => `${k}: ${v ? "set" : "not set"}`).join(", ");
23
+ lines.push(`**Keys**: ${keyFields}`);
24
+ }
25
+ if (provider.models && provider.models.length > 0) {
26
+ lines.push(`**Models**: ${provider.models.length} available`);
27
+ }
28
+ lines.push("");
29
+ }
30
+ return lines.join("\n");
31
+ }
32
+ export {
33
+ handleListModelProviders
34
+ };
35
+ //# sourceMappingURL=list-model-providers-OBYJCKBX.js.map
@@ -0,0 +1,23 @@
1
+ import {
2
+ listPromptTags
3
+ } from "./chunk-2WPLXEKF.js";
4
+ import "./chunk-BWWY5KEF.js";
5
+
6
+ // src/tools/list-prompt-tags.ts
7
+ async function handleListPromptTags() {
8
+ const tags = await listPromptTags();
9
+ if (!tags || tags.length === 0) {
10
+ return "No prompt tags found. The `latest` tag is always available.";
11
+ }
12
+ const lines = [];
13
+ lines.push("# Prompt Tags\n");
14
+ for (const tag of tags) {
15
+ const created = tag.createdAt ? ` (created ${tag.createdAt})` : "";
16
+ lines.push(`- **${tag.name}**${created}`);
17
+ }
18
+ return lines.join("\n");
19
+ }
20
+ export {
21
+ handleListPromptTags
22
+ };
23
+ //# sourceMappingURL=list-prompt-tags-6LY3ZPYI.js.map
@@ -0,0 +1,32 @@
1
+ import {
2
+ listPrompts
3
+ } from "./chunk-2WPLXEKF.js";
4
+ import "./chunk-BWWY5KEF.js";
5
+
6
+ // src/tools/list-prompts.ts
7
+ async function handleListPrompts() {
8
+ const prompts = await listPrompts();
9
+ if (!Array.isArray(prompts) || prompts.length === 0) {
10
+ return "No prompts found in this project.";
11
+ }
12
+ const lines = [];
13
+ lines.push(`# Prompts (${prompts.length} total)
14
+ `);
15
+ lines.push("| Handle | Name | Latest Version |");
16
+ lines.push("|--------|------|----------------|");
17
+ for (const p of prompts) {
18
+ const handle = p.handle || p.id || "N/A";
19
+ const name = p.name || "Untitled";
20
+ const versionNum = p.latestVersionNumber ?? p.version;
21
+ const version = versionNum != null ? `v${versionNum}` : "N/A";
22
+ lines.push(`| ${handle} | ${name} | ${version} |`);
23
+ }
24
+ lines.push(
25
+ "\n> Use `platform_get_prompt` with the handle or ID to see full prompt details."
26
+ );
27
+ return lines.join("\n");
28
+ }
29
+ export {
30
+ handleListPrompts
31
+ };
32
+ //# sourceMappingURL=list-prompts-VWEZ4CDE.js.map
@@ -0,0 +1,40 @@
1
+ import {
2
+ listScenarios
3
+ } from "./chunk-2GT7IFWK.js";
4
+ import "./chunk-2WPLXEKF.js";
5
+ import "./chunk-BWWY5KEF.js";
6
+
7
+ // src/tools/list-scenarios.ts
8
+ async function handleListScenarios(params) {
9
+ const scenarios = await listScenarios();
10
+ if (params.format === "json") {
11
+ return JSON.stringify(scenarios, null, 2);
12
+ }
13
+ if (!Array.isArray(scenarios) || scenarios.length === 0) {
14
+ return "No scenarios found in this project.\n\n> Tip: Use `platform_create_scenario` to create your first scenario.";
15
+ }
16
+ const lines = [];
17
+ lines.push(`# Scenarios (${scenarios.length} total)
18
+ `);
19
+ for (const s of scenarios) {
20
+ lines.push(`## ${s.name}`);
21
+ lines.push(`**ID**: ${s.id}`);
22
+ const preview = s.situation && s.situation.length > 60 ? s.situation.slice(0, 60) + "..." : s.situation;
23
+ lines.push(`**Situation**: ${preview}`);
24
+ lines.push(
25
+ `**Criteria**: ${Array.isArray(s.criteria) ? s.criteria.length : 0} criteria`
26
+ );
27
+ if (Array.isArray(s.labels) && s.labels.length > 0) {
28
+ lines.push(`**Labels**: ${s.labels.join(", ")}`);
29
+ }
30
+ lines.push("");
31
+ }
32
+ lines.push(
33
+ "> Use `platform_get_scenario` with the ID to see full scenario details."
34
+ );
35
+ return lines.join("\n");
36
+ }
37
+ export {
38
+ handleListScenarios
39
+ };
40
+ //# sourceMappingURL=list-scenarios-TXD4W2ZJ.js.map
@@ -0,0 +1,43 @@
1
+ import {
2
+ listSimulationRuns
3
+ } from "./chunk-EGH5RPXM.js";
4
+ import "./chunk-2WPLXEKF.js";
5
+ import "./chunk-BWWY5KEF.js";
6
+
7
+ // src/tools/list-simulation-runs.ts
8
+ async function handleListSimulationRuns(params) {
9
+ const result = await listSimulationRuns({
10
+ scenarioSetId: params.scenarioSetId,
11
+ batchRunId: params.batchRunId,
12
+ limit: params.limit
13
+ });
14
+ if (params.format === "json") {
15
+ return JSON.stringify(result, null, 2);
16
+ }
17
+ const { runs } = result;
18
+ if (runs.length === 0) {
19
+ return "No simulation runs found.\n\n> Run a suite first with `platform_run_suite` to create simulation runs.";
20
+ }
21
+ const lines = [];
22
+ lines.push(`# Simulation Runs (${runs.length} results${result.hasMore ? ", more available" : ""})
23
+ `);
24
+ for (const run of runs) {
25
+ const statusIcon = run.status === "SUCCESS" ? "pass" : run.status === "FAILED" ? "FAIL" : run.status;
26
+ const duration = run.durationInMs > 0 ? `${(run.durationInMs / 1e3).toFixed(1)}s` : "\u2014";
27
+ const verdict = run.results?.verdict ?? "";
28
+ lines.push(`## ${run.name ?? run.scenarioId} \u2014 ${statusIcon}${verdict ? ` (${verdict})` : ""}`);
29
+ lines.push(`**Run ID**: ${run.scenarioRunId}`);
30
+ lines.push(`**Batch**: ${run.batchRunId}`);
31
+ lines.push(`**Duration**: ${duration}`);
32
+ if (run.totalCost) {
33
+ lines.push(`**Cost**: $${run.totalCost.toFixed(4)}`);
34
+ }
35
+ lines.push("");
36
+ }
37
+ lines.push("> Use `platform_get_simulation_run` with a run ID to see full details (messages, results).");
38
+ return lines.join("\n");
39
+ }
40
+ export {
41
+ handleListSimulationRuns
42
+ };
43
+ //# sourceMappingURL=list-simulation-runs-RHPOLMFI.js.map
@@ -0,0 +1,42 @@
1
+ import {
2
+ listSuites
3
+ } from "./chunk-LUMEZEHL.js";
4
+ import "./chunk-2WPLXEKF.js";
5
+ import "./chunk-BWWY5KEF.js";
6
+
7
+ // src/tools/list-suites.ts
8
+ async function handleListSuites(params) {
9
+ const suites = await listSuites();
10
+ if (params.format === "json") {
11
+ return JSON.stringify(suites, null, 2);
12
+ }
13
+ if (!Array.isArray(suites) || suites.length === 0) {
14
+ return "No suites (run plans) found in this project.\n\n> Tip: Use `platform_create_suite` to create your first suite.";
15
+ }
16
+ const lines = [];
17
+ lines.push(`# Suites / Run Plans (${suites.length} total)
18
+ `);
19
+ for (const s of suites) {
20
+ lines.push(`## ${s.name}`);
21
+ lines.push(`**ID**: ${s.id}`);
22
+ lines.push(`**Slug**: ${s.slug}`);
23
+ lines.push(`**Scenarios**: ${s.scenarioIds.length}`);
24
+ lines.push(`**Targets**: ${s.targets.length} (${s.targets.map((t) => `${t.type}:${t.referenceId}`).join(", ")})`);
25
+ lines.push(`**Repeat**: ${s.repeatCount}x`);
26
+ if (s.description) {
27
+ lines.push(`**Description**: ${s.description}`);
28
+ }
29
+ if (Array.isArray(s.labels) && s.labels.length > 0) {
30
+ lines.push(`**Labels**: ${s.labels.join(", ")}`);
31
+ }
32
+ lines.push("");
33
+ }
34
+ lines.push(
35
+ "> Use `platform_get_suite` with the ID to see full details, or `platform_run_suite` to trigger execution."
36
+ );
37
+ return lines.join("\n");
38
+ }
39
+ export {
40
+ handleListSuites
41
+ };
42
+ //# sourceMappingURL=list-suites-FSGBX27Z.js.map
@@ -0,0 +1,35 @@
1
+ import {
2
+ listWorkflows
3
+ } from "./chunk-ZVS4UKN2.js";
4
+ import "./chunk-2WPLXEKF.js";
5
+ import "./chunk-BWWY5KEF.js";
6
+
7
+ // src/tools/list-workflows.ts
8
+ async function handleListWorkflows() {
9
+ const workflows = await listWorkflows();
10
+ if (!Array.isArray(workflows) || workflows.length === 0) {
11
+ return "No workflows found in this project.";
12
+ }
13
+ const lines = [];
14
+ lines.push(`# Workflows (${workflows.length} total)
15
+ `);
16
+ for (const w of workflows) {
17
+ const tags = [];
18
+ if (w.isEvaluator) tags.push("evaluator");
19
+ if (w.isComponent) tags.push("component");
20
+ const tagStr = tags.length > 0 ? ` [${tags.join(", ")}]` : "";
21
+ lines.push(`## ${w.name}${tagStr}`);
22
+ lines.push(`**ID**: ${w.id}`);
23
+ if (w.description) lines.push(`**Description**: ${w.description}`);
24
+ lines.push(`**Updated**: ${w.updatedAt}`);
25
+ lines.push("");
26
+ }
27
+ lines.push(
28
+ "> Use `platform_get_workflow` with the ID to see full workflow details."
29
+ );
30
+ return lines.join("\n");
31
+ }
32
+ export {
33
+ handleListWorkflows
34
+ };
35
+ //# sourceMappingURL=list-workflows-VRGEZ3EN.js.map