@dalmia/calibrate-mcp 0.0.25 → 0.0.27

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 (109) hide show
  1. package/bin/mcp-server.js +734 -405
  2. package/bin/mcp-server.js.map +25 -17
  3. package/esm/funcs/agentsLinkEvaluators.d.ts +16 -0
  4. package/esm/funcs/agentsLinkEvaluators.d.ts.map +1 -0
  5. package/esm/funcs/agentsLinkEvaluators.js +92 -0
  6. package/esm/funcs/agentsLinkEvaluators.js.map +1 -0
  7. package/esm/funcs/agentsListEvaluators.d.ts +16 -0
  8. package/esm/funcs/agentsListEvaluators.d.ts.map +1 -0
  9. package/esm/funcs/agentsListEvaluators.js +97 -0
  10. package/esm/funcs/agentsListEvaluators.js.map +1 -0
  11. package/esm/funcs/annotationTasksSetEvaluators.d.ts +16 -0
  12. package/esm/funcs/annotationTasksSetEvaluators.d.ts.map +1 -0
  13. package/esm/funcs/{annotationTasksLinkEvaluator.js → annotationTasksSetEvaluators.js} +8 -8
  14. package/esm/funcs/{annotationTasksLinkEvaluator.js.map → annotationTasksSetEvaluators.js.map} +1 -1
  15. package/esm/landing-page.js +1 -1
  16. package/esm/lib/config.d.ts +2 -2
  17. package/esm/lib/config.js +2 -2
  18. package/esm/mcp-server/mcp-server.js +1 -1
  19. package/esm/mcp-server/server.d.ts.map +1 -1
  20. package/esm/mcp-server/server.js +7 -3
  21. package/esm/mcp-server/server.js.map +1 -1
  22. package/esm/mcp-server/tools/agentsLinkEvaluators.d.ts +7 -0
  23. package/esm/mcp-server/tools/agentsLinkEvaluators.d.ts.map +1 -0
  24. package/esm/mcp-server/tools/agentsLinkEvaluators.js +36 -0
  25. package/esm/mcp-server/tools/agentsLinkEvaluators.js.map +1 -0
  26. package/esm/mcp-server/tools/agentsListEvaluators.d.ts +7 -0
  27. package/esm/mcp-server/tools/agentsListEvaluators.d.ts.map +1 -0
  28. package/esm/mcp-server/tools/agentsListEvaluators.js +35 -0
  29. package/esm/mcp-server/tools/agentsListEvaluators.js.map +1 -0
  30. package/esm/mcp-server/tools/annotationTasksSetEvaluators.d.ts +7 -0
  31. package/esm/mcp-server/tools/annotationTasksSetEvaluators.d.ts.map +1 -0
  32. package/esm/mcp-server/tools/annotationTasksSetEvaluators.js +38 -0
  33. package/esm/mcp-server/tools/annotationTasksSetEvaluators.js.map +1 -0
  34. package/esm/models/evaluatorcreate.d.ts +1 -1
  35. package/esm/models/evaluatordetailresponsecompact.d.ts +1 -1
  36. package/esm/models/evaluatorsetrequest.d.ts +6 -0
  37. package/esm/models/evaluatorsetrequest.d.ts.map +1 -0
  38. package/esm/models/evaluatorsetrequest.js +9 -0
  39. package/esm/models/evaluatorsetrequest.js.map +1 -0
  40. package/esm/models/evaluatorsetresponse.d.ts +9 -0
  41. package/esm/models/evaluatorsetresponse.d.ts.map +1 -0
  42. package/esm/models/evaluatorsetresponse.js +12 -0
  43. package/esm/models/evaluatorsetresponse.js.map +1 -0
  44. package/esm/models/linkevaluatorstoagentagentsagentuuidevaluatorspostop.d.ts +13 -0
  45. package/esm/models/linkevaluatorstoagentagentsagentuuidevaluatorspostop.d.ts.map +1 -0
  46. package/esm/models/linkevaluatorstoagentagentsagentuuidevaluatorspostop.js +19 -0
  47. package/esm/models/linkevaluatorstoagentagentsagentuuidevaluatorspostop.js.map +1 -0
  48. package/esm/models/listagentevaluatorsagentsagentuuidevaluatorsgetop.d.ts +14 -0
  49. package/esm/models/listagentevaluatorsagentsagentuuidevaluatorsgetop.d.ts.map +1 -0
  50. package/esm/models/listagentevaluatorsagentsagentuuidevaluatorsgetop.js +18 -0
  51. package/esm/models/listagentevaluatorsagentsagentuuidevaluatorsgetop.js.map +1 -0
  52. package/esm/models/listevaluatorsevaluatorsgetop.d.ts +1 -1
  53. package/esm/models/routersagentsevaluatorlinkrequest.d.ts +6 -0
  54. package/esm/models/routersagentsevaluatorlinkrequest.d.ts.map +1 -0
  55. package/esm/models/routersagentsevaluatorlinkrequest.js +8 -0
  56. package/esm/models/routersagentsevaluatorlinkrequest.js.map +1 -0
  57. package/esm/models/routersagentsevaluatorlinkresponse.d.ts +8 -0
  58. package/esm/models/routersagentsevaluatorlinkresponse.d.ts.map +1 -0
  59. package/esm/models/routersagentsevaluatorlinkresponse.js +10 -0
  60. package/esm/models/routersagentsevaluatorlinkresponse.js.map +1 -0
  61. package/esm/models/routersevaluatorsevaluatorresponse.d.ts +1 -1
  62. package/esm/models/settaskevaluatorsannotationtaskstaskuuidevaluatorsputop.d.ts +13 -0
  63. package/esm/models/settaskevaluatorsannotationtaskstaskuuidevaluatorsputop.d.ts.map +1 -0
  64. package/esm/models/settaskevaluatorsannotationtaskstaskuuidevaluatorsputop.js +19 -0
  65. package/esm/models/settaskevaluatorsannotationtaskstaskuuidevaluatorsputop.js.map +1 -0
  66. package/esm/tool-names.d.ts.map +1 -1
  67. package/esm/tool-names.js +10 -2
  68. package/esm/tool-names.js.map +1 -1
  69. package/package.json +1 -1
  70. package/src/funcs/agentsLinkEvaluators.ts +160 -0
  71. package/src/funcs/agentsListEvaluators.ts +165 -0
  72. package/src/funcs/{annotationTasksLinkEvaluator.ts → annotationTasksSetEvaluators.ts} +11 -11
  73. package/src/landing-page.ts +1 -1
  74. package/src/lib/config.ts +2 -2
  75. package/src/mcp-server/mcp-server.ts +1 -1
  76. package/src/mcp-server/server.ts +7 -3
  77. package/src/mcp-server/tools/agentsLinkEvaluators.ts +45 -0
  78. package/src/mcp-server/tools/agentsListEvaluators.ts +44 -0
  79. package/src/mcp-server/tools/annotationTasksSetEvaluators.ts +48 -0
  80. package/src/models/evaluatorsetrequest.ts +14 -0
  81. package/src/models/evaluatorsetresponse.ts +28 -0
  82. package/src/models/linkevaluatorstoagentagentsagentuuidevaluatorspostop.ts +42 -0
  83. package/src/models/listagentevaluatorsagentsagentuuidevaluatorsgetop.ts +46 -0
  84. package/src/models/routersagentsevaluatorlinkrequest.ts +17 -0
  85. package/src/models/routersagentsevaluatorlinkresponse.ts +23 -0
  86. package/src/models/settaskevaluatorsannotationtaskstaskuuidevaluatorsputop.ts +42 -0
  87. package/src/tool-names.ts +10 -2
  88. package/esm/funcs/annotationTasksLinkEvaluator.d.ts +0 -16
  89. package/esm/funcs/annotationTasksLinkEvaluator.d.ts.map +0 -1
  90. package/esm/mcp-server/tools/annotationTasksLinkEvaluator.d.ts +0 -7
  91. package/esm/mcp-server/tools/annotationTasksLinkEvaluator.d.ts.map +0 -1
  92. package/esm/mcp-server/tools/annotationTasksLinkEvaluator.js +0 -34
  93. package/esm/mcp-server/tools/annotationTasksLinkEvaluator.js.map +0 -1
  94. package/esm/models/evaluatorlinkrequest.d.ts +0 -6
  95. package/esm/models/evaluatorlinkrequest.d.ts.map +0 -1
  96. package/esm/models/evaluatorlinkrequest.js +0 -9
  97. package/esm/models/evaluatorlinkrequest.js.map +0 -1
  98. package/esm/models/evaluatorlinkresponse.d.ts +0 -6
  99. package/esm/models/evaluatorlinkresponse.d.ts.map +0 -1
  100. package/esm/models/evaluatorlinkresponse.js +0 -8
  101. package/esm/models/evaluatorlinkresponse.js.map +0 -1
  102. package/esm/models/linkevaluatortotaskannotationtaskstaskuuidevaluatorspostop.d.ts +0 -13
  103. package/esm/models/linkevaluatortotaskannotationtaskstaskuuidevaluatorspostop.d.ts.map +0 -1
  104. package/esm/models/linkevaluatortotaskannotationtaskstaskuuidevaluatorspostop.js +0 -18
  105. package/esm/models/linkevaluatortotaskannotationtaskstaskuuidevaluatorspostop.js.map +0 -1
  106. package/src/mcp-server/tools/annotationTasksLinkEvaluator.ts +0 -44
  107. package/src/models/evaluatorlinkrequest.ts +0 -14
  108. package/src/models/evaluatorlinkresponse.ts +0 -12
  109. package/src/models/linkevaluatortotaskannotationtaskstaskuuidevaluatorspostop.ts +0 -42
