@langwatch/mcp-server 0.6.1 → 0.8.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/.release-please-shim +1 -0
- package/CHANGELOG.md +89 -0
- package/README.md +51 -8
- package/dist/{archive-scenario-YFD5THOR.js → archive-scenario-YKGLJ4MZ.js} +4 -4
- package/dist/archive-suite-QFNDO3Y3.js +15 -0
- package/dist/assign-prompt-tag-Y2B4CBBT.js +19 -0
- package/dist/chunk-B57MZ4WI.js +1573 -0
- package/dist/{chunk-IX6QJKAD.js → chunk-CPUPGDNA.js} +2 -2
- package/dist/chunk-FBRKHHJV.js +48 -0
- package/dist/{chunk-5UOPNRXW.js → chunk-HDJDFKZR.js} +10 -3
- package/dist/chunk-KOO5733S.js +72 -0
- package/dist/chunk-KZNBCKWG.js +39 -0
- package/dist/chunk-L6QENXYA.js +42 -0
- package/dist/{chunk-6U4TCGFC.js → chunk-NACSR6B7.js} +2 -2
- package/dist/chunk-NUFPTHKU.js +9 -0
- package/dist/chunk-OVQF3D5R.js +86 -0
- package/dist/chunk-PO7FM7IX.js +35 -0
- package/dist/chunk-PZUWCWOS.js +25 -0
- package/dist/chunk-WVI5CJ6S.js +21 -0
- package/dist/{chunk-LLRQIF52.js → chunk-YH2IBTEL.js} +54 -6
- package/dist/chunk-YI3OG4PI.js +71 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.js +13 -0
- package/dist/create-agent-YRSDH7P7.js +23 -0
- package/dist/create-annotation-FYQNKMVJ.js +24 -0
- package/dist/create-dashboard-CORBR4YQ.js +18 -0
- package/dist/create-dataset-ZC63T6BB.js +22 -0
- package/dist/create-dataset-records-ILVNVKVR.js +22 -0
- package/dist/{create-evaluator-E5X5ZP3B.js → create-evaluator-2AU3PXFB.js} +4 -4
- package/dist/create-mcp-server.d.ts +8 -0
- package/dist/create-mcp-server.js +8 -0
- package/dist/{create-prompt-7Z35MIL6.js → create-prompt-NKRJ47YY.js} +7 -4
- package/dist/create-prompt-tag-S4JX3ULL.js +17 -0
- package/dist/{create-scenario-DIMPJRPY.js → create-scenario-BPRF75KF.js} +4 -4
- package/dist/create-suite-4YN7D6K2.js +38 -0
- package/dist/delete-agent-Y72R2YQA.js +18 -0
- package/dist/delete-annotation-UHWDMHSH.js +17 -0
- package/dist/delete-dashboard-LPWT36KN.js +18 -0
- package/dist/delete-dataset-GGPQRHKX.js +20 -0
- package/dist/delete-dataset-records-LTG5LT26.js +21 -0
- package/dist/delete-evaluator-F7QLXDHU.js +15 -0
- package/dist/delete-prompt-tag-B5UKZL45.js +17 -0
- package/dist/delete-workflow-4DGUDIDE.js +17 -0
- package/dist/get-agent-YEVICUX4.js +28 -0
- package/dist/{get-analytics-4YJW4S5L.js → get-analytics-3W5CMU3F.js} +22 -5
- package/dist/get-dashboard-NCQHN6MW.js +29 -0
- package/dist/get-dataset-KBK6PH36.js +48 -0
- package/dist/{get-evaluator-WDEH2F7M.js → get-evaluator-QDUL5LXR.js} +4 -4
- package/dist/{get-prompt-F6PDVC76.js → get-prompt-XCSSNRKR.js} +4 -4
- package/dist/{get-scenario-H24ZYNT5.js → get-scenario-FNRKOY7E.js} +4 -4
- package/dist/get-simulation-run-WOEKUF7K.js +56 -0
- package/dist/get-suite-U5AOD5TC.js +44 -0
- package/dist/{get-trace-27USKGO7.js → get-trace-MUWEJM2Z.js} +3 -3
- package/dist/get-workflow-SOA7MT7L.js +25 -0
- package/dist/http-server-7DMOCB75.js +224 -0
- package/dist/index.js +61640 -31868
- package/dist/langwatch-api-annotations-Q57NDUVR.js +17 -0
- package/dist/langwatch-api-dashboards-VBWWXV3Y.js +17 -0
- package/dist/langwatch-api-monitors-L3IY7FDT.js +52 -0
- package/dist/langwatch-api-secrets-S5HHF3XR.js +40 -0
- package/dist/langwatch-api-triggers-ME33QE26.js +30 -0
- package/dist/langwatch-api-workflows-4CJQAYP2.js +15 -0
- package/dist/list-agents-3HGIBJFM.js +32 -0
- package/dist/list-annotations-KWXYVEPI.js +33 -0
- package/dist/list-dashboards-VQ2LH666.js +32 -0
- package/dist/list-dataset-records-RNRGROJP.js +39 -0
- package/dist/list-datasets-I4A2LT2S.js +60 -0
- package/dist/{list-evaluators-KRGI72EH.js → list-evaluators-AKKRJ5MX.js} +4 -4
- package/dist/{list-model-providers-A5YCFTPI.js → list-model-providers-DVFEHFHZ.js} +4 -4
- package/dist/list-prompt-tags-PL5OISUA.js +23 -0
- package/dist/{list-prompts-LKJSE7XN.js → list-prompts-7VTFWE2Z.js} +3 -3
- package/dist/{list-scenarios-ZK5CMGC4.js → list-scenarios-5BZWZ6ZN.js} +4 -4
- package/dist/list-simulation-runs-WCZ6RLPE.js +43 -0
- package/dist/list-suites-RRQ2JX5Y.js +42 -0
- package/dist/list-workflows-UQB5FCX5.js +35 -0
- package/dist/rename-prompt-tag-TURD6KYU.js +18 -0
- package/dist/run-agent-BEJ4K4CM.js +36 -0
- package/dist/run-evaluation-AJ7WZNQD.js +64 -0
- package/dist/run-suite-U7V432G2.js +29 -0
- package/dist/run-workflow-5WX7DK5T.js +36 -0
- package/dist/{search-traces-SOKAAMAR.js → search-traces-ZCHNOMTX.js} +3 -3
- package/dist/{set-model-provider-7MGULZDH.js → set-model-provider-6CFHMCNE.js} +4 -4
- package/dist/update-agent-UE6UWLZP.js +20 -0
- package/dist/update-dataset-4XQZZE4S.js +22 -0
- package/dist/update-dataset-record-GNNM5TKM.js +19 -0
- package/dist/{update-evaluator-A3XINFLJ.js → update-evaluator-LHVDXIZD.js} +4 -4
- package/dist/{update-prompt-IW7X2UQM.js → update-prompt-3XEHECJ7.js} +5 -3
- package/dist/{update-scenario-ZT7TOBFR.js → update-scenario-DFPREYCD.js} +4 -4
- package/dist/update-suite-RATU5THO.js +39 -0
- package/package.json +22 -8
- package/src/__tests__/all-tools.integration.test.ts +353 -0
- package/src/__tests__/config.unit.test.ts +81 -1
- package/src/__tests__/datasets.integration.test.ts +620 -0
- package/src/__tests__/datasets.unit.test.ts +244 -0
- package/src/__tests__/docker.integration.test.ts +234 -0
- package/src/__tests__/http-transport.integration.test.ts +397 -0
- package/src/__tests__/langwatch-api.unit.test.ts +174 -0
- package/src/__tests__/scenario-tools.unit.test.ts +3 -0
- package/src/__tests__/tools.unit.test.ts +177 -0
- package/src/config.d.ts +15 -0
- package/src/config.ts +85 -7
- package/src/create-mcp-server.d.ts +6 -0
- package/src/create-mcp-server.ts +1799 -0
- package/src/http-server.ts +329 -0
- package/src/index.ts +22 -593
- package/src/langwatch-api-agents.ts +108 -0
- package/src/langwatch-api-annotations.ts +49 -0
- package/src/langwatch-api-dashboards.ts +48 -0
- package/src/langwatch-api-datasets.ts +191 -0
- package/src/langwatch-api-evaluators.ts +10 -0
- package/src/langwatch-api-monitors.ts +82 -0
- package/src/langwatch-api-secrets.ts +48 -0
- package/src/langwatch-api-simulation-runs.ts +51 -0
- package/src/langwatch-api-suites.ts +118 -0
- package/src/langwatch-api-triggers.ts +48 -0
- package/src/langwatch-api-workflows.ts +41 -0
- package/src/langwatch-api.ts +65 -3
- package/src/schemas/create-dataset.ts +48 -0
- package/src/schemas/index.ts +1 -0
- package/src/tools/archive-suite.ts +12 -0
- package/src/tools/assign-prompt-tag.ts +16 -0
- package/src/tools/create-agent.ts +15 -0
- package/src/tools/create-annotation.ts +18 -0
- package/src/tools/create-dashboard.ts +7 -0
- package/src/tools/create-dataset-records.ts +23 -0
- package/src/tools/create-dataset.ts +22 -0
- package/src/tools/create-prompt-tag.ts +12 -0
- package/src/tools/create-prompt.ts +4 -0
- package/src/tools/create-suite.ts +42 -0
- package/src/tools/delete-agent.ts +7 -0
- package/src/tools/delete-annotation.ts +7 -0
- package/src/tools/delete-dashboard.ts +7 -0
- package/src/tools/delete-dataset-records.ts +22 -0
- package/src/tools/delete-dataset.ts +20 -0
- package/src/tools/delete-evaluator.ts +12 -0
- package/src/tools/delete-prompt-tag.ts +12 -0
- package/src/tools/delete-workflow.ts +7 -0
- package/src/tools/format-dataset-mutation.ts +25 -0
- package/src/tools/get-agent.ts +21 -0
- package/src/tools/get-analytics.ts +30 -3
- package/src/tools/get-dashboard.ts +22 -0
- package/src/tools/get-dataset.ts +63 -0
- package/src/tools/get-prompt.ts +2 -1
- package/src/tools/get-simulation-run.ts +60 -0
- package/src/tools/get-suite.ts +47 -0
- package/src/tools/get-workflow.ts +17 -0
- package/src/tools/list-agents.ts +27 -0
- package/src/tools/list-annotations.ts +33 -0
- package/src/tools/list-dashboards.ts +27 -0
- package/src/tools/list-dataset-records.ts +46 -0
- package/src/tools/list-datasets.ts +80 -0
- package/src/tools/list-prompt-tags.ts +21 -0
- package/src/tools/list-simulation-runs.ts +49 -0
- package/src/tools/list-suites.ts +43 -0
- package/src/tools/list-workflows.ts +31 -0
- package/src/tools/rename-prompt-tag.ts +14 -0
- package/src/tools/run-agent.ts +36 -0
- package/src/tools/run-evaluation.ts +87 -0
- package/src/tools/run-suite.ts +28 -0
- package/src/tools/run-workflow.ts +36 -0
- package/src/tools/update-agent.ts +13 -0
- package/src/tools/update-dataset-record.ts +21 -0
- package/src/tools/update-dataset.ts +23 -0
- package/src/tools/update-prompt.ts +3 -0
- package/src/tools/update-suite.ts +44 -0
- package/src/utils/escape-markdown.ts +12 -0
- package/uv.lock +188 -530
- package/build.js +0 -12
- package/dist/archive-scenario-YFD5THOR.js.map +0 -1
- package/dist/chunk-5UOPNRXW.js.map +0 -1
- package/dist/chunk-6U4TCGFC.js.map +0 -1
- package/dist/chunk-AAQNA53E.js +0 -28
- package/dist/chunk-AAQNA53E.js.map +0 -1
- package/dist/chunk-IX6QJKAD.js.map +0 -1
- package/dist/chunk-LLRQIF52.js.map +0 -1
- package/dist/chunk-ZXKLPC2E.js.map +0 -1
- package/dist/config-FIQWQRUB.js +0 -11
- package/dist/config-FIQWQRUB.js.map +0 -1
- package/dist/create-evaluator-E5X5ZP3B.js.map +0 -1
- package/dist/create-prompt-7Z35MIL6.js.map +0 -1
- package/dist/create-scenario-DIMPJRPY.js.map +0 -1
- package/dist/discover-evaluator-schema-H23XCLNE.js.map +0 -1
- package/dist/discover-scenario-schema-MEEEVND7.js.map +0 -1
- package/dist/discover-schema-3T52ORPB.js.map +0 -1
- package/dist/get-analytics-4YJW4S5L.js.map +0 -1
- package/dist/get-evaluator-WDEH2F7M.js.map +0 -1
- package/dist/get-prompt-F6PDVC76.js.map +0 -1
- package/dist/get-scenario-H24ZYNT5.js.map +0 -1
- package/dist/get-trace-27USKGO7.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/list-evaluators-KRGI72EH.js.map +0 -1
- package/dist/list-model-providers-A5YCFTPI.js.map +0 -1
- package/dist/list-prompts-LKJSE7XN.js.map +0 -1
- package/dist/list-scenarios-ZK5CMGC4.js.map +0 -1
- package/dist/search-traces-SOKAAMAR.js.map +0 -1
- package/dist/set-model-provider-7MGULZDH.js.map +0 -1
- package/dist/update-evaluator-A3XINFLJ.js.map +0 -1
- package/dist/update-prompt-IW7X2UQM.js.map +0 -1
- package/dist/update-scenario-ZT7TOBFR.js.map +0 -1
- package/tests/evaluations.ipynb +0 -649
- package/tests/fixtures/azure/azure_openai_stream_bot_expected.py +0 -102
- package/tests/fixtures/azure/azure_openai_stream_bot_input.py +0 -78
- package/tests/fixtures/dspy/dspy_bot_expected.py +0 -61
- package/tests/fixtures/dspy/dspy_bot_input.py +0 -53
- package/tests/fixtures/fastapi/fastapi_app_expected.py +0 -68
- package/tests/fixtures/fastapi/fastapi_app_input.py +0 -60
- package/tests/fixtures/fastapi/prompt_management_fastapi_expected.py +0 -114
- package/tests/fixtures/fastapi/prompt_management_fastapi_input.py +0 -88
- package/tests/fixtures/haystack/haystack_bot_expected.py +0 -141
- package/tests/fixtures/haystack/haystack_bot_input.py +0 -69
- package/tests/fixtures/langchain/langchain_bot_expected.py +0 -53
- package/tests/fixtures/langchain/langchain_bot_input.py +0 -45
- package/tests/fixtures/langchain/langchain_bot_with_memory_expected.py +0 -69
- package/tests/fixtures/langchain/langchain_bot_with_memory_input.py +0 -61
- package/tests/fixtures/langchain/langchain_rag_bot_expected.py +0 -97
- package/tests/fixtures/langchain/langchain_rag_bot_input.py +0 -77
- package/tests/fixtures/langchain/langchain_rag_bot_vertex_ai_expected.py +0 -116
- package/tests/fixtures/langchain/langchain_rag_bot_vertex_ai_input.py +0 -81
- package/tests/fixtures/langchain/langgraph_rag_bot_with_threads_expected.py +0 -331
- package/tests/fixtures/langchain/langgraph_rag_bot_with_threads_input.py +0 -106
- package/tests/fixtures/litellm/litellm_bot_expected.py +0 -40
- package/tests/fixtures/litellm/litellm_bot_input.py +0 -35
- package/tests/fixtures/openai/openai_bot_expected.py +0 -43
- package/tests/fixtures/openai/openai_bot_function_call_expected.py +0 -91
- package/tests/fixtures/openai/openai_bot_function_call_input.py +0 -82
- package/tests/fixtures/openai/openai_bot_input.py +0 -36
- package/tests/fixtures/openai/openai_bot_rag_expected.py +0 -73
- package/tests/fixtures/openai/openai_bot_rag_input.py +0 -51
- package/tests/fixtures/opentelemetry/openinference_dspy_bot_expected.py +0 -63
- package/tests/fixtures/opentelemetry/openinference_dspy_bot_input.py +0 -58
- package/tests/fixtures/opentelemetry/openinference_langchain_bot_expected.py +0 -53
- package/tests/fixtures/opentelemetry/openinference_langchain_bot_input.py +0 -52
- package/tests/fixtures/opentelemetry/openinference_openai_bot_expected.py +0 -49
- package/tests/fixtures/opentelemetry/openinference_openai_bot_input.py +0 -41
- package/tests/fixtures/opentelemetry/openllmetry_openai_bot_expected.py +0 -44
- package/tests/fixtures/opentelemetry/openllmetry_openai_bot_input.py +0 -40
- package/tests/fixtures/strands/strands_bot_expected.py +0 -84
- package/tests/fixtures/strands/strands_bot_input.py +0 -52
- package/tests/scenario-openai.test.ts +0 -160
- package/tsup.config.ts +0 -10
- package/vitest.config.js +0 -7
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAnnotation,
|
|
3
|
+
deleteAnnotation,
|
|
4
|
+
getAnnotation,
|
|
5
|
+
getAnnotationsByTrace,
|
|
6
|
+
listAnnotations
|
|
7
|
+
} from "./chunk-L6QENXYA.js";
|
|
8
|
+
import "./chunk-YH2IBTEL.js";
|
|
9
|
+
import "./chunk-KOO5733S.js";
|
|
10
|
+
export {
|
|
11
|
+
createAnnotation,
|
|
12
|
+
deleteAnnotation,
|
|
13
|
+
getAnnotation,
|
|
14
|
+
getAnnotationsByTrace,
|
|
15
|
+
listAnnotations
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=langwatch-api-annotations-Q57NDUVR.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createDashboard,
|
|
3
|
+
deleteDashboard,
|
|
4
|
+
getDashboard,
|
|
5
|
+
listDashboards,
|
|
6
|
+
renameDashboard
|
|
7
|
+
} from "./chunk-KZNBCKWG.js";
|
|
8
|
+
import "./chunk-YH2IBTEL.js";
|
|
9
|
+
import "./chunk-KOO5733S.js";
|
|
10
|
+
export {
|
|
11
|
+
createDashboard,
|
|
12
|
+
deleteDashboard,
|
|
13
|
+
getDashboard,
|
|
14
|
+
listDashboards,
|
|
15
|
+
renameDashboard
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=langwatch-api-dashboards-VBWWXV3Y.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
makeRequest
|
|
3
|
+
} from "./chunk-YH2IBTEL.js";
|
|
4
|
+
import "./chunk-KOO5733S.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-L3IY7FDT.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
makeRequest
|
|
3
|
+
} from "./chunk-YH2IBTEL.js";
|
|
4
|
+
import "./chunk-KOO5733S.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-S5HHF3XR.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
makeRequest
|
|
3
|
+
} from "./chunk-YH2IBTEL.js";
|
|
4
|
+
import "./chunk-KOO5733S.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-ME33QE26.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deleteWorkflow,
|
|
3
|
+
getWorkflow,
|
|
4
|
+
listWorkflows,
|
|
5
|
+
runWorkflow
|
|
6
|
+
} from "./chunk-PO7FM7IX.js";
|
|
7
|
+
import "./chunk-YH2IBTEL.js";
|
|
8
|
+
import "./chunk-KOO5733S.js";
|
|
9
|
+
export {
|
|
10
|
+
deleteWorkflow,
|
|
11
|
+
getWorkflow,
|
|
12
|
+
listWorkflows,
|
|
13
|
+
runWorkflow
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=langwatch-api-workflows-4CJQAYP2.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
listAgents
|
|
3
|
+
} from "./chunk-YI3OG4PI.js";
|
|
4
|
+
import "./chunk-YH2IBTEL.js";
|
|
5
|
+
import "./chunk-KOO5733S.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-3HGIBJFM.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getAnnotationsByTrace,
|
|
3
|
+
listAnnotations
|
|
4
|
+
} from "./chunk-L6QENXYA.js";
|
|
5
|
+
import "./chunk-YH2IBTEL.js";
|
|
6
|
+
import "./chunk-KOO5733S.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-KWXYVEPI.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
listDashboards
|
|
3
|
+
} from "./chunk-KZNBCKWG.js";
|
|
4
|
+
import "./chunk-YH2IBTEL.js";
|
|
5
|
+
import "./chunk-KOO5733S.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-VQ2LH666.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
escapeMarkdown
|
|
3
|
+
} from "./chunk-NUFPTHKU.js";
|
|
4
|
+
import {
|
|
5
|
+
listDatasetRecords
|
|
6
|
+
} from "./chunk-OVQF3D5R.js";
|
|
7
|
+
import "./chunk-YH2IBTEL.js";
|
|
8
|
+
import "./chunk-KOO5733S.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-RNRGROJP.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {
|
|
2
|
+
escapeMarkdown
|
|
3
|
+
} from "./chunk-NUFPTHKU.js";
|
|
4
|
+
import {
|
|
5
|
+
listDatasets
|
|
6
|
+
} from "./chunk-OVQF3D5R.js";
|
|
7
|
+
import "./chunk-YH2IBTEL.js";
|
|
8
|
+
import "./chunk-KOO5733S.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-I4A2LT2S.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getEvaluatorType,
|
|
3
3
|
listEvaluators
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-HDJDFKZR.js";
|
|
5
|
+
import "./chunk-YH2IBTEL.js";
|
|
6
|
+
import "./chunk-KOO5733S.js";
|
|
7
7
|
|
|
8
8
|
// src/tools/list-evaluators.ts
|
|
9
9
|
async function handleListEvaluators() {
|
|
@@ -31,4 +31,4 @@ async function handleListEvaluators() {
|
|
|
31
31
|
export {
|
|
32
32
|
handleListEvaluators
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=list-evaluators-
|
|
34
|
+
//# sourceMappingURL=list-evaluators-AKKRJ5MX.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listModelProviders
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-CPUPGDNA.js";
|
|
4
|
+
import "./chunk-YH2IBTEL.js";
|
|
5
|
+
import "./chunk-KOO5733S.js";
|
|
6
6
|
|
|
7
7
|
// src/tools/list-model-providers.ts
|
|
8
8
|
async function handleListModelProviders() {
|
|
@@ -32,4 +32,4 @@ async function handleListModelProviders() {
|
|
|
32
32
|
export {
|
|
33
33
|
handleListModelProviders
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=list-model-providers-
|
|
35
|
+
//# sourceMappingURL=list-model-providers-DVFEHFHZ.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
listPromptTags
|
|
3
|
+
} from "./chunk-YH2IBTEL.js";
|
|
4
|
+
import "./chunk-KOO5733S.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-PL5OISUA.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listPrompts
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-YH2IBTEL.js";
|
|
4
|
+
import "./chunk-KOO5733S.js";
|
|
5
5
|
|
|
6
6
|
// src/tools/list-prompts.ts
|
|
7
7
|
async function handleListPrompts() {
|
|
@@ -29,4 +29,4 @@ async function handleListPrompts() {
|
|
|
29
29
|
export {
|
|
30
30
|
handleListPrompts
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=list-prompts-
|
|
32
|
+
//# sourceMappingURL=list-prompts-7VTFWE2Z.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listScenarios
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-NACSR6B7.js";
|
|
4
|
+
import "./chunk-YH2IBTEL.js";
|
|
5
|
+
import "./chunk-KOO5733S.js";
|
|
6
6
|
|
|
7
7
|
// src/tools/list-scenarios.ts
|
|
8
8
|
async function handleListScenarios(params) {
|
|
@@ -37,4 +37,4 @@ async function handleListScenarios(params) {
|
|
|
37
37
|
export {
|
|
38
38
|
handleListScenarios
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=list-scenarios-
|
|
40
|
+
//# sourceMappingURL=list-scenarios-5BZWZ6ZN.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
listSimulationRuns
|
|
3
|
+
} from "./chunk-PZUWCWOS.js";
|
|
4
|
+
import "./chunk-YH2IBTEL.js";
|
|
5
|
+
import "./chunk-KOO5733S.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-WCZ6RLPE.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
listSuites
|
|
3
|
+
} from "./chunk-FBRKHHJV.js";
|
|
4
|
+
import "./chunk-YH2IBTEL.js";
|
|
5
|
+
import "./chunk-KOO5733S.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-RRQ2JX5Y.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
listWorkflows
|
|
3
|
+
} from "./chunk-PO7FM7IX.js";
|
|
4
|
+
import "./chunk-YH2IBTEL.js";
|
|
5
|
+
import "./chunk-KOO5733S.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-UQB5FCX5.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
renamePromptTag
|
|
3
|
+
} from "./chunk-YH2IBTEL.js";
|
|
4
|
+
import "./chunk-KOO5733S.js";
|
|
5
|
+
|
|
6
|
+
// src/tools/rename-prompt-tag.ts
|
|
7
|
+
async function handleRenamePromptTag(params) {
|
|
8
|
+
await renamePromptTag({ tag: params.tag, name: params.name });
|
|
9
|
+
const lines = [];
|
|
10
|
+
lines.push("Tag renamed successfully!\n");
|
|
11
|
+
lines.push(`**Old name**: ${params.tag}`);
|
|
12
|
+
lines.push(`**New name**: ${params.name}`);
|
|
13
|
+
return lines.join("\n");
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
handleRenamePromptTag
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=rename-prompt-tag-TURD6KYU.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runAgent
|
|
3
|
+
} from "./chunk-YI3OG4PI.js";
|
|
4
|
+
import "./chunk-YH2IBTEL.js";
|
|
5
|
+
import "./chunk-KOO5733S.js";
|
|
6
|
+
|
|
7
|
+
// src/tools/run-agent.ts
|
|
8
|
+
async function handleRunAgent(params) {
|
|
9
|
+
let parsedInput = {};
|
|
10
|
+
if (params.input) {
|
|
11
|
+
try {
|
|
12
|
+
parsedInput = JSON.parse(params.input);
|
|
13
|
+
} catch {
|
|
14
|
+
return "Error: `input` must be a valid JSON object.";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const { agentType, result } = await runAgent(params.id, parsedInput);
|
|
18
|
+
const lines = [];
|
|
19
|
+
lines.push(`Agent executed successfully (type: ${agentType}).
|
|
20
|
+
`);
|
|
21
|
+
if (typeof result === "object" && result !== null) {
|
|
22
|
+
const output = result.output;
|
|
23
|
+
if (output !== void 0) {
|
|
24
|
+
lines.push("**Output:**");
|
|
25
|
+
lines.push(typeof output === "string" ? output : JSON.stringify(output, null, 2));
|
|
26
|
+
} else {
|
|
27
|
+
lines.push("**Result:**");
|
|
28
|
+
lines.push(JSON.stringify(result, null, 2));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return lines.join("\n");
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
handleRunAgent
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=run-agent-BEJ4K4CM.js.map
|