@dalmia/calibrate-mcp 0.0.44 → 0.0.45

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 (51) hide show
  1. package/bin/mcp-server.js +405 -229
  2. package/bin/mcp-server.js.map +15 -10
  3. package/esm/funcs/agentTestsBulkUnlink.d.ts +16 -0
  4. package/esm/funcs/agentTestsBulkUnlink.d.ts.map +1 -0
  5. package/esm/funcs/agentTestsBulkUnlink.js +86 -0
  6. package/esm/funcs/agentTestsBulkUnlink.js.map +1 -0
  7. package/esm/funcs/agentTestsListForAgent.js +2 -0
  8. package/esm/funcs/agentTestsListForAgent.js.map +1 -1
  9. package/esm/landing-page.js +1 -1
  10. package/esm/lib/config.d.ts +2 -2
  11. package/esm/lib/config.js +2 -2
  12. package/esm/mcp-server/mcp-server.js +1 -1
  13. package/esm/mcp-server/server.d.ts.map +1 -1
  14. package/esm/mcp-server/server.js +3 -1
  15. package/esm/mcp-server/server.js.map +1 -1
  16. package/esm/mcp-server/tools/agentTestsBulkUnlink.d.ts +7 -0
  17. package/esm/mcp-server/tools/agentTestsBulkUnlink.d.ts.map +1 -0
  18. package/esm/mcp-server/tools/agentTestsBulkUnlink.js +39 -0
  19. package/esm/mcp-server/tools/agentTestsBulkUnlink.js.map +1 -0
  20. package/esm/models/agenttestbulkdelete.d.ts +7 -0
  21. package/esm/models/agenttestbulkdelete.d.ts.map +1 -0
  22. package/esm/models/agenttestbulkdelete.js +10 -0
  23. package/esm/models/agenttestbulkdelete.js.map +1 -0
  24. package/esm/models/agenttestsbulkunlinkresponse.d.ts +7 -0
  25. package/esm/models/agenttestsbulkunlinkresponse.d.ts.map +1 -0
  26. package/esm/models/agenttestsbulkunlinkresponse.js +9 -0
  27. package/esm/models/agenttestsbulkunlinkresponse.js.map +1 -0
  28. package/esm/models/bulkdeleteagenttestlinksagenttestsbulkunlinkpostop.d.ts +12 -0
  29. package/esm/models/bulkdeleteagenttestlinksagenttestsbulkunlinkpostop.d.ts.map +1 -0
  30. package/esm/models/bulkdeleteagenttestlinksagenttestsbulkunlinkpostop.js +16 -0
  31. package/esm/models/bulkdeleteagenttestlinksagenttestsbulkunlinkpostop.js.map +1 -0
  32. package/esm/models/getagenttestsendpointagenttestsagentagentuuidtestsgetop.d.ts +22 -0
  33. package/esm/models/getagenttestsendpointagenttestsagentagentuuidtestsgetop.d.ts.map +1 -1
  34. package/esm/models/getagenttestsendpointagenttestsagentagentuuidtestsgetop.js +18 -1
  35. package/esm/models/getagenttestsendpointagenttestsagentagentuuidtestsgetop.js.map +1 -1
  36. package/esm/tool-names.d.ts.map +1 -1
  37. package/esm/tool-names.js +4 -0
  38. package/esm/tool-names.js.map +1 -1
  39. package/package.json +1 -1
  40. package/src/funcs/agentTestsBulkUnlink.ts +151 -0
  41. package/src/funcs/agentTestsListForAgent.ts +2 -0
  42. package/src/landing-page.ts +1 -1
  43. package/src/lib/config.ts +2 -2
  44. package/src/mcp-server/mcp-server.ts +1 -1
  45. package/src/mcp-server/server.ts +3 -1
  46. package/src/mcp-server/tools/agentTestsBulkUnlink.ts +48 -0
  47. package/src/models/agenttestbulkdelete.ts +16 -0
  48. package/src/models/agenttestsbulkunlinkresponse.ts +19 -0
  49. package/src/models/bulkdeleteagenttestlinksagenttestsbulkunlinkpostop.ts +42 -0
  50. package/src/models/getagenttestsendpointagenttestsagentagentuuidtestsgetop.ts +31 -1
  51. 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
+ }
@@ -99,6 +99,8 @@ async function $do(
99
99
  "limit": payload$.limit,
100
100
  "offset": payload$.offset,
101
101
  "q": payload$.q,
102
+ "q_mode": payload$.q_mode,
103
+ "type": payload$.type,
102
104
  });
103
105
 
104
106
  const headers$ = new Headers(compactMap({
@@ -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.44/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
933
+ <a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.45/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.44",
68
+ sdkVersion: "0.0.45",
69
69
  genVersion: "2.915.1",
70
70
  userAgent:
71
- "speakeasy-sdk/mcp-typescript 0.0.44 2.915.1 0.1.0 @dalmia/calibrate-mcp",
71
+ "speakeasy-sdk/mcp-typescript 0.0.45 2.915.1 0.1.0 @dalmia/calibrate-mcp",
72
72
  } as const;
@@ -21,7 +21,7 @@ const routes = buildRouteMap({
21
21
  export const app = buildApplication(routes, {
22
22
  name: "mcp",
23
23
  versionInfo: {
24
- currentVersion: "0.0.44",
24
+ currentVersion: "0.0.45",
25
25
  },
26
26
  });
27
27
 
@@ -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.44",
75
+ version: "0.0.45",
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
+ });
@@ -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 substring search on `name`. Blank is a no-op",
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"