@langwatch/mcp-server 1.0.0 → 2.1.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/.python-version +1 -0
- package/CHANGELOG.md +110 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +86 -4
- package/dist/{archive-project-MK3673A7.js → archive-project-W3IKI7UL.js} +5 -5
- package/dist/archive-run-plan-474OKHHU.js +16 -0
- package/dist/{archive-scenario-KATSXRIN.js → archive-scenario-V5UNYK26.js} +5 -5
- package/dist/archive-test-suite-O7FLDMXK.js +16 -0
- package/dist/{assign-prompt-tag-E3C5W6PI.js → assign-prompt-tag-Q46WRB6P.js} +4 -4
- package/dist/chunk-56OGTS24.js +44 -0
- package/dist/chunk-6DJDEXET.js +63 -0
- package/dist/chunk-7E4FZIYJ.js +15 -0
- package/dist/{chunk-J45SVWPR.js → chunk-AN4OUA4D.js} +2 -2
- package/dist/chunk-CKNAH5TG.js +74 -0
- package/dist/{chunk-CE6QMZOP.js → chunk-EYXMLE5X.js} +86 -11
- package/dist/{chunk-XY4STOBE.js → chunk-G4ZAZTZW.js} +2 -2
- package/dist/{chunk-5UWY24RP.js → chunk-GELJ2MQR.js} +12 -3
- package/dist/chunk-HV4DWKBI.js +46 -0
- package/dist/chunk-JR6DJZOU.js +49 -0
- package/dist/{chunk-DAIQKS27.js → chunk-JTQJRNFJ.js} +2 -2
- package/dist/{chunk-WWMDHZZV.js → chunk-K37ZNPXK.js} +2 -2
- package/dist/{chunk-EU22L52K.js → chunk-OJLYYJWI.js} +2 -2
- package/dist/{chunk-Y3HDZ6OW.js → chunk-QAMP3CGR.js} +2 -2
- package/dist/{chunk-VYPSKRPN.js → chunk-QRO35SOM.js} +347 -146
- package/dist/{chunk-O3LWVN67.js → chunk-RVAE2MEA.js} +2 -2
- package/dist/{chunk-UXXA4D6K.js → chunk-S4GVX36W.js} +2 -2
- package/dist/{chunk-BJ7B4R26.js → chunk-SAS5OB7F.js} +18 -2
- package/dist/{chunk-RYRB2YVJ.js → chunk-SR6QPRIE.js} +2 -2
- package/dist/chunk-UF6XIGYR.js +58 -0
- package/dist/{chunk-T7WJVS2N.js → chunk-UFOYFYI7.js} +2 -2
- package/dist/chunk-UJPXFA26.js +267 -0
- package/dist/{chunk-KOO5733S.js → chunk-WT4PO4A3.js} +8 -2
- package/dist/config.js +2 -2
- package/dist/{create-agent-7W57J7MT.js → create-agent-JFJ2K6X3.js} +5 -5
- package/dist/{create-annotation-W2XELBCQ.js → create-annotation-EUXXQ6NS.js} +5 -5
- package/dist/{create-api-key-MKRXKFJM.js → create-api-key-BGBB76JX.js} +5 -5
- package/dist/{create-dashboard-QGL7IODC.js → create-dashboard-Z76AIPLS.js} +5 -5
- package/dist/{create-dataset-3PH7A4HG.js → create-dataset-FD5VAXU4.js} +5 -5
- package/dist/{create-dataset-records-4DZS3VRL.js → create-dataset-records-WQUXXOHI.js} +5 -5
- package/dist/{create-evaluator-YWH6NC4M.js → create-evaluator-6NV33Z52.js} +5 -5
- package/dist/create-mcp-server.js +9 -4
- package/dist/{create-project-BOBQ32C5.js → create-project-ZQ7TFIO2.js} +5 -5
- package/dist/{create-prompt-FLCFGITE.js → create-prompt-BS6QRCUU.js} +4 -4
- package/dist/{create-prompt-tag-EMPNIKEA.js → create-prompt-tag-FCQ5ELSQ.js} +4 -4
- package/dist/{create-scenario-BSBIHUL6.js → create-scenario-DRPTPXU3.js} +12 -5
- package/dist/create-test-suite-ZIZCCFJ4.js +37 -0
- package/dist/{delete-agent-7MSYNY5E.js → delete-agent-SA4JMUZF.js} +5 -5
- package/dist/{delete-annotation-ZT5IGN24.js → delete-annotation-X3KKK7QY.js} +5 -5
- package/dist/{delete-dashboard-BTIY5S3L.js → delete-dashboard-LYMRPF27.js} +5 -5
- package/dist/{delete-dataset-U45HQHPR.js → delete-dataset-W6EZ44HY.js} +5 -5
- package/dist/{delete-dataset-records-R43IMAWB.js → delete-dataset-records-7CNOTALB.js} +5 -5
- package/dist/{delete-evaluator-U6JMQ6C7.js → delete-evaluator-RKYC4TNB.js} +5 -5
- package/dist/{delete-prompt-tag-4EV4TDHB.js → delete-prompt-tag-QB3OCZUV.js} +4 -4
- package/dist/{delete-workflow-5QYALXEL.js → delete-workflow-NG2VXYYM.js} +5 -5
- package/dist/{discover-evaluator-schema-MRGHVNTT.js → discover-evaluator-schema-ESSHQGPY.js} +58 -321
- package/dist/{discover-scenario-schema-UPBTCWPG.js → discover-scenario-schema-W7KBXA4J.js} +54 -2
- package/dist/{discover-schema-ICGXPHUW.js → discover-schema-L6QDPON3.js} +2 -2
- package/dist/get-agent-7THF7HCU.js +66 -0
- package/dist/{get-analytics-PVERWOA5.js → get-analytics-R6AZD3AW.js} +4 -4
- package/dist/{get-dashboard-ZZPC3WMD.js → get-dashboard-P4WWVHFU.js} +5 -5
- package/dist/{get-dataset-25TB2LQH.js → get-dataset-AKTYSQDI.js} +5 -5
- package/dist/{get-evaluator-3FTRQKEC.js → get-evaluator-RZ44UIN6.js} +5 -5
- package/dist/{get-project-5OAXYC57.js → get-project-QSQEAB33.js} +5 -5
- package/dist/get-prompt-GVKXF5NL.js +100 -0
- package/dist/get-run-plan-NY7J5GRE.js +61 -0
- package/dist/{get-scenario-DSSTR6FI.js → get-scenario-Q3LLQE4T.js} +9 -5
- package/dist/{get-simulation-run-RQPMS2MC.js → get-simulation-run-WINEYDMK.js} +14 -5
- package/dist/get-test-suite-4HKA7OKS.js +49 -0
- package/dist/{get-trace-O5VT3NAC.js → get-trace-RCUV7N4O.js} +4 -4
- package/dist/{get-workflow-3EZDOEIF.js → get-workflow-EEOC7Y45.js} +5 -5
- package/dist/http-security-EU3CHTY7.js +26 -0
- package/dist/{http-server-2ACJ3CXW.js → http-server-WCDUARTH.js} +1038 -693
- package/dist/index.js +6437 -4020
- package/dist/{langwatch-api-annotations-E65MI3WZ.js → langwatch-api-annotations-6DHVZWUK.js} +5 -5
- package/dist/{langwatch-api-dashboards-QCDECRCY.js → langwatch-api-dashboards-2KJL2M42.js} +5 -5
- package/dist/{langwatch-api-monitors-UIO2KTDV.js → langwatch-api-monitors-6ISFJ7WX.js} +4 -4
- package/dist/{langwatch-api-secrets-4T2EKSJ7.js → langwatch-api-secrets-OEBD6GBU.js} +4 -4
- package/dist/{langwatch-api-triggers-MPOEKPUY.js → langwatch-api-triggers-5E6DDGX6.js} +4 -4
- package/dist/langwatch-api-workflows-6UJL5U4Z.js +16 -0
- package/dist/list-agents-AMVDQPQL.js +43 -0
- package/dist/{list-annotations-CGX5BT7E.js → list-annotations-6PR5NLIC.js} +5 -5
- package/dist/{list-api-keys-JLWJPFRX.js → list-api-keys-GVPNBIHQ.js} +5 -5
- package/dist/{list-dashboards-RNIWX3TX.js → list-dashboards-Z3BZKDGF.js} +5 -5
- package/dist/{list-dataset-records-B5MHZR66.js → list-dataset-records-O67HZ35Y.js} +5 -5
- package/dist/{list-datasets-BVCAMQCP.js → list-datasets-WXZL6UMP.js} +5 -5
- package/dist/{list-evaluators-65FBTL2U.js → list-evaluators-PAX72WCN.js} +5 -5
- package/dist/{list-model-providers-GRK3I3VV.js → list-model-providers-VVLZMLCX.js} +5 -5
- package/dist/{list-projects-JLMBFMW3.js → list-projects-AQVI6SUK.js} +5 -5
- package/dist/{list-prompt-tags-UHNWDGQI.js → list-prompt-tags-WZFBJOHG.js} +4 -4
- package/dist/{list-prompts-7254B3U7.js → list-prompts-BQOHRHYT.js} +4 -4
- package/dist/list-run-plans-UBAU2DGH.js +46 -0
- package/dist/{list-scenarios-46YNICKM.js → list-scenarios-MS4IUIVM.js} +10 -7
- package/dist/{list-simulation-runs-LGNEFNPN.js → list-simulation-runs-D6YF4ZOU.js} +13 -7
- package/dist/list-test-suites-L7R2O6DR.js +35 -0
- package/dist/{list-workflows-MLQDM6CP.js → list-workflows-6MV4XJHF.js} +5 -5
- package/dist/{rename-prompt-tag-RHQMNEQL.js → rename-prompt-tag-K5LQ4CY6.js} +4 -4
- package/dist/rename-test-suite-NTYHAO5X.js +21 -0
- package/dist/report-issue-RHZZ33IS.js +885 -0
- package/dist/rerun-run-plan-MUDWJBE4.js +22 -0
- package/dist/{revoke-api-key-3Y35EMBT.js → revoke-api-key-6LAZ3QZZ.js} +5 -5
- package/dist/run-agent-CAGWGTYT.js +72 -0
- package/dist/run-plan-T4ZYOZGA.js +39 -0
- package/dist/run-test-suite-L4MZ7G4D.js +26 -0
- package/dist/{run-workflow-5LVBZYLS.js → run-workflow-DFIS23AP.js} +5 -5
- package/dist/{search-traces-U4HLOCZ2.js → search-traces-4XTJYXIK.js} +4 -4
- package/dist/{set-model-provider-V3M5CDIY.js → set-model-provider-XRNMFOVR.js} +5 -5
- package/dist/{update-agent-47RZIHS7.js → update-agent-DUWNYBNA.js} +5 -5
- package/dist/{update-dataset-G6QJJGS5.js → update-dataset-YSOMDCOB.js} +5 -5
- package/dist/{update-dataset-record-RMWLSWCS.js → update-dataset-record-DEA2ITYR.js} +5 -5
- package/dist/{update-evaluator-SFRRI5Q3.js → update-evaluator-NH7Q5GWV.js} +5 -5
- package/dist/{update-project-PI5DWBVK.js → update-project-Q26FBSYH.js} +5 -5
- package/dist/update-prompt-ZQQ2C3KU.js +143 -0
- package/dist/{update-scenario-G3IU2UIB.js → update-scenario-WUX34JAR.js} +12 -5
- package/package.json +8 -9
- package/pyproject.toml +5 -5
- package/src/__tests__/agent-tools.unit.test.ts +257 -0
- package/src/__tests__/all-tools.integration.test.ts +321 -75
- package/src/__tests__/config.unit.test.ts +33 -0
- package/src/__tests__/docker.integration.test.ts +91 -7
- package/src/__tests__/documentation-fetch-security.integration.test.ts +8 -2
- package/src/__tests__/feature-map-tool-drift.unit.test.ts +93 -0
- package/src/__tests__/http-security-origin.unit.test.ts +97 -0
- package/src/__tests__/http-security-sessions.unit.test.ts +209 -0
- package/src/__tests__/http-security-verifier.unit.test.ts +248 -0
- package/src/__tests__/http-server-allocation.integration.test.ts +279 -0
- package/src/__tests__/http-server-origin.integration.test.ts +169 -0
- package/src/__tests__/http-server-session-auth.integration.test.ts +341 -0
- package/src/__tests__/http-transport.integration.test.ts +85 -87
- package/src/__tests__/integration.integration.test.ts +7 -11
- package/src/__tests__/prompt-response-types.unit.test.ts +51 -0
- package/src/__tests__/prompts.integration.test.ts +736 -0
- package/src/__tests__/run-plan-tools.unit.test.ts +565 -0
- package/src/__tests__/scenario-tools.unit.test.ts +19 -0
- package/src/__tests__/simulation-run-tools.unit.test.ts +116 -0
- package/src/__tests__/support/http-server-harness.ts +138 -0
- package/src/__tests__/test-suite-tools.unit.test.ts +615 -0
- package/src/__tests__/{tools.unit.test.ts → tools.integration.test.ts} +31 -59
- package/src/config.ts +17 -2
- package/src/create-mcp-server.ts +334 -55
- package/src/http-security.ts +492 -0
- package/src/http-server.ts +536 -152
- package/src/index.ts +49 -2
- package/src/langwatch-api-agents.ts +196 -12
- package/src/langwatch-api-run-plans.ts +157 -0
- package/src/langwatch-api-scenarios.ts +9 -0
- package/src/langwatch-api-simulation-runs.ts +5 -0
- package/src/langwatch-api-test-suites.ts +135 -0
- package/src/langwatch-api.ts +62 -12
- package/src/schemas/index.ts +5 -0
- package/src/schemas/run-plan.ts +92 -0
- package/src/schemas/suite-fields.ts +149 -0
- package/src/tools/archive-run-plan.ts +12 -0
- package/src/tools/archive-test-suite.ts +12 -0
- package/src/tools/create-scenario.ts +8 -0
- package/src/tools/create-test-suite.ts +43 -0
- package/src/tools/discover-evaluator-schema.ts +2 -2
- package/src/tools/discover-scenario-schema.ts +54 -0
- package/src/tools/format-run-plan.ts +68 -0
- package/src/tools/format-scenario.ts +14 -0
- package/src/tools/format-suite-details.ts +96 -0
- package/src/tools/get-agent.ts +45 -3
- package/src/tools/get-prompt.ts +108 -24
- package/src/tools/get-run-plan.ts +62 -0
- package/src/tools/get-scenario.ts +3 -0
- package/src/tools/get-simulation-run.ts +9 -0
- package/src/tools/get-test-suite.ts +49 -0
- package/src/tools/list-agents.ts +20 -3
- package/src/tools/list-run-plans.ts +47 -0
- package/src/tools/list-scenarios.ts +12 -2
- package/src/tools/list-simulation-runs.ts +6 -2
- package/src/tools/list-test-suites.ts +35 -0
- package/src/tools/rename-test-suite.ts +18 -0
- package/src/tools/rerun-run-plan.ts +21 -0
- package/src/tools/run-agent.ts +54 -6
- package/src/tools/run-plan.ts +49 -0
- package/src/tools/run-test-suite.ts +30 -0
- package/src/tools/test-agent.ts +18 -0
- package/src/tools/update-prompt.ts +195 -10
- package/src/tools/update-scenario.ts +8 -0
- package/src/tools/update-test-suite.ts +45 -0
- package/tsconfig.json +7 -2
- package/uv.lock +418 -298
- package/dist/archive-suite-C3KX6IIZ.js +0 -16
- package/dist/chunk-WDH5P5RF.js +0 -48
- package/dist/create-suite-TWF6BBR4.js +0 -39
- package/dist/get-agent-7QJVPH72.js +0 -29
- package/dist/get-prompt-I753LZKZ.js +0 -46
- package/dist/get-suite-GTOCY5PL.js +0 -45
- package/dist/langwatch-api-workflows-5HRZ7HR4.js +0 -16
- package/dist/list-agents-TIJTP566.js +0 -33
- package/dist/list-suites-5VK4HXEK.js +0 -43
- package/dist/report-issue-DXJ6TPTC.js +0 -412
- package/dist/run-agent-RBSIFKRT.js +0 -37
- package/dist/run-suite-K3DNQ3SE.js +0 -30
- package/dist/update-prompt-RQFTEO7Y.js +0 -25
- package/dist/update-suite-TRGGLNR7.js +0 -40
- package/pnpm-workspace.yaml +0 -34
- package/src/langwatch-api-suites.ts +0 -118
- package/src/tools/archive-suite.ts +0 -12
- package/src/tools/create-suite.ts +0 -42
- package/src/tools/get-suite.ts +0 -47
- package/src/tools/list-suites.ts +0 -43
- package/src/tools/run-suite.ts +0 -28
- package/src/tools/update-suite.ts +0 -44
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getEvaluator,
|
|
3
3
|
getEvaluatorType
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-OJLYYJWI.js";
|
|
5
|
+
import "./chunk-GELJ2MQR.js";
|
|
6
|
+
import "./chunk-WT4PO4A3.js";
|
|
7
|
+
import "./chunk-SAS5OB7F.js";
|
|
8
8
|
|
|
9
9
|
// src/tools/get-evaluator.ts
|
|
10
10
|
async function handleGetEvaluator(params) {
|
|
@@ -45,4 +45,4 @@ async function handleGetEvaluator(params) {
|
|
|
45
45
|
export {
|
|
46
46
|
handleGetEvaluator
|
|
47
47
|
};
|
|
48
|
-
//# sourceMappingURL=get-evaluator-
|
|
48
|
+
//# sourceMappingURL=get-evaluator-RZ44UIN6.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getProject
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-G4ZAZTZW.js";
|
|
4
|
+
import "./chunk-GELJ2MQR.js";
|
|
5
|
+
import "./chunk-WT4PO4A3.js";
|
|
6
|
+
import "./chunk-SAS5OB7F.js";
|
|
7
7
|
|
|
8
8
|
// src/tools/get-project.ts
|
|
9
9
|
async function handleGetProject(params) {
|
|
@@ -24,4 +24,4 @@ async function handleGetProject(params) {
|
|
|
24
24
|
export {
|
|
25
25
|
handleGetProject
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=get-project-
|
|
27
|
+
//# sourceMappingURL=get-project-QSQEAB33.js.map
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getPrompt
|
|
3
|
+
} from "./chunk-GELJ2MQR.js";
|
|
4
|
+
import "./chunk-WT4PO4A3.js";
|
|
5
|
+
import "./chunk-SAS5OB7F.js";
|
|
6
|
+
|
|
7
|
+
// src/tools/get-prompt.ts
|
|
8
|
+
function normalizeTag(tag) {
|
|
9
|
+
if (typeof tag === "string") return { name: tag };
|
|
10
|
+
if (tag && typeof tag === "object" && "name" in tag) {
|
|
11
|
+
const candidate = tag;
|
|
12
|
+
if (typeof candidate.name === "string") {
|
|
13
|
+
return {
|
|
14
|
+
name: candidate.name,
|
|
15
|
+
versionId: typeof candidate.versionId === "string" ? candidate.versionId : void 0
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return void 0;
|
|
20
|
+
}
|
|
21
|
+
async function handleGetPrompt(params) {
|
|
22
|
+
const prompt = await getPrompt(params.idOrHandle, {
|
|
23
|
+
version: params.version,
|
|
24
|
+
tag: params.tag
|
|
25
|
+
});
|
|
26
|
+
if (params.format === "json") {
|
|
27
|
+
return JSON.stringify(prompt, null, 2);
|
|
28
|
+
}
|
|
29
|
+
const lines = [];
|
|
30
|
+
lines.push(`# Prompt: ${prompt.name || prompt.handle || prompt.id}
|
|
31
|
+
`);
|
|
32
|
+
if (prompt.handle) lines.push(`**Handle**: ${prompt.handle}`);
|
|
33
|
+
if (prompt.id) lines.push(`**ID**: ${prompt.id}`);
|
|
34
|
+
if (prompt.version != null) lines.push(`**Version**: v${prompt.version}`);
|
|
35
|
+
if (prompt.versionId) lines.push(`**Version ID**: ${prompt.versionId}`);
|
|
36
|
+
if (prompt.commitMessage) lines.push(`**Commit**: ${prompt.commitMessage}`);
|
|
37
|
+
if (prompt.model) lines.push(`**Model**: ${prompt.model}`);
|
|
38
|
+
if (prompt.temperature != null)
|
|
39
|
+
lines.push(`**Temperature**: ${prompt.temperature}`);
|
|
40
|
+
if (prompt.maxTokens != null)
|
|
41
|
+
lines.push(`**Max Tokens**: ${prompt.maxTokens}`);
|
|
42
|
+
if (prompt.responseFormat)
|
|
43
|
+
lines.push(`**Response Format**: ${JSON.stringify(prompt.responseFormat)}`);
|
|
44
|
+
const renderFieldList = ({
|
|
45
|
+
heading,
|
|
46
|
+
fields
|
|
47
|
+
}) => {
|
|
48
|
+
const entries = [];
|
|
49
|
+
if (Array.isArray(fields)) {
|
|
50
|
+
for (const field of fields) {
|
|
51
|
+
if (field && typeof field === "object" && "identifier" in field) {
|
|
52
|
+
const typed = field;
|
|
53
|
+
entries.push(
|
|
54
|
+
`- **${String(typed.identifier)}**: ${String(typed.type ?? "unknown")}`
|
|
55
|
+
);
|
|
56
|
+
} else {
|
|
57
|
+
entries.push(`- ${JSON.stringify(field)}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
} else if (fields && typeof fields === "object") {
|
|
61
|
+
for (const [key, value] of Object.entries(fields)) {
|
|
62
|
+
entries.push(`- **${key}**: ${JSON.stringify(value)}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (entries.length === 0) return;
|
|
66
|
+
lines.push(`
|
|
67
|
+
**${heading}**`);
|
|
68
|
+
lines.push(...entries);
|
|
69
|
+
};
|
|
70
|
+
renderFieldList({ heading: "Parameters", fields: prompt.parameters });
|
|
71
|
+
renderFieldList({ heading: "Inputs", fields: prompt.inputs });
|
|
72
|
+
renderFieldList({ heading: "Outputs", fields: prompt.outputs });
|
|
73
|
+
const messages = prompt.messages;
|
|
74
|
+
if (Array.isArray(messages) && messages.length > 0) {
|
|
75
|
+
lines.push("\n## Messages");
|
|
76
|
+
for (const msg of messages) {
|
|
77
|
+
lines.push(`
|
|
78
|
+
### ${msg.role}`);
|
|
79
|
+
lines.push(msg.content);
|
|
80
|
+
}
|
|
81
|
+
} else if (typeof prompt.prompt === "string" && prompt.prompt.length > 0) {
|
|
82
|
+
lines.push("\n## Messages");
|
|
83
|
+
lines.push("\n### system");
|
|
84
|
+
lines.push(prompt.prompt);
|
|
85
|
+
}
|
|
86
|
+
lines.push("\n## Deployments");
|
|
87
|
+
const tags = Array.isArray(prompt.tags) ? prompt.tags : [];
|
|
88
|
+
for (const rawTag of tags) {
|
|
89
|
+
const tag = normalizeTag(rawTag);
|
|
90
|
+
if (!tag || tag.name === "latest") continue;
|
|
91
|
+
const target = tag.versionId ?? "unknown version";
|
|
92
|
+
const marker = tag.versionId && tag.versionId === prompt.versionId ? " (this version)" : "";
|
|
93
|
+
lines.push(`- ${tag.name} \u2192 ${target}${marker}`);
|
|
94
|
+
}
|
|
95
|
+
return lines.join("\n");
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
handleGetPrompt
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=get-prompt-GVKXF5NL.js.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
describeRunPlanScope
|
|
3
|
+
} from "./chunk-JR6DJZOU.js";
|
|
4
|
+
import {
|
|
5
|
+
getRunPlan
|
|
6
|
+
} from "./chunk-56OGTS24.js";
|
|
7
|
+
import {
|
|
8
|
+
formatEvaluatorAttachments
|
|
9
|
+
} from "./chunk-UF6XIGYR.js";
|
|
10
|
+
import "./chunk-GELJ2MQR.js";
|
|
11
|
+
import "./chunk-WT4PO4A3.js";
|
|
12
|
+
import "./chunk-SAS5OB7F.js";
|
|
13
|
+
|
|
14
|
+
// src/tools/get-run-plan.ts
|
|
15
|
+
async function handleGetRunPlan(params) {
|
|
16
|
+
const plan = await getRunPlan(params.id);
|
|
17
|
+
if (params.format === "json") {
|
|
18
|
+
return JSON.stringify(plan, null, 2);
|
|
19
|
+
}
|
|
20
|
+
const lines = [];
|
|
21
|
+
lines.push(`# Run Plan: ${plan.name}
|
|
22
|
+
`);
|
|
23
|
+
lines.push(`**ID**: ${plan.id}`);
|
|
24
|
+
lines.push(`**Slug**: ${plan.slug}`);
|
|
25
|
+
lines.push(`**Covers**: ${describeRunPlanScope(plan.scope, plan.scenarioIds)}`);
|
|
26
|
+
lines.push(`**Repeat**: ${plan.repeatCount}x`);
|
|
27
|
+
lines.push(`**Simulator model**: ${plan.simulatorModel ?? "project default"}`);
|
|
28
|
+
lines.push(`**Judge model**: ${plan.judgeModel ?? "project default"}`);
|
|
29
|
+
if (plan.labels.length > 0) {
|
|
30
|
+
lines.push(`**Labels**: ${plan.labels.join(", ")}`);
|
|
31
|
+
}
|
|
32
|
+
if (plan.archivedAt) {
|
|
33
|
+
lines.push(`**Archived**: ${plan.archivedAt}`);
|
|
34
|
+
}
|
|
35
|
+
lines.push(`**Created**: ${plan.createdAt}`);
|
|
36
|
+
lines.push(`**Updated**: ${plan.updatedAt}`);
|
|
37
|
+
lines.push("\n## Targets");
|
|
38
|
+
for (const target of plan.targets) {
|
|
39
|
+
const overrides = Object.entries(target.runParameters ?? {}).map(([name, value]) => `${name}=${String(value)}`).join(", ");
|
|
40
|
+
lines.push(
|
|
41
|
+
`- ${target.type}:${target.referenceId}${overrides ? ` (${overrides})` : ""}`
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
if (plan.scenarioIds.length > 0) {
|
|
45
|
+
lines.push("\n## Scenarios");
|
|
46
|
+
for (const id of plan.scenarioIds) {
|
|
47
|
+
lines.push(`- ${id}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
lines.push(...formatEvaluatorAttachments(plan.evaluators));
|
|
51
|
+
lines.push(`
|
|
52
|
+
**View**: ${plan.platformUrl}`);
|
|
53
|
+
lines.push(
|
|
54
|
+
"\n> Use `platform_rerun_run_plan` to run this configuration again, or `platform_run_plan` with this name to replace it."
|
|
55
|
+
);
|
|
56
|
+
return lines.join("\n");
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
handleGetRunPlan
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=get-run-plan-NY7J5GRE.js.map
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formatScenarioFields
|
|
3
|
+
} from "./chunk-7E4FZIYJ.js";
|
|
1
4
|
import {
|
|
2
5
|
getScenario
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-RVAE2MEA.js";
|
|
7
|
+
import "./chunk-GELJ2MQR.js";
|
|
8
|
+
import "./chunk-WT4PO4A3.js";
|
|
9
|
+
import "./chunk-SAS5OB7F.js";
|
|
7
10
|
|
|
8
11
|
// src/tools/get-scenario.ts
|
|
9
12
|
async function handleGetScenario(params) {
|
|
@@ -26,9 +29,10 @@ async function handleGetScenario(params) {
|
|
|
26
29
|
lines.push(`
|
|
27
30
|
**Labels**: ${scenario.labels.join(", ")}`);
|
|
28
31
|
}
|
|
32
|
+
lines.push(...formatScenarioFields(scenario.fields));
|
|
29
33
|
return lines.join("\n");
|
|
30
34
|
}
|
|
31
35
|
export {
|
|
32
36
|
handleGetScenario
|
|
33
37
|
};
|
|
34
|
-
//# sourceMappingURL=get-scenario-
|
|
38
|
+
//# sourceMappingURL=get-scenario-Q3LLQE4T.js.map
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSimulationRun
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
} from "./chunk-QAMP3CGR.js";
|
|
4
|
+
import {
|
|
5
|
+
formatEvaluations,
|
|
6
|
+
pendingEvaluationNote
|
|
7
|
+
} from "./chunk-UF6XIGYR.js";
|
|
8
|
+
import "./chunk-GELJ2MQR.js";
|
|
9
|
+
import "./chunk-WT4PO4A3.js";
|
|
10
|
+
import "./chunk-SAS5OB7F.js";
|
|
7
11
|
|
|
8
12
|
// src/tools/get-simulation-run.ts
|
|
9
13
|
async function handleGetSimulationRun(params) {
|
|
@@ -18,12 +22,16 @@ async function handleGetSimulationRun(params) {
|
|
|
18
22
|
lines.push(`**Scenario ID**: ${run.scenarioId}`);
|
|
19
23
|
lines.push(`**Batch ID**: ${run.batchRunId}`);
|
|
20
24
|
lines.push(`**Status**: ${run.status}`);
|
|
25
|
+
lines.push(...pendingEvaluationNote(run.status));
|
|
21
26
|
const duration = run.durationInMs > 0 ? `${(run.durationInMs / 1e3).toFixed(1)}s` : "\u2014";
|
|
22
27
|
lines.push(`**Duration**: ${duration}`);
|
|
23
28
|
if (run.totalCost) {
|
|
24
29
|
lines.push(`**Cost**: $${run.totalCost.toFixed(4)}`);
|
|
25
30
|
}
|
|
26
31
|
lines.push(`**Started**: ${new Date(run.timestamp).toISOString()}`);
|
|
32
|
+
if (run.note) {
|
|
33
|
+
lines.push(`**Note**: ${run.note}`);
|
|
34
|
+
}
|
|
27
35
|
if (run.results) {
|
|
28
36
|
lines.push("\n## Results");
|
|
29
37
|
if (run.results.verdict) {
|
|
@@ -41,6 +49,7 @@ async function handleGetSimulationRun(params) {
|
|
|
41
49
|
if (run.results.error) {
|
|
42
50
|
lines.push(`**Error**: ${run.results.error}`);
|
|
43
51
|
}
|
|
52
|
+
lines.push(...formatEvaluations(run.results.evaluations));
|
|
44
53
|
}
|
|
45
54
|
if (run.messages && run.messages.length > 0) {
|
|
46
55
|
lines.push("\n## Conversation");
|
|
@@ -54,4 +63,4 @@ async function handleGetSimulationRun(params) {
|
|
|
54
63
|
export {
|
|
55
64
|
handleGetSimulationRun
|
|
56
65
|
};
|
|
57
|
-
//# sourceMappingURL=get-simulation-run-
|
|
66
|
+
//# sourceMappingURL=get-simulation-run-WINEYDMK.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formatEvaluatorAttachments,
|
|
3
|
+
formatSuiteFields
|
|
4
|
+
} from "./chunk-UF6XIGYR.js";
|
|
5
|
+
import {
|
|
6
|
+
getTestSuite
|
|
7
|
+
} from "./chunk-6DJDEXET.js";
|
|
8
|
+
import "./chunk-GELJ2MQR.js";
|
|
9
|
+
import "./chunk-WT4PO4A3.js";
|
|
10
|
+
import "./chunk-SAS5OB7F.js";
|
|
11
|
+
|
|
12
|
+
// src/tools/get-test-suite.ts
|
|
13
|
+
async function handleGetTestSuite(params) {
|
|
14
|
+
const suite = await getTestSuite(params.id);
|
|
15
|
+
if (params.format === "json") {
|
|
16
|
+
return JSON.stringify(suite, null, 2);
|
|
17
|
+
}
|
|
18
|
+
const lines = [];
|
|
19
|
+
lines.push(`# Test Suite: ${suite.name}
|
|
20
|
+
`);
|
|
21
|
+
lines.push(`**ID**: ${suite.id}`);
|
|
22
|
+
lines.push(`**Slug**: ${suite.slug}`);
|
|
23
|
+
lines.push(`**Scenarios**: ${suite.scenarioCount}`);
|
|
24
|
+
if (suite.archivedAt) {
|
|
25
|
+
lines.push(`**Archived**: ${suite.archivedAt}`);
|
|
26
|
+
}
|
|
27
|
+
lines.push(`**Created**: ${suite.createdAt}`);
|
|
28
|
+
lines.push(`**Updated**: ${suite.updatedAt}`);
|
|
29
|
+
lines.push(...formatSuiteFields(suite.fields));
|
|
30
|
+
lines.push(...formatEvaluatorAttachments(suite.evaluators));
|
|
31
|
+
lines.push("\n## Scenarios");
|
|
32
|
+
if (suite.scenarios.length === 0) {
|
|
33
|
+
lines.push("None filed yet.");
|
|
34
|
+
} else {
|
|
35
|
+
for (const scenario of suite.scenarios) {
|
|
36
|
+
lines.push(`- ${scenario.name} (${scenario.id})`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
lines.push(`
|
|
40
|
+
**View**: ${suite.platformUrl}`);
|
|
41
|
+
lines.push(
|
|
42
|
+
"\n> Use `platform_run_test_suite` to run every scenario of this suite against a target."
|
|
43
|
+
);
|
|
44
|
+
return lines.join("\n");
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
handleGetTestSuite
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=get-test-suite-4HKA7OKS.js.map
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
} from "./chunk-37SMPMQS.js";
|
|
4
4
|
import {
|
|
5
5
|
getTraceById
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-GELJ2MQR.js";
|
|
7
|
+
import "./chunk-WT4PO4A3.js";
|
|
8
|
+
import "./chunk-SAS5OB7F.js";
|
|
9
9
|
|
|
10
10
|
// src/tools/get-trace.ts
|
|
11
11
|
async function handleGetTrace(params) {
|
|
@@ -45,4 +45,4 @@ ${result.formatted_trace}`);
|
|
|
45
45
|
export {
|
|
46
46
|
handleGetTrace
|
|
47
47
|
};
|
|
48
|
-
//# sourceMappingURL=get-trace-
|
|
48
|
+
//# sourceMappingURL=get-trace-RCUV7N4O.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getWorkflow
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-UFOYFYI7.js";
|
|
4
|
+
import "./chunk-GELJ2MQR.js";
|
|
5
|
+
import "./chunk-WT4PO4A3.js";
|
|
6
|
+
import "./chunk-SAS5OB7F.js";
|
|
7
7
|
|
|
8
8
|
// src/tools/get-workflow.ts
|
|
9
9
|
async function handleGetWorkflow(params) {
|
|
@@ -23,4 +23,4 @@ async function handleGetWorkflow(params) {
|
|
|
23
23
|
export {
|
|
24
24
|
handleGetWorkflow
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=get-workflow-
|
|
26
|
+
//# sourceMappingURL=get-workflow-EEOC7Y45.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_BIND_HOST,
|
|
3
|
+
admitOAuthToken,
|
|
4
|
+
apiKeysMatch,
|
|
5
|
+
createApiKeyVerifier,
|
|
6
|
+
createRateLimiter,
|
|
7
|
+
createSessionStore,
|
|
8
|
+
hashApiKey,
|
|
9
|
+
isLoopbackHost,
|
|
10
|
+
isOriginAllowed,
|
|
11
|
+
parseAllowedOrigins
|
|
12
|
+
} from "./chunk-UJPXFA26.js";
|
|
13
|
+
import "./chunk-SAS5OB7F.js";
|
|
14
|
+
export {
|
|
15
|
+
DEFAULT_BIND_HOST,
|
|
16
|
+
admitOAuthToken,
|
|
17
|
+
apiKeysMatch,
|
|
18
|
+
createApiKeyVerifier,
|
|
19
|
+
createRateLimiter,
|
|
20
|
+
createSessionStore,
|
|
21
|
+
hashApiKey,
|
|
22
|
+
isLoopbackHost,
|
|
23
|
+
isOriginAllowed,
|
|
24
|
+
parseAllowedOrigins
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=http-security-EU3CHTY7.js.map
|