@@ -0,0 +1,165 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { CalibrateMcpCore } from "../core.js";
6
+ import { encodeFormQuery, 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 { APIError } from "../models/errors/apierror.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import {
22
+ ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetRequest,
23
+ ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetRequest$zodSchema,
24
+ } from "../models/listagentevaluatorsagentsagentuuidevaluatorsgetop.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * List agent evaluators
30
+ *
31
+ * @remarks
32
+ * List evaluators linked to an agent
33
+ */
34
+ export function agentsListEvaluators(
35
+ client$: CalibrateMcpCore,
36
+ request: ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetRequest,
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: ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetRequest,
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
+ ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetRequest$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$ = null;
89
+
90
+ const pathParams$ = {
91
+ agent_uuid: encodeSimple("agent_uuid", payload$.agent_uuid, {
92
+ explode: false,
93
+ charEncoding: "percent",
94
+ }),
95
+ };
96
+ const path$ = pathToFunc("/agents/{agent_uuid}/evaluators")(
97
+ pathParams$,
98
+ );
99
+ const query$ = encodeFormQuery({
100
+ "limit": payload$.limit,
101
+ "offset": payload$.offset,
102
+ "q": payload$.q,
103
+ });
104
+
105
+ const headers$ = new Headers(compactMap({
106
+ Accept: "application/json",
107
+ "X-API-Key": encodeSimple("X-API-Key", payload$.xAPIKey, {
108
+ explode: false,
109
+ charEncoding: "none",
110
+ }),
111
+ }));
112
+ const securityInput = await extractSecurity(client$._options.security);
113
+ const requestSecurity = resolveGlobalSecurity(securityInput);
114
+
115
+ const context = {
116
+ options: client$._options,
117
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
118
+ operationID: "list_agent_evaluators_agents__agent_uuid__evaluators_get",
119
+ oAuth2Scopes: null,
120
+ resolvedSecurity: requestSecurity,
121
+ securitySource: client$._options.security,
122
+ retryConfig: options?.retries
123
+ || client$._options.retryConfig
124
+ || { strategy: "none" },
125
+ retryCodes: options?.retryCodes || [
126
+ "429",
127
+ "500",
128
+ "502",
129
+ "503",
130
+ "504",
131
+ ],
132
+ };
133
+
134
+ const requestRes = client$._createRequest(context, {
135
+ security: requestSecurity,
136
+ method: "GET",
137
+ baseURL: options?.serverURL,
138
+ path: path$,
139
+ headers: headers$,
140
+ query: query$,
141
+ body: body$,
142
+ userAgent: client$._options.userAgent,
143
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
144
+ || -1,
145
+ }, options);
146
+ if (!requestRes.ok) {
147
+ return [requestRes, { status: "invalid" }];
148
+ }
149
+ const req$ = requestRes.value;
150
+
151
+ const doResult = await client$._do(req$, {
152
+ context,
153
+ errorCodes: [],
154
+ retryConfig: context.retryConfig,
155
+ retryCodes: context.retryCodes,
156
+ });
157
+ if (!doResult.ok) {
158
+ return [doResult, { status: "request-error", request: req$ }];
159
+ }
160
+ return [doResult, {
161
+ status: "complete",
162
+ "request": req$,
163
+ response: doResult.value,
164
+ }];
165
+ }
@@ -19,21 +19,21 @@ import {
19
19
  } from "../models/errors/httpclienterrors.js";
