@dalmia/calibrate-mcp 0.0.44 → 0.0.46
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/bin/mcp-server.js +408 -229
- package/bin/mcp-server.js.map +17 -12
- package/esm/funcs/agentTestsBulkUnlink.d.ts +16 -0
- package/esm/funcs/agentTestsBulkUnlink.d.ts.map +1 -0
- package/esm/funcs/agentTestsBulkUnlink.js +86 -0
- package/esm/funcs/agentTestsBulkUnlink.js.map +1 -0
- package/esm/funcs/agentTestsListForAgent.js +2 -0
- package/esm/funcs/agentTestsListForAgent.js.map +1 -1
- package/esm/landing-page.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +3 -1
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/agentTestsBulkUnlink.d.ts +7 -0
- package/esm/mcp-server/tools/agentTestsBulkUnlink.d.ts.map +1 -0
- package/esm/mcp-server/tools/agentTestsBulkUnlink.js +39 -0
- package/esm/mcp-server/tools/agentTestsBulkUnlink.js.map +1 -0
- package/esm/models/agenttestbulkdelete.d.ts +7 -0
- package/esm/models/agenttestbulkdelete.d.ts.map +1 -0
- package/esm/models/agenttestbulkdelete.js +10 -0
- package/esm/models/agenttestbulkdelete.js.map +1 -0
- package/esm/models/agenttestsbulkunlinkresponse.d.ts +7 -0
- package/esm/models/agenttestsbulkunlinkresponse.d.ts.map +1 -0
- package/esm/models/agenttestsbulkunlinkresponse.js +9 -0
- package/esm/models/agenttestsbulkunlinkresponse.js.map +1 -0
- package/esm/models/annotationitempayload.d.ts +3 -0
- package/esm/models/annotationitempayload.d.ts.map +1 -1
- package/esm/models/annotationitempayload.js +2 -0
- package/esm/models/annotationitempayload.js.map +1 -1
- package/esm/models/bulkcreateitemsresponse.d.ts +2 -0
- package/esm/models/bulkcreateitemsresponse.d.ts.map +1 -1
- package/esm/models/bulkcreateitemsresponse.js +2 -0
- package/esm/models/bulkcreateitemsresponse.js.map +1 -1
- package/esm/models/bulkdeleteagenttestlinksagenttestsbulkunlinkpostop.d.ts +12 -0
- package/esm/models/bulkdeleteagenttestlinksagenttestsbulkunlinkpostop.d.ts.map +1 -0
- package/esm/models/bulkdeleteagenttestlinksagenttestsbulkunlinkpostop.js +16 -0
- package/esm/models/bulkdeleteagenttestlinksagenttestsbulkunlinkpostop.js.map +1 -0
- package/esm/models/getagenttestsendpointagenttestsagentagentuuidtestsgetop.d.ts +22 -0
- package/esm/models/getagenttestsendpointagenttestsagentagentuuidtestsgetop.d.ts.map +1 -1
- package/esm/models/getagenttestsendpointagenttestsagentagentuuidtestsgetop.js +18 -1
- package/esm/models/getagenttestsendpointagenttestsagentagentuuidtestsgetop.js.map +1 -1
- package/esm/tool-names.d.ts.map +1 -1
- package/esm/tool-names.js +4 -0
- package/esm/tool-names.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/agentTestsBulkUnlink.ts +151 -0
- package/src/funcs/agentTestsListForAgent.ts +2 -0
- package/src/landing-page.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/agentTestsBulkUnlink.ts +48 -0
- package/src/models/agenttestbulkdelete.ts +16 -0
- package/src/models/agenttestsbulkunlinkresponse.ts +19 -0
- package/src/models/annotationitempayload.ts +5 -0
- package/src/models/bulkcreateitemsresponse.ts +8 -0
- package/src/models/bulkdeleteagenttestlinksagenttestsbulkunlinkpostop.ts +42 -0
- package/src/models/getagenttestsendpointagenttestsagentagentuuidtestsgetop.ts +31 -1
- package/src/tool-names.ts +4 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { CalibrateMcpCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { compactMap } from "../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import {
|
|
13
|
+
BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostRequest,
|
|
14
|
+
BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostRequest$zodSchema,
|
|
15
|
+
} from "../models/bulkdeleteagenttestlinksagenttestsbulkunlinkpostop.js";
|
|
16
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
17
|
+
import {
|
|
18
|
+
ConnectionError,
|
|
19
|
+
InvalidRequestError,
|
|
20
|
+
RequestAbortedError,
|
|
21
|
+
RequestTimeoutError,
|
|
22
|
+
UnexpectedClientError,
|
|
23
|
+
} from "../models/errors/httpclienterrors.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Bulk unlink tests from agent
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Unlink one or more tests from an agent. Tests that are not linked are skipped.
|
|
33
|
+
*/
|
|
34
|
+
export function agentTestsBulkUnlink(
|
|
35
|
+
client$: CalibrateMcpCore,
|
|
36
|
+
request: BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
Response,
|
|
41
|
+
| APIError
|
|
42
|
+
| SDKValidationError
|
|
43
|
+
| UnexpectedClientError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
return new APIPromise($do(
|
|
51
|
+
client$,
|
|
52
|
+
request,
|
|
53
|
+
options,
|
|
54
|
+
));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function $do(
|
|
58
|
+
client$: CalibrateMcpCore,
|
|
59
|
+
request: BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostRequest,
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): Promise<
|
|
62
|
+
[
|
|
63
|
+
Result<
|
|
64
|
+
Response,
|
|
65
|
+
| APIError
|
|
66
|
+
| SDKValidationError
|
|
67
|
+
| UnexpectedClientError
|
|
68
|
+
| InvalidRequestError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| ConnectionError
|
|
72
|
+
>,
|
|
73
|
+
APICall,
|
|
74
|
+
]
|
|
75
|
+
> {
|
|
76
|
+
const parsed$ = safeParse(
|
|
77
|
+
request,
|
|
78
|
+
(value$) =>
|
|
79
|
+
BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostRequest$zodSchema.parse(
|
|
80
|
+
value$,
|
|
81
|
+
),
|
|
82
|
+
"Input validation failed",
|
|
83
|
+
);
|
|
84
|
+
if (!parsed$.ok) {
|
|
85
|
+
return [parsed$, { status: "invalid" }];
|
|
86
|
+
}
|
|
87
|
+
const payload$ = parsed$.value;
|
|
88
|
+
const body$ = encodeJSON("body", payload$.body, { explode: true });
|
|
89
|
+
const path$ = pathToFunc("/agent-tests/bulk-unlink")();
|
|
90
|
+
|
|
91
|
+
const headers$ = new Headers(compactMap({
|
|
92
|
+
"Content-Type": "application/json",
|
|
93
|
+
Accept: "application/json",
|
|
94
|
+
"X-API-Key": encodeSimple("X-API-Key", payload$.xAPIKey, {
|
|
95
|
+
explode: false,
|
|
96
|
+
charEncoding: "none",
|
|
97
|
+
}),
|
|
98
|
+
}));
|
|
99
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
100
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
101
|
+
|
|
102
|
+
const context = {
|
|
103
|
+
options: client$._options,
|
|
104
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
105
|
+
operationID: "bulk_delete_agent_test_links_agent_tests_bulk_unlink_post",
|
|
106
|
+
oAuth2Scopes: null,
|
|
107
|
+
resolvedSecurity: requestSecurity,
|
|
108
|
+
securitySource: client$._options.security,
|
|
109
|
+
retryConfig: options?.retries
|
|
110
|
+
|| client$._options.retryConfig
|
|
111
|
+
|| { strategy: "none" },
|
|
112
|
+
retryCodes: options?.retryCodes || [
|
|
113
|
+
"429",
|
|
114
|
+
"500",
|
|
115
|
+
"502",
|
|
116
|
+
"503",
|
|
117
|
+
"504",
|
|
118
|
+
],
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const requestRes = client$._createRequest(context, {
|
|
122
|
+
security: requestSecurity,
|
|
123
|
+
method: "POST",
|
|
124
|
+
baseURL: options?.serverURL,
|
|
125
|
+
path: path$,
|
|
126
|
+
headers: headers$,
|
|
127
|
+
body: body$,
|
|
128
|
+
userAgent: client$._options.userAgent,
|
|
129
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs
|
|
130
|
+
|| -1,
|
|
131
|
+
}, options);
|
|
132
|
+
if (!requestRes.ok) {
|
|
133
|
+
return [requestRes, { status: "invalid" }];
|
|
134
|
+
}
|
|
135
|
+
const req$ = requestRes.value;
|
|
136
|
+
|
|
137
|
+
const doResult = await client$._do(req$, {
|
|
138
|
+
context,
|
|
139
|
+
errorCodes: [],
|
|
140
|
+
retryConfig: context.retryConfig,
|
|
141
|
+
retryCodes: context.retryCodes,
|
|
142
|
+
});
|
|
143
|
+
if (!doResult.ok) {
|
|
144
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
145
|
+
}
|
|
146
|
+
return [doResult, {
|
|
147
|
+
status: "complete",
|
|
148
|
+
"request": req$,
|
|
149
|
+
response: doResult.value,
|
|
150
|
+
}];
|
|
151
|
+
}
|
package/src/landing-page.ts
CHANGED
|
@@ -930,7 +930,7 @@ http_headers = { "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
|
|
|
930
930
|
<h1>Instructions</h1>
|
|
931
931
|
<p>One-click installation for Claude Desktop users</p>
|
|
932
932
|
<div class="instruction-item">
|
|
933
|
-
<a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.
|
|
933
|
+
<a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.46/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
|
|
934
934
|
📥 Download MCP Bundle
|
|
935
935
|
</a>
|
|
936
936
|
</div>
|
package/src/lib/config.ts
CHANGED
|
@@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "0.1.0",
|
|
68
|
-
sdkVersion: "0.0.
|
|
68
|
+
sdkVersion: "0.0.46",
|
|
69
69
|
genVersion: "2.915.1",
|
|
70
70
|
userAgent:
|
|
71
|
-
"speakeasy-sdk/mcp-typescript 0.0.
|
|
71
|
+
"speakeasy-sdk/mcp-typescript 0.0.46 2.915.1 0.1.0 @dalmia/calibrate-mcp",
|
|
72
72
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { tool$agentsResolve } from "./tools/agentsResolve.js";
|
|
|
26
26
|
import { tool$agentsUpdate } from "./tools/agentsUpdate.js";
|
|
27
27
|
import { tool$agentsVerifyConnection } from "./tools/agentsVerifyConnection.js";
|
|
28
28
|
import { tool$agentTestsBenchmark } from "./tools/agentTestsBenchmark.js";
|
|
29
|
+
import { tool$agentTestsBulkUnlink } from "./tools/agentTestsBulkUnlink.js";
|
|
29
30
|
import { tool$agentTestsGetBenchmark } from "./tools/agentTestsGetBenchmark.js";
|
|
30
31
|
import { tool$agentTestsGetRun } from "./tools/agentTestsGetRun.js";
|
|
31
32
|
import { tool$agentTestsLink } from "./tools/agentTestsLink.js";
|
|
@@ -71,7 +72,7 @@ export function createMCPServer(deps: {
|
|
|
71
72
|
}) {
|
|
72
73
|
const server = new McpServer({
|
|
73
74
|
name: "CalibrateMcp",
|
|
74
|
-
version: "0.0.
|
|
75
|
+
version: "0.0.46",
|
|
75
76
|
});
|
|
76
77
|
|
|
77
78
|
const getClient = deps.getSDK || (() =>
|
|
@@ -132,6 +133,7 @@ export function createMCPServer(deps: {
|
|
|
132
133
|
tool(tool$agentTestsLink);
|
|
133
134
|
tool(tool$agentTestsListForAgent);
|
|
134
135
|
tool(tool$agentTestsListRunsForAgent);
|
|
136
|
+
tool(tool$agentTestsBulkUnlink);
|
|
135
137
|
tool(tool$agentTestsRun);
|
|
136
138
|
tool(tool$agentTestsRunBatch);
|
|
137
139
|
tool(tool$agentTestsGetRun);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { agentTestsBulkUnlink } from "../../funcs/agentTestsBulkUnlink.js";
|
|
6
|
+
import { BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostRequest$zodSchema } from "../../models/bulkdeleteagenttestlinksagenttestsbulkunlinkpostop.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostRequest$zodSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$agentTestsBulkUnlink: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "bulk-unlink-agent-tests",
|
|
15
|
+
description:
|
|
16
|
+
`Remove one or more tests from an agent in a single call. The tests
|
|
17
|
+
themselves are kept and stay available to other agents; only the links
|
|
18
|
+
to this agent go. Tests that were not linked are skipped, so
|
|
19
|
+
deleted_count can be lower than the number of ids sent. Fails with 404
|
|
20
|
+
when the agent is not in the caller's org and 400 when test_uuids is
|
|
21
|
+
empty.
|
|
22
|
+
`,
|
|
23
|
+
scopes: ["write"],
|
|
24
|
+
annotations: {
|
|
25
|
+
"title": "Unlink tests from an agent",
|
|
26
|
+
"destructiveHint": true,
|
|
27
|
+
"idempotentHint": true,
|
|
28
|
+
"openWorldHint": true,
|
|
29
|
+
"readOnlyHint": false,
|
|
30
|
+
},
|
|
31
|
+
args,
|
|
32
|
+
tool: async (client, args, ctx) => {
|
|
33
|
+
const [result] = await agentTestsBulkUnlink(
|
|
34
|
+
client,
|
|
35
|
+
args.request,
|
|
36
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
37
|
+
).$inspect();
|
|
38
|
+
|
|
39
|
+
if (!result.ok) {
|
|
40
|
+
return {
|
|
41
|
+
content: [{ type: "text", text: result.error.message }],
|
|
42
|
+
isError: true,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return formatResult(result.value);
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type AgentTestBulkDelete = {
|
|
8
|
+
agent_uuid: string;
|
|
9
|
+
test_uuids: Array<string>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const AgentTestBulkDelete$zodSchema: z.ZodType<AgentTestBulkDelete> = z
|
|
13
|
+
.object({
|
|
14
|
+
agent_uuid: z.string().describe("Agent to unlink tests from"),
|
|
15
|
+
test_uuids: z.array(z.string()).describe("Tests to unlink from the agent"),
|
|
16
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type AgentTestsBulkUnlinkResponse = {
|
|
8
|
+
deleted_count: number;
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const AgentTestsBulkUnlinkResponse$zodSchema: z.ZodType<
|
|
13
|
+
AgentTestsBulkUnlinkResponse
|
|
14
|
+
> = z.object({
|
|
15
|
+
deleted_count: z.int().describe(
|
|
16
|
+
"Number of links removed. Tests that were not linked are excluded",
|
|
17
|
+
),
|
|
18
|
+
message: z.string().describe("Confirmation message"),
|
|
19
|
+
});
|
|
@@ -7,6 +7,7 @@ import * as z from "zod";
|
|
|
7
7
|
export type AnnotationItemPayload = {
|
|
8
8
|
payload?: any | undefined;
|
|
9
9
|
annotations?: { [k: string]: any } | null | undefined;
|
|
10
|
+
evaluator_results?: { [k: string]: any } | null | undefined;
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
export const AnnotationItemPayload$zodSchema: z.ZodType<AnnotationItemPayload> =
|
|
@@ -14,6 +15,10 @@ export const AnnotationItemPayload$zodSchema: z.ZodType<AnnotationItemPayload> =
|
|
|
14
15
|
annotations: z.record(z.string(), z.any()).nullable().optional().describe(
|
|
15
16
|
"Human annotations to seed, keyed by evaluator ID. Each evaluator ID must be linked to the task. Put the judgement in `value`, a bool for binary or a number for rating, with optional `reasoning`. Requires `annotator_id`",
|
|
16
17
|
),
|
|
18
|
+
evaluator_results: z.record(z.string(), z.any()).nullable().optional()
|
|
19
|
+
.describe(
|
|
20
|
+
"Evaluator scores to record, keyed by evaluator ID. Each evaluator ID must be linked to the task. Put the score in `value`, a bool for binary or a number within the scale for rating, with optional `reasoning` and `version_number`. Omit `version_number` to record against the evaluator's live version. An item recording a tool call takes the tool-call evaluator and no other, and every other item takes any evaluator except that one",
|
|
21
|
+
),
|
|
17
22
|
payload: z.any().optional().describe(
|
|
18
23
|
"The item's payload. `name` is required and unique within the task for every type. The other fields depend on the task `type`:\n\n- `stt`: `name`, `reference_transcript`, `predicted_transcript`\n- `llm`: `name`, `chat_history` (list of `{role, content}` turns ending at the user turn), `agent_response` (the reply to judge), optional `evaluator_variables`\n- `llm-general`: `name`, `input`, `output`, optional `evaluator_variables`\n- `conversation`: `name`, `transcript` (list of `{role, content}` turns), optional `evaluator_variables`\n\n`evaluator_variables` maps an evaluator ID to that evaluator's `{{\"{{\"}}variable}}` values for this item",
|
|
19
24
|
),
|
|
@@ -10,6 +10,8 @@ export type BulkCreateItemsResponse = {
|
|
|
10
10
|
new_item_ids?: Array<string> | null | undefined;
|
|
11
11
|
existing_item_ids?: Array<string> | null | undefined;
|
|
12
12
|
annotation_job_id?: string | null | undefined;
|
|
13
|
+
evaluator_result_count?: number | null | undefined;
|
|
14
|
+
evaluator_run_job_id?: string | null | undefined;
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
export const BulkCreateItemsResponse$zodSchema: z.ZodType<
|
|
@@ -19,6 +21,12 @@ export const BulkCreateItemsResponse$zodSchema: z.ZodType<
|
|
|
19
21
|
"ID of the labelling job that holds the annotations you provided, present only when you send annotations with the items",
|
|
20
22
|
),
|
|
21
23
|
count: z.int().describe("How many items the request resolved to"),
|
|
24
|
+
evaluator_result_count: z.int().nullable().optional().describe(
|
|
25
|
+
"How many evaluator scores were stored, present only when you send `evaluator_results` with the items",
|
|
26
|
+
),
|
|
27
|
+
evaluator_run_job_id: z.string().nullable().optional().describe(
|
|
28
|
+
"ID of the evaluator-run job that holds the scores you provided, present only when you send `evaluator_results` with the items",
|
|
29
|
+
),
|
|
22
30
|
existing_item_ids: z.array(z.string()).nullable().optional().describe(
|
|
23
31
|
"IDs of items that already existed by name and were reused",
|
|
24
32
|
),
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
AgentTestBulkDelete,
|
|
8
|
+
AgentTestBulkDelete$zodSchema,
|
|
9
|
+
} from "./agenttestbulkdelete.js";
|
|
10
|
+
import {
|
|
11
|
+
AgentTestsBulkUnlinkResponse,
|
|
12
|
+
AgentTestsBulkUnlinkResponse$zodSchema,
|
|
13
|
+
} from "./agenttestsbulkunlinkresponse.js";
|
|
14
|
+
import {
|
|
15
|
+
HTTPValidationError,
|
|
16
|
+
HTTPValidationError$zodSchema,
|
|
17
|
+
} from "./httpvalidationerror.js";
|
|
18
|
+
|
|
19
|
+
export type BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostRequest = {
|
|
20
|
+
xAPIKey?: string | null | undefined;
|
|
21
|
+
body: AgentTestBulkDelete;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostRequest$zodSchema:
|
|
25
|
+
z.ZodType<BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostRequest> = z.object(
|
|
26
|
+
{
|
|
27
|
+
body: AgentTestBulkDelete$zodSchema,
|
|
28
|
+
xAPIKey: z.string().nullable().optional(),
|
|
29
|
+
},
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export type BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostResponse =
|
|
33
|
+
| AgentTestsBulkUnlinkResponse
|
|
34
|
+
| HTTPValidationError;
|
|
35
|
+
|
|
36
|
+
export const BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostResponse$zodSchema:
|
|
37
|
+
z.ZodType<BulkDeleteAgentTestLinksAgentTestsBulkUnlinkPostResponse> = z.union(
|
|
38
|
+
[
|
|
39
|
+
AgentTestsBulkUnlinkResponse$zodSchema,
|
|
40
|
+
HTTPValidationError$zodSchema,
|
|
41
|
+
],
|
|
42
|
+
);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
6
7
|
import {
|
|
7
8
|
HTTPValidationError,
|
|
8
9
|
HTTPValidationError$zodSchema,
|
|
@@ -12,9 +13,32 @@ import {
|
|
|
12
13
|
PaginatedResponseTestListResponse$zodSchema,
|
|
13
14
|
} from "./paginatedresponsetestlistresponse.js";
|
|
14
15
|
|
|
16
|
+
/**
|
|
17
|
+
* How to match `q` against the searched fields
|
|
18
|
+
*/
|
|
19
|
+
export const QMode = {
|
|
20
|
+
Contains: "contains",
|
|
21
|
+
StartsWith: "starts_with",
|
|
22
|
+
EndsWith: "ends_with",
|
|
23
|
+
Exact: "exact",
|
|
24
|
+
} as const;
|
|
25
|
+
/**
|
|
26
|
+
* How to match `q` against the searched fields
|
|
27
|
+
*/
|
|
28
|
+
export type QMode = ClosedEnum<typeof QMode>;
|
|
29
|
+
|
|
30
|
+
export const QMode$zodSchema = z.enum([
|
|
31
|
+
"contains",
|
|
32
|
+
"starts_with",
|
|
33
|
+
"ends_with",
|
|
34
|
+
"exact",
|
|
35
|
+
]).describe("How to match `q` against the searched fields");
|
|
36
|
+
|
|
15
37
|
export type GetAgentTestsEndpointAgentTestsAgentAgentUuidTestsGetRequest = {
|
|
16
38
|
agent_uuid: string;
|
|
39
|
+
type?: Array<string> | null | undefined;
|
|
17
40
|
q?: string | null | undefined;
|
|
41
|
+
q_mode?: QMode | undefined;
|
|
18
42
|
limit?: number | null | undefined;
|
|
19
43
|
offset?: number | undefined;
|
|
20
44
|
xAPIKey?: string | null | undefined;
|
|
@@ -31,7 +55,13 @@ export const GetAgentTestsEndpointAgentTestsAgentAgentUuidTestsGetRequest$zodSch
|
|
|
31
55
|
"Number of items to skip before returning results",
|
|
32
56
|
),
|
|
33
57
|
q: z.string().describe(
|
|
34
|
-
"Case-insensitive
|
|
58
|
+
"Case-insensitive search on `name`. Blank is a no-op",
|
|
59
|
+
).nullable().optional(),
|
|
60
|
+
q_mode: QMode$zodSchema.default("contains").describe(
|
|
61
|
+
"How to match `q` against the searched fields",
|
|
62
|
+
),
|
|
63
|
+
type: z.array(z.string()).describe(
|
|
64
|
+
"Keep only tests of these types. Repeat the parameter or pass one comma-separated value. Accepts `response`, `tool_call`, `conversation`, `general`",
|
|
35
65
|
).nullable().optional(),
|
|
36
66
|
xAPIKey: z.string().nullable().optional(),
|
|
37
67
|
});
|
package/src/tool-names.ts
CHANGED
|
@@ -64,6 +64,10 @@ export const toolNames: Array<{ name: string; description: string }>= [
|
|
|
64
64
|
"name": "list-agent-test-runs",
|
|
65
65
|
"description": "List an agent's test and benchmark runs, most recently created first, with their status and results.\n"
|
|
66
66
|
},
|
|
67
|
+
{
|
|
68
|
+
"name": "bulk-unlink-agent-tests",
|
|
69
|
+
"description": "Remove one or more tests from an agent in a single call. The tests\nthemselves are kept and stay available to other agents; only the links\nto this agent go. Tests that were not linked are skipped, so\ndeleted_count can be lower than the number of ids sent. Fails with 404\nwhen the agent is not in the caller's org and 400 when test_uuids is\nempty.\n"
|
|
70
|
+
},
|
|
67
71
|
{
|
|
68
72
|
"name": "run-agent-tests",
|
|
69
73
|
"description": "Start a background LLM unit-test job for one agent. Runs all tests\nlinked to the agent unless test_uuids is provided. Returns a task_id\nto poll with get-agent-test-run. The agent must belong to the caller's\norg and have a verified connection; otherwise the call fails with 400\nor 404.\n"
|