@dalmia/calibrate-mcp 0.0.36 → 0.0.38
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 +344 -161
- package/bin/mcp-server.js.map +17 -11
- package/esm/funcs/annotationTasksCreateLabellingJobs.d.ts +16 -0
- package/esm/funcs/annotationTasksCreateLabellingJobs.d.ts.map +1 -0
- package/esm/funcs/annotationTasksCreateLabellingJobs.js +92 -0
- package/esm/funcs/annotationTasksCreateLabellingJobs.js.map +1 -0
- 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/annotationTasksCreateLabellingJobs.d.ts +7 -0
- package/esm/mcp-server/tools/annotationTasksCreateLabellingJobs.d.ts.map +1 -0
- package/esm/mcp-server/tools/annotationTasksCreateLabellingJobs.js +34 -0
- package/esm/mcp-server/tools/annotationTasksCreateLabellingJobs.js.map +1 -0
- package/esm/models/createjobsannotationtaskstaskuuidjobspostop.d.ts +13 -0
- package/esm/models/createjobsannotationtaskstaskuuidjobspostop.d.ts.map +1 -0
- package/esm/models/createjobsannotationtaskstaskuuidjobspostop.js +17 -0
- package/esm/models/createjobsannotationtaskstaskuuidjobspostop.js.map +1 -0
- package/esm/models/createjobsrequest.d.ts +10 -0
- package/esm/models/createjobsrequest.d.ts.map +1 -0
- package/esm/models/createjobsrequest.js +13 -0
- package/esm/models/createjobsrequest.js.map +1 -0
- package/esm/models/createjobsresponse.d.ts +8 -0
- package/esm/models/createjobsresponse.d.ts.map +1 -0
- package/esm/models/createjobsresponse.js +11 -0
- package/esm/models/createjobsresponse.js.map +1 -0
- package/esm/models/evaluatorlinkrequest.d.ts +6 -0
- package/esm/models/evaluatorlinkrequest.d.ts.map +1 -0
- package/esm/models/{routersagentsevaluatorlinkrequest.js → evaluatorlinkrequest.js} +3 -2
- package/esm/models/evaluatorlinkrequest.js.map +1 -0
- package/esm/models/evaluatorlinkresponse.d.ts +8 -0
- package/esm/models/evaluatorlinkresponse.d.ts.map +1 -0
- package/esm/models/{routersagentsevaluatorlinkresponse.js → evaluatorlinkresponse.js} +2 -2
- package/esm/models/evaluatorlinkresponse.js.map +1 -0
- package/esm/models/labellingjobcreated.d.ts +13 -0
- package/esm/models/labellingjobcreated.d.ts.map +1 -0
- package/esm/models/labellingjobcreated.js +16 -0
- package/esm/models/labellingjobcreated.js.map +1 -0
- package/esm/models/linkevaluatorstoagentagentsagentuuidevaluatorspostop.d.ts +4 -4
- package/esm/models/linkevaluatorstoagentagentsagentuuidevaluatorspostop.d.ts.map +1 -1
- package/esm/models/linkevaluatorstoagentagentsagentuuidevaluatorspostop.js +4 -4
- package/esm/models/linkevaluatorstoagentagentsagentuuidevaluatorspostop.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/annotationTasksCreateLabellingJobs.ts +158 -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/annotationTasksCreateLabellingJobs.ts +45 -0
- package/src/models/createjobsannotationtaskstaskuuidjobspostop.ts +40 -0
- package/src/models/createjobsrequest.ts +32 -0
- package/src/models/createjobsresponse.ts +22 -0
- package/src/models/evaluatorlinkrequest.ts +14 -0
- package/src/models/evaluatorlinkresponse.ts +24 -0
- package/src/models/labellingjobcreated.ts +40 -0
- package/src/models/linkevaluatorstoagentagentsagentuuidevaluatorspostop.ts +12 -12
- package/src/tool-names.ts +4 -0
- package/esm/models/routersagentsevaluatorlinkrequest.d.ts +0 -6
- package/esm/models/routersagentsevaluatorlinkrequest.d.ts.map +0 -1
- package/esm/models/routersagentsevaluatorlinkrequest.js.map +0 -1
- package/esm/models/routersagentsevaluatorlinkresponse.d.ts +0 -8
- package/esm/models/routersagentsevaluatorlinkresponse.d.ts.map +0 -1
- package/esm/models/routersagentsevaluatorlinkresponse.js.map +0 -1
- package/src/models/routersagentsevaluatorlinkrequest.ts +0 -17
- package/src/models/routersagentsevaluatorlinkresponse.ts +0 -23
|
@@ -0,0 +1,158 @@
|
|
|
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
|
+
CreateJobsAnnotationTasksTaskUuidJobsPostRequest,
|
|
14
|
+
CreateJobsAnnotationTasksTaskUuidJobsPostRequest$zodSchema,
|
|
15
|
+
} from "../models/createjobsannotationtaskstaskuuidjobspostop.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
|
+
* Create labelling jobs
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Assign items to annotators, creating one labelling job per annotator
|
|
33
|
+
*/
|
|
34
|
+
export function annotationTasksCreateLabellingJobs(
|
|
35
|
+
client$: CalibrateMcpCore,
|
|
36
|
+
request: CreateJobsAnnotationTasksTaskUuidJobsPostRequest,
|
|
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: CreateJobsAnnotationTasksTaskUuidJobsPostRequest,
|
|
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
|
+
CreateJobsAnnotationTasksTaskUuidJobsPostRequest$zodSchema.parse(value$),
|
|
80
|
+
"Input validation failed",
|
|
81
|
+
);
|
|
82
|
+
if (!parsed$.ok) {
|
|
83
|
+
return [parsed$, { status: "invalid" }];
|
|
84
|
+
}
|
|
85
|
+
const payload$ = parsed$.value;
|
|
86
|
+
const body$ = encodeJSON("body", payload$.body, { explode: true });
|
|
87
|
+
|
|
88
|
+
const pathParams$ = {
|
|
89
|
+
task_uuid: encodeSimple("task_uuid", payload$.task_uuid, {
|
|
90
|
+
explode: false,
|
|
91
|
+
charEncoding: "percent",
|
|
92
|
+
}),
|
|
93
|
+
};
|
|
94
|
+
const path$ = pathToFunc("/annotation-tasks/{task_uuid}/jobs")(
|
|
95
|
+
pathParams$,
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
const headers$ = new Headers(compactMap({
|
|
99
|
+
"Content-Type": "application/json",
|
|
100
|
+
Accept: "application/json",
|
|
101
|
+
"X-API-Key": encodeSimple("X-API-Key", payload$.xAPIKey, {
|
|
102
|
+
explode: false,
|
|
103
|
+
charEncoding: "none",
|
|
104
|
+
}),
|
|
105
|
+
}));
|
|
106
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
107
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
108
|
+
|
|
109
|
+
const context = {
|
|
110
|
+
options: client$._options,
|
|
111
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
112
|
+
operationID: "create_jobs_annotation_tasks__task_uuid__jobs_post",
|
|
113
|
+
oAuth2Scopes: null,
|
|
114
|
+
resolvedSecurity: requestSecurity,
|
|
115
|
+
securitySource: client$._options.security,
|
|
116
|
+
retryConfig: options?.retries
|
|
117
|
+
|| client$._options.retryConfig
|
|
118
|
+
|| { strategy: "none" },
|
|
119
|
+
retryCodes: options?.retryCodes || [
|
|
120
|
+
"429",
|
|
121
|
+
"500",
|
|
122
|
+
"502",
|
|
123
|
+
"503",
|
|
124
|
+
"504",
|
|
125
|
+
],
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const requestRes = client$._createRequest(context, {
|
|
129
|
+
security: requestSecurity,
|
|
130
|
+
method: "POST",
|
|
131
|
+
baseURL: options?.serverURL,
|
|
132
|
+
path: path$,
|
|
133
|
+
headers: headers$,
|
|
134
|
+
body: body$,
|
|
135
|
+
userAgent: client$._options.userAgent,
|
|
136
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs
|
|
137
|
+
|| -1,
|
|
138
|
+
}, options);
|
|
139
|
+
if (!requestRes.ok) {
|
|
140
|
+
return [requestRes, { status: "invalid" }];
|
|
141
|
+
}
|
|
142
|
+
const req$ = requestRes.value;
|
|
143
|
+
|
|
144
|
+
const doResult = await client$._do(req$, {
|
|
145
|
+
context,
|
|
146
|
+
errorCodes: [],
|
|
147
|
+
retryConfig: context.retryConfig,
|
|
148
|
+
retryCodes: context.retryCodes,
|
|
149
|
+
});
|
|
150
|
+
if (!doResult.ok) {
|
|
151
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
152
|
+
}
|
|
153
|
+
return [doResult, {
|
|
154
|
+
status: "complete",
|
|
155
|
+
"request": req$,
|
|
156
|
+
response: doResult.value,
|
|
157
|
+
}];
|
|
158
|
+
}
|
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.38/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.38",
|
|
69
69
|
genVersion: "2.915.1",
|
|
70
70
|
userAgent:
|
|
71
|
-
"speakeasy-sdk/mcp-typescript 0.0.
|
|
71
|
+
"speakeasy-sdk/mcp-typescript 0.0.38 2.915.1 0.1.0 @dalmia/calibrate-mcp",
|
|
72
72
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -36,6 +36,7 @@ import { tool$agentTestsRunBatch } from "./tools/agentTestsRunBatch.js";
|
|
|
36
36
|
import { tool$annotationTasksAddItems } from "./tools/annotationTasksAddItems.js";
|
|
37
37
|
import { tool$annotationTasksCreate } from "./tools/annotationTasksCreate.js";
|
|
38
38
|
import { tool$annotationTasksCreateEvaluatorRun } from "./tools/annotationTasksCreateEvaluatorRun.js";
|
|
39
|
+
import { tool$annotationTasksCreateLabellingJobs } from "./tools/annotationTasksCreateLabellingJobs.js";
|
|
39
40
|
import { tool$annotationTasksGet } from "./tools/annotationTasksGet.js";
|
|
40
41
|
import { tool$annotationTasksGetAgreement } from "./tools/annotationTasksGetAgreement.js";
|
|
41
42
|
import { tool$annotationTasksGetEvaluatorRun } from "./tools/annotationTasksGetEvaluatorRun.js";
|
|
@@ -70,7 +71,7 @@ export function createMCPServer(deps: {
|
|
|
70
71
|
}) {
|
|
71
72
|
const server = new McpServer({
|
|
72
73
|
name: "CalibrateMcp",
|
|
73
|
-
version: "0.0.
|
|
74
|
+
version: "0.0.38",
|
|
74
75
|
});
|
|
75
76
|
|
|
76
77
|
const getClient = deps.getSDK || (() =>
|
|
@@ -146,6 +147,7 @@ export function createMCPServer(deps: {
|
|
|
146
147
|
tool(tool$annotationTasksSetEvaluators);
|
|
147
148
|
tool(tool$annotationTasksAddItems);
|
|
148
149
|
tool(tool$annotationTasksUpdateItems);
|
|
150
|
+
tool(tool$annotationTasksCreateLabellingJobs);
|
|
149
151
|
tool(tool$annotationTasksCreateEvaluatorRun);
|
|
150
152
|
tool(tool$annotationTasksGetEvaluatorRun);
|
|
151
153
|
tool(tool$annotationTasksGetAgreement);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { annotationTasksCreateLabellingJobs } from "../../funcs/annotationTasksCreateLabellingJobs.js";
|
|
6
|
+
import { CreateJobsAnnotationTasksTaskUuidJobsPostRequest$zodSchema } from "../../models/createjobsannotationtaskstaskuuidjobspostop.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: CreateJobsAnnotationTasksTaskUuidJobsPostRequest$zodSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$annotationTasksCreateLabellingJobs: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
16
|
+
name: "create-labelling-jobs",
|
|
17
|
+
description:
|
|
18
|
+
`Assign items to annotators, creating one labelling job per annotator. Each job comes back with a public_token for the annotator's labelling link.
|
|
19
|
+
`,
|
|
20
|
+
scopes: ["write"],
|
|
21
|
+
annotations: {
|
|
22
|
+
"title": "Create labelling jobs",
|
|
23
|
+
"destructiveHint": false,
|
|
24
|
+
"idempotentHint": false,
|
|
25
|
+
"openWorldHint": true,
|
|
26
|
+
"readOnlyHint": false,
|
|
27
|
+
},
|
|
28
|
+
args,
|
|
29
|
+
tool: async (client, args, ctx) => {
|
|
30
|
+
const [result] = await annotationTasksCreateLabellingJobs(
|
|
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,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
CreateJobsRequest,
|
|
8
|
+
CreateJobsRequest$zodSchema,
|
|
9
|
+
} from "./createjobsrequest.js";
|
|
10
|
+
import {
|
|
11
|
+
CreateJobsResponse,
|
|
12
|
+
CreateJobsResponse$zodSchema,
|
|
13
|
+
} from "./createjobsresponse.js";
|
|
14
|
+
import {
|
|
15
|
+
HTTPValidationError,
|
|
16
|
+
HTTPValidationError$zodSchema,
|
|
17
|
+
} from "./httpvalidationerror.js";
|
|
18
|
+
|
|
19
|
+
export type CreateJobsAnnotationTasksTaskUuidJobsPostRequest = {
|
|
20
|
+
task_uuid: string;
|
|
21
|
+
xAPIKey?: string | null | undefined;
|
|
22
|
+
body: CreateJobsRequest;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const CreateJobsAnnotationTasksTaskUuidJobsPostRequest$zodSchema:
|
|
26
|
+
z.ZodType<CreateJobsAnnotationTasksTaskUuidJobsPostRequest> = z.object({
|
|
27
|
+
body: CreateJobsRequest$zodSchema,
|
|
28
|
+
task_uuid: z.string().describe("Annotation task to act on"),
|
|
29
|
+
xAPIKey: z.string().nullable().optional(),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export type CreateJobsAnnotationTasksTaskUuidJobsPostResponse =
|
|
33
|
+
| CreateJobsResponse
|
|
34
|
+
| HTTPValidationError;
|
|
35
|
+
|
|
36
|
+
export const CreateJobsAnnotationTasksTaskUuidJobsPostResponse$zodSchema:
|
|
37
|
+
z.ZodType<CreateJobsAnnotationTasksTaskUuidJobsPostResponse> = z.union([
|
|
38
|
+
CreateJobsResponse$zodSchema,
|
|
39
|
+
HTTPValidationError$zodSchema,
|
|
40
|
+
]);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type CreateJobsRequest = {
|
|
8
|
+
annotator_ids: Array<string>;
|
|
9
|
+
item_ids?: Array<string> | undefined;
|
|
10
|
+
select_all?: boolean | undefined;
|
|
11
|
+
q?: string | null | undefined;
|
|
12
|
+
evaluator_ids?: Array<string> | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const CreateJobsRequest$zodSchema: z.ZodType<CreateJobsRequest> = z
|
|
16
|
+
.object({
|
|
17
|
+
annotator_ids: z.array(z.string()).describe(
|
|
18
|
+
"Annotator IDs to assign, creating one labelling job for each annotator. Must be in your workspace",
|
|
19
|
+
),
|
|
20
|
+
evaluator_ids: z.array(z.string()).nullable().optional().describe(
|
|
21
|
+
"Subset of the task's linked evaluators to show in these jobs. Must be a subset of the current links, an empty list gives a 400. Applies to every annotator's job. Omit (`None`) to snapshot every linked evaluator",
|
|
22
|
+
),
|
|
23
|
+
item_ids: z.array(z.string()).optional().describe(
|
|
24
|
+
"Item IDs to assign. **Required when `select_all=false`**. Ignored when `select_all=true`",
|
|
25
|
+
),
|
|
26
|
+
q: z.string().nullable().optional().describe(
|
|
27
|
+
"Case-insensitive substring filter on `payload.name`. Applies only when `select_all=true`",
|
|
28
|
+
),
|
|
29
|
+
select_all: z.boolean().default(false).describe(
|
|
30
|
+
"When `true`, assign every item in the task and ignore `item_ids`. Set `q` to assign only items whose name matches it",
|
|
31
|
+
),
|
|
32
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
LabellingJobCreated,
|
|
8
|
+
LabellingJobCreated$zodSchema,
|
|
9
|
+
} from "./labellingjobcreated.js";
|
|
10
|
+
|
|
11
|
+
export type CreateJobsResponse = {
|
|
12
|
+
jobs: Array<LabellingJobCreated>;
|
|
13
|
+
count: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const CreateJobsResponse$zodSchema: z.ZodType<CreateJobsResponse> = z
|
|
17
|
+
.object({
|
|
18
|
+
count: z.int().describe("How many jobs were created"),
|
|
19
|
+
jobs: z.array(LabellingJobCreated$zodSchema).describe(
|
|
20
|
+
"The jobs created, one for each annotator",
|
|
21
|
+
),
|
|
22
|
+
});
|
|
@@ -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 EvaluatorLinkRequest = { evaluator_ids: Array<string> };
|
|
8
|
+
|
|
9
|
+
export const EvaluatorLinkRequest$zodSchema: z.ZodType<EvaluatorLinkRequest> = z
|
|
10
|
+
.object({
|
|
11
|
+
evaluator_ids: z.array(z.string()).describe(
|
|
12
|
+
"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",
|
|
13
|
+
),
|
|
14
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type EvaluatorLinkResponse = {
|
|
8
|
+
message: string;
|
|
9
|
+
linked: Array<string>;
|
|
10
|
+
already_linked: Array<string>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const EvaluatorLinkResponse$zodSchema: z.ZodType<EvaluatorLinkResponse> =
|
|
14
|
+
z.object({
|
|
15
|
+
already_linked: z.array(z.string()).describe(
|
|
16
|
+
"Evaluator IDs skipped because they were already linked",
|
|
17
|
+
),
|
|
18
|
+
linked: z.array(z.string()).describe(
|
|
19
|
+
"Evaluator IDs newly linked by this request",
|
|
20
|
+
),
|
|
21
|
+
message: z.string().describe(
|
|
22
|
+
"Confirmation that the evaluators were linked",
|
|
23
|
+
),
|
|
24
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type LabellingJobCreated = {
|
|
8
|
+
uuid: string;
|
|
9
|
+
public_token: string;
|
|
10
|
+
annotator_id: string;
|
|
11
|
+
annotator_name: string;
|
|
12
|
+
item_ids: Array<string>;
|
|
13
|
+
item_count: number;
|
|
14
|
+
evaluator_ids: Array<string>;
|
|
15
|
+
status?: "pending" | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const LabellingJobCreated$zodSchema: z.ZodType<LabellingJobCreated> = z
|
|
19
|
+
.object({
|
|
20
|
+
annotator_id: z.string().describe(
|
|
21
|
+
"ID of the annotator the job is assigned to",
|
|
22
|
+
),
|
|
23
|
+
annotator_name: z.string().describe(
|
|
24
|
+
"Name of the annotator the job is assigned to",
|
|
25
|
+
),
|
|
26
|
+
evaluator_ids: z.array(z.string()).describe(
|
|
27
|
+
"IDs of the evaluators the annotator scores each item on, in the order they are shown",
|
|
28
|
+
),
|
|
29
|
+
item_count: z.int().describe("How many items the annotator has to label"),
|
|
30
|
+
item_ids: z.array(z.string()).describe(
|
|
31
|
+
"IDs of the items assigned to the annotator",
|
|
32
|
+
),
|
|
33
|
+
public_token: z.string().describe(
|
|
34
|
+
"Token that opens the annotator's labelling page without signing in",
|
|
35
|
+
),
|
|
36
|
+
status: z.literal("pending").default("pending").optional().describe(
|
|
37
|
+
"Status of the job right after you create it",
|
|
38
|
+
),
|
|
39
|
+
uuid: z.string().describe("ID of the labelling job"),
|
|
40
|
+
});
|
|
@@ -3,40 +3,40 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
EvaluatorLinkRequest,
|
|
8
|
+
EvaluatorLinkRequest$zodSchema,
|
|
9
|
+
} from "./evaluatorlinkrequest.js";
|
|
10
|
+
import {
|
|
11
|
+
EvaluatorLinkResponse,
|
|
12
|
+
EvaluatorLinkResponse$zodSchema,
|
|
13
|
+
} from "./evaluatorlinkresponse.js";
|
|
6
14
|
import {
|
|
7
15
|
HTTPValidationError,
|
|
8
16
|
HTTPValidationError$zodSchema,
|
|
9
17
|
} 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
18
|
|
|
19
19
|
export type LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostRequest = {
|
|
20
20
|
agent_uuid: string;
|
|
21
21
|
xAPIKey?: string | null | undefined;
|
|
22
|
-
body:
|
|
22
|
+
body: EvaluatorLinkRequest;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export const LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostRequest$zodSchema:
|
|
26
26
|
z.ZodType<LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostRequest> = z
|
|
27
27
|
.object({
|
|
28
28
|
agent_uuid: z.string().describe("The agent to link the evaluators to"),
|
|
29
|
-
body:
|
|
29
|
+
body: EvaluatorLinkRequest$zodSchema,
|
|
30
30
|
xAPIKey: z.string().nullable().optional(),
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
export type LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostResponse =
|
|
34
|
-
|
|
|
34
|
+
| EvaluatorLinkResponse
|
|
35
35
|
| HTTPValidationError;
|
|
36
36
|
|
|
37
37
|
export const LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostResponse$zodSchema:
|
|
38
38
|
z.ZodType<LinkEvaluatorsToAgentAgentsAgentUuidEvaluatorsPostResponse> = z
|
|
39
39
|
.union([
|
|
40
|
-
|
|
40
|
+
EvaluatorLinkResponse$zodSchema,
|
|
41
41
|
HTTPValidationError$zodSchema,
|
|
42
42
|
]);
|
package/src/tool-names.ts
CHANGED
|
@@ -124,6 +124,10 @@ export const toolNames: Array<{ name: string; description: string }>= [
|
|
|
124
124
|
"name": "update-annotation-items",
|
|
125
125
|
"description": "Bulk-update item payloads in an annotation task.\n"
|
|
126
126
|
},
|
|
127
|
+
{
|
|
128
|
+
"name": "create-labelling-jobs",
|
|
129
|
+
"description": "Assign items to annotators, creating one labelling job per annotator. Each job comes back with a public_token for the annotator's labelling link.\n"
|
|
130
|
+
},
|
|
127
131
|
{
|
|
128
132
|
"name": "run-annotation-evaluators",
|
|
129
133
|
"description": "Run one or more of a task's evaluators over its items as a background job. Returns a job_uuid to poll with get-annotation-evaluator-run.\n"
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
export type RoutersAgentsEvaluatorLinkRequest = {
|
|
3
|
-
evaluator_ids: Array<string>;
|
|
4
|
-
};
|
|
5
|
-
export declare const RoutersAgentsEvaluatorLinkRequest$zodSchema: z.ZodType<RoutersAgentsEvaluatorLinkRequest>;
|
|
6
|
-
//# sourceMappingURL=routersagentsevaluatorlinkrequest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routersagentsevaluatorlinkrequest.d.ts","sourceRoot":"","sources":["../../src/models/routersagentsevaluatorlinkrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,iCAAiC,GAAG;IAC9C,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,2CAA2C,EAAE,CAAC,CAAC,OAAO,CACjE,iCAAiC,CAKjC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routersagentsevaluatorlinkrequest.js","sourceRoot":"","sources":["../../src/models/routersagentsevaluatorlinkrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAMzB,MAAM,CAAC,MAAM,2CAA2C,GAEpD,CAAC,CAAC,MAAM,CAAC;IACX,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CACzC,mIAAmI,CACpI;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
export type RoutersAgentsEvaluatorLinkResponse = {
|
|
3
|
-
message: string;
|
|
4
|
-
linked: Array<string>;
|
|
5
|
-
already_linked: Array<string>;
|
|
6
|
-
};
|
|
7
|
-
export declare const RoutersAgentsEvaluatorLinkResponse$zodSchema: z.ZodType<RoutersAgentsEvaluatorLinkResponse>;
|
|
8
|
-
//# sourceMappingURL=routersagentsevaluatorlinkresponse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routersagentsevaluatorlinkresponse.d.ts","sourceRoot":"","sources":["../../src/models/routersagentsevaluatorlinkresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,OAAO,CAClE,kCAAkC,CASlC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routersagentsevaluatorlinkresponse.js","sourceRoot":"","sources":["../../src/models/routersagentsevaluatorlinkresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAQzB,MAAM,CAAC,MAAM,4CAA4C,GAErD,CAAC,CAAC,MAAM,CAAC;IACX,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAC1C,wDAAwD,CACzD;IACD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAClC,4CAA4C,CAC7C;IACD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;CAC7E,CAAC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
});
|