20
20
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
21
  import {
22
- LinkEvaluatorToTaskAnnotationTasksTaskUuidEvaluatorsPostRequest,
23
- LinkEvaluatorToTaskAnnotationTasksTaskUuidEvaluatorsPostRequest$zodSchema,
24
- } from "../models/linkevaluatortotaskannotationtaskstaskuuidevaluatorspostop.js";
22
+ SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutRequest,
23
+ SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutRequest$zodSchema,
24
+ } from "../models/settaskevaluatorsannotationtaskstaskuuidevaluatorsputop.js";
25
25
  import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Link evaluator to task
29
+ * Update task evaluators
30
30
  *
31
31
  * @remarks
32
- * Link an evaluator to a task, appending it to the display order
32
+ * Replace a task's linked evaluators with the given ordered set, linking, unlinking, and reordering as needed
33
33
  */
34
- export function annotationTasksLinkEvaluator(
34
+ export function annotationTasksSetEvaluators(
35
35
  client$: CalibrateMcpCore,
36
- request: LinkEvaluatorToTaskAnnotationTasksTaskUuidEvaluatorsPostRequest,
36
+ request: SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutRequest,
37
37
  options?: RequestOptions,
38
38
  ): APIPromise<
39
39
  Result<
@@ -56,7 +56,7 @@ export function annotationTasksLinkEvaluator(
56
56
 
57
57
  async function $do(
58
58
  client$: CalibrateMcpCore,
59
- request: LinkEvaluatorToTaskAnnotationTasksTaskUuidEvaluatorsPostRequest,
59
+ request: SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutRequest,
60
60
  options?: RequestOptions,
61
61
  ): Promise<
62
62
  [
@@ -76,7 +76,7 @@ async function $do(
76
76
  const parsed$ = safeParse(
77
77
  request,
78
78
  (value$) =>
79
- LinkEvaluatorToTaskAnnotationTasksTaskUuidEvaluatorsPostRequest$zodSchema
79
+ SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutRequest$zodSchema
80
80
  .parse(value$),
81
81
  "Input validation failed",
82
82
  );
@@ -111,7 +111,7 @@ async function $do(
111
111
  options: client$._options,
112
112
  baseURL: options?.serverURL ?? client$._baseURL ?? "",
113
113
  operationID:
114
- "link_evaluator_to_task_annotation_tasks__task_uuid__evaluators_post",
114
+ "set_task_evaluators_annotation_tasks__task_uuid__evaluators_put",
115
115
  oAuth2Scopes: null,
116
116
  resolvedSecurity: requestSecurity,
117
117
  securitySource: client$._options.security,
@@ -129,7 +129,7 @@ async function $do(
129
129
 
130
130
  const requestRes = client$._createRequest(context, {
131
131
  security: requestSecurity,
132
- method: "POST",
132
+ method: "PUT",
133
133
  baseURL: options?.serverURL,
134
134
  path: path$,
135
135
  headers: headers$,
@@ -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.25/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.27/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.25",
68
+ sdkVersion: "0.0.27",
69
69
  genVersion: "2.915.1",
70
70
  userAgent:
71
- "speakeasy-sdk/mcp-typescript 0.0.25 2.915.1 0.1.0 @dalmia/calibrate-mcp",
71
+ "speakeasy-sdk/mcp-typescript 0.0.27 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.25",
24
+ currentVersion: "0.0.27",
25
25
  },
26
26
  });
27
27
 
@@ -19,7 +19,9 @@ import {
19
19
  } from "./tools.js";
20
20
  import { tool$agentsCreate } from "./tools/agentsCreate.js";
21
21
  import { tool$agentsGet } from "./tools/agentsGet.js";
22
+ import { tool$agentsLinkEvaluators } from "./tools/agentsLinkEvaluators.js";
22
23
  import { tool$agentsList } from "./tools/agentsList.js";
24
+ import { tool$agentsListEvaluators } from "./tools/agentsListEvaluators.js";
23
25
  import { tool$agentsResolve } from "./tools/agentsResolve.js";
24
26
  import { tool$agentsUpdate } from "./tools/agentsUpdate.js";
25
27
  import { tool$agentsVerifyConnection } from "./tools/agentsVerifyConnection.js";
@@ -38,8 +40,8 @@ import { tool$annotationTasksGet } from "./tools/annotationTasksGet.js";
38
40
  import { tool$annotationTasksGetAgreement } from "./tools/annotationTasksGetAgreement.js";
39
41
  import { tool$annotationTasksGetEvaluatorRun } from "./tools/annotationTasksGetEvaluatorRun.js";
40
42
  import { tool$annotationTasksGetSummary } from "./tools/annotationTasksGetSummary.js";
41
- import { tool$annotationTasksLinkEvaluator } from "./tools/annotationTasksLinkEvaluator.js";
42
43
  import { tool$annotationTasksList } from "./tools/annotationTasksList.js";
44
+ import { tool$annotationTasksSetEvaluators } from "./tools/annotationTasksSetEvaluators.js";
43
45
  import { tool$annotationTasksUpdateItems } from "./tools/annotationTasksUpdateItems.js";
44
46
  import { tool$evaluatorsCreate } from "./tools/evaluatorsCreate.js";
45
47
  import { tool$evaluatorsCreateVersion } from "./tools/evaluatorsCreateVersion.js";
@@ -64,7 +66,7 @@ export function createMCPServer(deps: {
64
66
  }) {
65
67
  const server = new McpServer({
66
68
  name: "CalibrateMcp",
67
- version: "0.0.25",
69
+ version: "0.0.27",
68
70
  });
69
71
 
70
72
  const getClient = deps.getSDK || (() =>
@@ -115,6 +117,8 @@ export function createMCPServer(deps: {
115
117
  tool(tool$agentsList);
116
118
  tool(tool$agentsGet);
117
119
  tool(tool$agentsUpdate);
120
+ tool(tool$agentsListEvaluators);
121
+ tool(tool$agentsLinkEvaluators);
118
122
  tool(tool$testsBulkCreate);
119
123
  tool(tool$testsCreate);
120
124
  tool(tool$testsList);
@@ -135,7 +139,7 @@ export function createMCPServer(deps: {
135
139
  tool(tool$annotationTasksCreate);
136
140
  tool(tool$annotationTasksList);
137
141
  tool(tool$annotationTasksGet);
138
- tool(tool$annotationTasksLinkEvaluator);
142
+ tool(tool$annotationTasksSetEvaluators);
139
143
  tool(tool$annotationTasksAddItems);
140
144
  tool(tool$annotationTasksUpdateItems);
141
145
  tool(tool$annotationTasksCreateEvaluatorRun);
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { agentsLinkEvaluators } from "../../funcs/agentsLinkEvaluators.js";
6
+ import { LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostRequest$zodSchema } from "../../models/linkevaluatorstoagentagentsagentuuidevaluatorspostop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostRequest$zodSchema,
11
+ };
12
+
13
+ export const tool$agentsLinkEvaluators: ToolDefinition<typeof args> = {
14
+ name: "link-evaluators-to-agent",
15
+ description:
16
+ `Link one or more evaluators to an agent, skipping any already linked.
17
+ Each evaluator must be one you created or a built-in default, and the
18
+ agent must be in your workspace.
19
+ `,
20
+ scopes: ["write"],
21
+ annotations: {
22
+ "title": "Link evaluators to an agent",
23
+ "destructiveHint": false,
24
+ "idempotentHint": true,
25
+ "openWorldHint": true,
26
+ "readOnlyHint": false,
27
+ },
28
+ args,
29
+ tool: async (client, args, ctx) => {
30
+ const [result] = await agentsLinkEvaluators(
31
+ client,
32
+ args.request,
33
+ { fetchOptions: { signal: ctx.signal } },
34
+ ).$inspect();
35
+
36
+ if (!result.ok) {
37
+ return {
38
+ content: [{ type: "text", text: result.error.message }],
39
+ isError: true,
40
+ };
41
+ }
42
+
43
+ return formatResult(result.value);
44
+ },
45
+ };
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { agentsListEvaluators } from "../../funcs/agentsListEvaluators.js";
6
+ import { ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetRequest$zodSchema } from "../../models/listagentevaluatorsagentsagentuuidevaluatorsgetop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetRequest$zodSchema,
11
+ };
12
+
13
+ export const tool$agentsListEvaluators: ToolDefinition<typeof args> = {
14
+ name: "list-agent-evaluators",
15
+ description:
16
+ `List the evaluators linked to an agent, most recently linked first.
17
+ Returns each evaluator's UUID, name, type, and live version summary.
18
+ `,
19
+ scopes: ["read"],
20
+ annotations: {
21
+ "title": "List evaluators linked to an agent",
22
+ "destructiveHint": false,
23
+ "idempotentHint": false,
24
+ "openWorldHint": true,
25
+ "readOnlyHint": true,
26
+ },
27
+ args,
28
+ tool: async (client, args, ctx) => {
29
+ const [result] = await agentsListEvaluators(
30
+ client,
31
+ args.request,
32
+ { fetchOptions: { signal: ctx.signal } },
33
+ ).$inspect();
34
+
35
+ if (!result.ok) {
36
+ return {
37
+ content: [{ type: "text", text: result.error.message }],
38
+ isError: true,
39
+ };
40
+ }
41
+
42
+ return formatResult(result.value);
43
+ },
44
+ };
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { annotationTasksSetEvaluators } from "../../funcs/annotationTasksSetEvaluators.js";
6
+ import { SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutRequest$zodSchema } from "../../models/settaskevaluatorsannotationtaskstaskuuidevaluatorsputop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request:
11
+ SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutRequest$zodSchema,
12
+ };
13
+
14
+ export const tool$annotationTasksSetEvaluators: ToolDefinition<typeof args> = {
15
+ name: "set-task-evaluators",
16
+ description:
17
+ `Replace the task's linked evaluators with exactly the given ordered
18
+ set: new ids are linked, omitted ids are unlinked, and the list order
19
+ sets their display position. Send an empty list to unlink all. Each
20
+ evaluator must be one you created or a built-in default, and the task
21
+ must be in your workspace.
22
+ `,
23
+ scopes: ["write"],
24
+ annotations: {
25
+ "title": "Set an annotation task's evaluators",
26
+ "destructiveHint": false,
27
+ "idempotentHint": true,
28
+ "openWorldHint": true,
29
+ "readOnlyHint": false,
30
+ },
31
+ args,
32
+ tool: async (client, args, ctx) => {
33
+ const [result] = await annotationTasksSetEvaluators(
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,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type EvaluatorSetRequest = { evaluator_ids: Array<string> };
8
+
9
+ export const EvaluatorSetRequest$zodSchema: z.ZodType<EvaluatorSetRequest> = z
10
+ .object({
11
+ evaluator_ids: z.array(z.string()).describe(
12
+ "The full ordered set of evaluators the task should end up linked to, in display order. Missing ones are unlinked, new ones are linked, and the order sets their position. Send an empty list to unlink all. Each must be one you created or a built-in default",
13
+ ),
14
+ });
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type EvaluatorSetResponse = {
8
+ message: string;
9
+ evaluator_ids: Array<string>;
10
+ linked: Array<string>;
11
+ unlinked: Array<string>;
12
+ };
13
+
14
+ export const EvaluatorSetResponse$zodSchema: z.ZodType<EvaluatorSetResponse> = z
15
+ .object({
16
+ evaluator_ids: z.array(z.string()).describe(
17
+ "The task's evaluator IDs after the update, in display order",
18
+ ),
19
+ linked: z.array(z.string()).describe(
20
+ "Evaluator IDs newly linked by this request",
21
+ ),
22
+ message: z.string().describe(
23
+ "Confirmation that the task's evaluators were updated",
24
+ ),
25
+ unlinked: z.array(z.string()).describe(
26
+ "Evaluator IDs unlinked by this request",
27
+ ),
28
+ });
@@ -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
+ HTTPValidationError,
8
+ HTTPValidationError$zodSchema,
9
+ } from "./httpvalidationerror.js";
10
+ import {
11
+ RoutersAgentsEvaluatorLinkRequest,
12
+ RoutersAgentsEvaluatorLinkRequest$zodSchema,
13
+ } from "./routersagentsevaluatorlinkrequest.js";
14
+ import {
15
+ RoutersAgentsEvaluatorLinkResponse,
16
+ RoutersAgentsEvaluatorLinkResponse$zodSchema,
17
+ } from "./routersagentsevaluatorlinkresponse.js";
18
+
19
+ export type LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostRequest = {
20
+ agent_uuid: string;
21
+ xAPIKey?: string | null | undefined;
22
+ body: RoutersAgentsEvaluatorLinkRequest;
23
+ };
24
+
25
+ export const LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostRequest$zodSchema:
26
+ z.ZodType<LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostRequest> = z
27
+ .object({
28
+ agent_uuid: z.string().describe("The agent to link the evaluators to"),
29
+ body: RoutersAgentsEvaluatorLinkRequest$zodSchema,
30
+ xAPIKey: z.string().nullable().optional(),
31
+ });
32
+
33
+ export type LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostResponse =
34
+ | RoutersAgentsEvaluatorLinkResponse
35
+ | HTTPValidationError;
36
+
37
+ export const LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostResponse$zodSchema:
38
+ z.ZodType<LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostResponse> = z
39
+ .union([
40
+ RoutersAgentsEvaluatorLinkResponse$zodSchema,
41
+ HTTPValidationError$zodSchema,
42
+ ]);
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import {
7
+ HTTPValidationError,
8
+ HTTPValidationError$zodSchema,
9
+ } from "./httpvalidationerror.js";
10
+ import {
11
+ PaginatedResponseEvaluatorResponse,
12
+ PaginatedResponseEvaluatorResponse$zodSchema,
13
+ } from "./paginatedresponseevaluatorresponse.js";
14
+
15
+ export type ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetRequest = {
16
+ agent_uuid: string;
17
+ q?: string | null | undefined;
18
+ limit?: number | null | undefined;
19
+ offset?: number | undefined;
20
+ xAPIKey?: string | null | undefined;
21
+ };
22
+
23
+ export const ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetRequest$zodSchema:
24
+ z.ZodType<ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetRequest> = z.object({
25
+ agent_uuid: z.string().describe("The agent whose evaluators to list"),
26
+ limit: z.int().describe(
27
+ "Maximum number of items to return. Omit for no limit (all items)",
28
+ ).nullable().optional(),
29
+ offset: z.int().default(0).describe(
30
+ "Number of items to skip before returning results",
31
+ ),
32
+ q: z.string().describe(
33
+ "Case-insensitive substring search on `name`. Blank is a no-op",
34
+ ).nullable().optional(),
35
+ xAPIKey: z.string().nullable().optional(),
36
+ });
37
+
38
+ export type ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetResponse =
39
+ | PaginatedResponseEvaluatorResponse
40
+ | HTTPValidationError;
41
+
42
+ export const ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetResponse$zodSchema:
43
+ z.ZodType<ListAgentEvaluatorsAgentsAgentUuidEvaluatorsGetResponse> = z.union([
44
+ PaginatedResponseEvaluatorResponse$zodSchema,
45
+ HTTPValidationError$zodSchema,
46
+ ]);
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type RoutersAgentsEvaluatorLinkRequest = {
8
+ evaluator_ids: Array<string>;
9
+ };
10
+
11
+ export const RoutersAgentsEvaluatorLinkRequest$zodSchema: z.ZodType<
12
+ RoutersAgentsEvaluatorLinkRequest
13
+ > = z.object({
14
+ evaluator_ids: z.array(z.string()).describe(
15
+ "The evaluators to link to the agent. Ones that are already linked are skipped. Each must be one you created or a built-in default",
16
+ ),
17
+ });
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type RoutersAgentsEvaluatorLinkResponse = {
8
+ message: string;
9
+ linked: Array<string>;
10
+ already_linked: Array<string>;
11
+ };
12
+
13
+ export const RoutersAgentsEvaluatorLinkResponse$zodSchema: z.ZodType<
14
+ RoutersAgentsEvaluatorLinkResponse
15
+ > = z.object({
16
+ already_linked: z.array(z.string()).describe(
17
+ "Evaluator IDs skipped because they were already linked",
18
+ ),
19
+ linked: z.array(z.string()).describe(
20
+ "Evaluator IDs newly linked by this request",
21
+ ),
22
+ message: z.string().describe("Confirmation that the evaluators were linked"),
23
+ });
@@ -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
+ EvaluatorSetRequest,
8
+ EvaluatorSetRequest$zodSchema,
9
+ } from "./evaluatorsetrequest.js";
10
+ import {
11
+ EvaluatorSetResponse,
12
+ EvaluatorSetResponse$zodSchema,
13
+ } from "./evaluatorsetresponse.js";
14
+ import {
15
+ HTTPValidationError,
16
+ HTTPValidationError$zodSchema,
17
+ } from "./httpvalidationerror.js";
18
+
19
+ export type SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutRequest = {
20
+ task_uuid: string;
21
+ xAPIKey?: string | null | undefined;
22
+ body: EvaluatorSetRequest;
23
+ };
24
+
25
+ export const SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutRequest$zodSchema:
26
+ z.ZodType<SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutRequest> = z
27
+ .object({
28
+ body: EvaluatorSetRequest$zodSchema,
29
+ task_uuid: z.string().describe("Annotation task to act on"),
30
+ xAPIKey: z.string().nullable().optional(),
31
+ });
32
+
33
+ export type SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutResponse =
34
+ | EvaluatorSetResponse
35
+ | HTTPValidationError;
36
+
37
+ export const SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutResponse$zodSchema:
38
+ z.ZodType<SetTaskEvaluatorsAnnotationTasksTaskUuidEvaluatorsPutResponse> = z
39
+ .union([
40
+ EvaluatorSetResponse$zodSchema,
41
+ HTTPValidationError$zodSchema,
42
+ ]);