@dalmia/calibrate-mcp 0.0.33 → 0.0.35

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 (128) hide show
  1. package/bin/mcp-server.js +791 -94
  2. package/bin/mcp-server.js.map +32 -10
  3. package/esm/funcs/annotatorsCreate.d.ts +16 -0
  4. package/esm/funcs/annotatorsCreate.d.ts.map +1 -0
  5. package/esm/funcs/annotatorsCreate.js +86 -0
  6. package/esm/funcs/annotatorsCreate.js.map +1 -0
  7. package/esm/funcs/annotatorsList.d.ts +16 -0
  8. package/esm/funcs/annotatorsList.d.ts.map +1 -0
  9. package/esm/funcs/annotatorsList.js +85 -0
  10. package/esm/funcs/annotatorsList.js.map +1 -0
  11. package/esm/funcs/annotatorsUpdate.d.ts +16 -0
  12. package/esm/funcs/annotatorsUpdate.d.ts.map +1 -0
  13. package/esm/funcs/annotatorsUpdate.js +92 -0
  14. package/esm/funcs/annotatorsUpdate.js.map +1 -0
  15. package/esm/funcs/tracesCreate.d.ts +16 -0
  16. package/esm/funcs/tracesCreate.d.ts.map +1 -0
  17. package/esm/funcs/tracesCreate.js +86 -0
  18. package/esm/funcs/tracesCreate.js.map +1 -0
  19. package/esm/landing-page.js +1 -1
  20. package/esm/lib/config.d.ts +2 -2
  21. package/esm/lib/config.js +2 -2
  22. package/esm/mcp-server/mcp-server.js +1 -1
  23. package/esm/mcp-server/server.d.ts.map +1 -1
  24. package/esm/mcp-server/server.js +9 -1
  25. package/esm/mcp-server/server.js.map +1 -1
  26. package/esm/mcp-server/tools/annotatorsCreate.d.ts +7 -0
  27. package/esm/mcp-server/tools/annotatorsCreate.d.ts.map +1 -0
  28. package/esm/mcp-server/tools/annotatorsCreate.js +34 -0
  29. package/esm/mcp-server/tools/annotatorsCreate.js.map +1 -0
  30. package/esm/mcp-server/tools/annotatorsList.d.ts +7 -0
  31. package/esm/mcp-server/tools/annotatorsList.d.ts.map +1 -0
  32. package/esm/mcp-server/tools/annotatorsList.js +34 -0
  33. package/esm/mcp-server/tools/annotatorsList.js.map +1 -0
  34. package/esm/mcp-server/tools/annotatorsUpdate.d.ts +7 -0
  35. package/esm/mcp-server/tools/annotatorsUpdate.d.ts.map +1 -0
  36. package/esm/mcp-server/tools/annotatorsUpdate.js +34 -0
  37. package/esm/mcp-server/tools/annotatorsUpdate.js.map +1 -0
  38. package/esm/mcp-server/tools/tracesCreate.d.ts +7 -0
  39. package/esm/mcp-server/tools/tracesCreate.d.ts.map +1 -0
  40. package/esm/mcp-server/tools/tracesCreate.js +38 -0
  41. package/esm/mcp-server/tools/tracesCreate.js.map +1 -0
  42. package/esm/models/annotatorcreate.d.ts +6 -0
  43. package/esm/models/annotatorcreate.d.ts.map +1 -0
  44. package/esm/models/annotatorcreate.js +8 -0
  45. package/esm/models/annotatorcreate.js.map +1 -0
  46. package/esm/models/annotatorcreateresponse.d.ts +7 -0
  47. package/esm/models/annotatorcreateresponse.d.ts.map +1 -0
  48. package/esm/models/annotatorcreateresponse.js +9 -0
  49. package/esm/models/annotatorcreateresponse.js.map +1 -0
  50. package/esm/models/annotatorresponse.d.ts +12 -0
  51. package/esm/models/annotatorresponse.d.ts.map +1 -0
  52. package/esm/models/annotatorresponse.js +15 -0
  53. package/esm/models/annotatorresponse.js.map +1 -0
  54. package/esm/models/annotatorupdate.d.ts +6 -0
  55. package/esm/models/annotatorupdate.d.ts.map +1 -0
  56. package/esm/models/annotatorupdate.js +8 -0
  57. package/esm/models/annotatorupdate.js.map +1 -0
  58. package/esm/models/createannotatorendpointannotatorspostop.d.ts +12 -0
  59. package/esm/models/createannotatorendpointannotatorspostop.d.ts.map +1 -0
  60. package/esm/models/createannotatorendpointannotatorspostop.js +16 -0
  61. package/esm/models/createannotatorendpointannotatorspostop.js.map +1 -0
  62. package/esm/models/ingesttracetracespostop.d.ts +12 -0
  63. package/esm/models/ingesttracetracespostop.d.ts.map +1 -0
  64. package/esm/models/ingesttracetracespostop.js +16 -0
  65. package/esm/models/ingesttracetracespostop.js.map +1 -0
  66. package/esm/models/listannotatorsannotatorsgetop.d.ts +10 -0
  67. package/esm/models/listannotatorsannotatorsgetop.d.ts.map +1 -0
  68. package/esm/models/listannotatorsannotatorsgetop.js +14 -0
  69. package/esm/models/listannotatorsannotatorsgetop.js.map +1 -0
  70. package/esm/models/traceingest.d.ts +14 -0
  71. package/esm/models/traceingest.d.ts.map +1 -0
  72. package/esm/models/traceingest.js +17 -0
  73. package/esm/models/traceingest.js.map +1 -0
  74. package/esm/models/traceingestresponse.d.ts +9 -0
  75. package/esm/models/traceingestresponse.d.ts.map +1 -0
  76. package/esm/models/traceingestresponse.js +12 -0
  77. package/esm/models/traceingestresponse.js.map +1 -0
  78. package/esm/models/tracemetadataentry.d.ts +7 -0
  79. package/esm/models/tracemetadataentry.d.ts.map +1 -0
  80. package/esm/models/tracemetadataentry.js +10 -0
  81. package/esm/models/tracemetadataentry.js.map +1 -0
  82. package/esm/models/traceoutput.d.ts +8 -0
  83. package/esm/models/traceoutput.d.ts.map +1 -0
  84. package/esm/models/traceoutput.js +10 -0
  85. package/esm/models/traceoutput.js.map +1 -0
  86. package/esm/models/tracetoolcall.d.ts +9 -0
  87. package/esm/models/tracetoolcall.d.ts.map +1 -0
  88. package/esm/models/tracetoolcall.js +9 -0
  89. package/esm/models/tracetoolcall.js.map +1 -0
  90. package/esm/models/traceturn.d.ts +11 -0
  91. package/esm/models/traceturn.d.ts.map +1 -0
  92. package/esm/models/traceturn.js +21 -0
  93. package/esm/models/traceturn.js.map +1 -0
  94. package/esm/models/updateannotatorendpointannotatorsannotatoruuidputop.d.ts +13 -0
  95. package/esm/models/updateannotatorendpointannotatorsannotatoruuidputop.d.ts.map +1 -0
  96. package/esm/models/updateannotatorendpointannotatorsannotatoruuidputop.js +19 -0
  97. package/esm/models/updateannotatorendpointannotatorsannotatoruuidputop.js.map +1 -0
  98. package/esm/tool-names.d.ts.map +1 -1
  99. package/esm/tool-names.js +16 -0
  100. package/esm/tool-names.js.map +1 -1
  101. package/package.json +1 -1
  102. package/src/funcs/annotatorsCreate.ts +149 -0
  103. package/src/funcs/annotatorsList.ts +148 -0
  104. package/src/funcs/annotatorsUpdate.ts +160 -0
  105. package/src/funcs/tracesCreate.ts +148 -0
  106. package/src/landing-page.ts +1 -1
  107. package/src/lib/config.ts +2 -2
  108. package/src/mcp-server/mcp-server.ts +1 -1
  109. package/src/mcp-server/server.ts +9 -1
  110. package/src/mcp-server/tools/annotatorsCreate.ts +43 -0
  111. package/src/mcp-server/tools/annotatorsList.ts +42 -0
  112. package/src/mcp-server/tools/annotatorsUpdate.ts +42 -0
  113. package/src/mcp-server/tools/tracesCreate.ts +47 -0
  114. package/src/models/annotatorcreate.ts +11 -0
  115. package/src/models/annotatorcreateresponse.ts +14 -0
  116. package/src/models/annotatorresponse.ts +36 -0
  117. package/src/models/annotatorupdate.ts +13 -0
  118. package/src/models/createannotatorendpointannotatorspostop.ts +40 -0
  119. package/src/models/ingesttracetracespostop.ts +37 -0
  120. package/src/models/listannotatorsannotatorsgetop.ts +34 -0
  121. package/src/models/traceingest.ts +40 -0
  122. package/src/models/traceingestresponse.ts +26 -0
  123. package/src/models/tracemetadataentry.ts +13 -0
  124. package/src/models/traceoutput.ts +20 -0
  125. package/src/models/tracetoolcall.ts +17 -0
  126. package/src/models/traceturn.ts +37 -0
  127. package/src/models/updateannotatorendpointannotatorsannotatoruuidputop.ts +42 -0
  128. package/src/tool-names.ts +16 -0
@@ -0,0 +1,148 @@
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 { 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
+ IngestTraceTracesPostRequest,
23
+ IngestTraceTracesPostRequest$zodSchema,
24
+ } from "../models/ingesttracetracespostop.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Create trace
30
+ *
31
+ * @remarks
32
+ * Store a production agent turn and its conversation history for later review
33
+ */
34
+ export function tracesCreate(
35
+ client$: CalibrateMcpCore,
36
+ request: IngestTraceTracesPostRequest,
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: IngestTraceTracesPostRequest,
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$) => IngestTraceTracesPostRequest$zodSchema.parse(value$),
79
+ "Input validation failed",
80
+ );
81
+ if (!parsed$.ok) {
82
+ return [parsed$, { status: "invalid" }];
83
+ }
84
+ const payload$ = parsed$.value;
85
+ const body$ = encodeJSON("body", payload$.body, { explode: true });
86
+ const path$ = pathToFunc("/traces")();
87
+
88
+ const headers$ = new Headers(compactMap({
89
+ "Content-Type": "application/json",
90
+ Accept: "application/json",
91
+ "X-API-Key": encodeSimple("X-API-Key", payload$.xAPIKey, {
92
+ explode: false,
93
+ charEncoding: "none",
94
+ }),
95
+ }));
96
+ const securityInput = await extractSecurity(client$._options.security);
97
+ const requestSecurity = resolveGlobalSecurity(securityInput);
98
+
99
+ const context = {
100
+ options: client$._options,
101
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
102
+ operationID: "ingest_trace_traces_post",
103
+ oAuth2Scopes: null,
104
+ resolvedSecurity: requestSecurity,
105
+ securitySource: client$._options.security,
106
+ retryConfig: options?.retries
107
+ || client$._options.retryConfig
108
+ || { strategy: "none" },
109
+ retryCodes: options?.retryCodes || [
110
+ "429",
111
+ "500",
112
+ "502",
113
+ "503",
114
+ "504",
115
+ ],
116
+ };
117
+
118
+ const requestRes = client$._createRequest(context, {
119
+ security: requestSecurity,
120
+ method: "POST",
121
+ baseURL: options?.serverURL,
122
+ path: path$,
123
+ headers: headers$,
124
+ body: body$,
125
+ userAgent: client$._options.userAgent,
126
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
127
+ || -1,
128
+ }, options);
129
+ if (!requestRes.ok) {
130
+ return [requestRes, { status: "invalid" }];
131
+ }
132
+ const req$ = requestRes.value;
133
+
134
+ const doResult = await client$._do(req$, {
135
+ context,
136
+ errorCodes: [],
137
+ retryConfig: context.retryConfig,
138
+ retryCodes: context.retryCodes,
139
+ });
140
+ if (!doResult.ok) {
141
+ return [doResult, { status: "request-error", request: req$ }];
142
+ }
143
+ return [doResult, {
144
+ status: "complete",
145
+ "request": req$,
146
+ response: doResult.value,
147
+ }];
148
+ }
@@ -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.33/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.35/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.33",
68
+ sdkVersion: "0.0.35",
69
69
  genVersion: "2.915.1",
70
70
  userAgent:
71
- "speakeasy-sdk/mcp-typescript 0.0.33 2.915.1 0.1.0 @dalmia/calibrate-mcp",
71
+ "speakeasy-sdk/mcp-typescript 0.0.35 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.33",
24
+ currentVersion: "0.0.35",
25
25
  },
26
26
  });
27
27
 
@@ -43,6 +43,9 @@ import { tool$annotationTasksGetSummary } from "./tools/annotationTasksGetSummar
43
43
  import { tool$annotationTasksList } from "./tools/annotationTasksList.js";
44
44
  import { tool$annotationTasksSetEvaluators } from "./tools/annotationTasksSetEvaluators.js";
45
45
  import { tool$annotationTasksUpdateItems } from "./tools/annotationTasksUpdateItems.js";
46
+ import { tool$annotatorsCreate } from "./tools/annotatorsCreate.js";
47
+ import { tool$annotatorsList } from "./tools/annotatorsList.js";
48
+ import { tool$annotatorsUpdate } from "./tools/annotatorsUpdate.js";
46
49
  import { tool$evaluatorsCreate } from "./tools/evaluatorsCreate.js";
47
50
  import { tool$evaluatorsCreateVersion } from "./tools/evaluatorsCreateVersion.js";
48
51
  import { tool$evaluatorsGet } from "./tools/evaluatorsGet.js";
@@ -52,6 +55,7 @@ import { tool$testsCreate } from "./tools/testsCreate.js";
52
55
  import { tool$testsGet } from "./tools/testsGet.js";
53
56
  import { tool$testsList } from "./tools/testsList.js";
54
57
  import { tool$testsUpdate } from "./tools/testsUpdate.js";
58
+ import { tool$tracesCreate } from "./tools/tracesCreate.js";
55
59
 
56
60
  export function createMCPServer(deps: {
57
61
  logger: ConsoleLogger;
@@ -66,7 +70,7 @@ export function createMCPServer(deps: {
66
70
  }) {
67
71
  const server = new McpServer({
68
72
  name: "CalibrateMcp",
69
- version: "0.0.33",
73
+ version: "0.0.35",
70
74
  });
71
75
 
72
76
  const getClient = deps.getSDK || (() =>
@@ -146,6 +150,10 @@ export function createMCPServer(deps: {
146
150
  tool(tool$annotationTasksGetEvaluatorRun);
147
151
  tool(tool$annotationTasksGetAgreement);
148
152
  tool(tool$annotationTasksGetSummary);
153
+ tool(tool$annotatorsCreate);
154
+ tool(tool$annotatorsList);
155
+ tool(tool$annotatorsUpdate);
156
+ tool(tool$tracesCreate);
149
157
 
150
158
  if (deps.dynamic) {
151
159
  registerDynamicTools(deps.logger, server, getClient, toolMap, scopes);
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { annotatorsCreate } from "../../funcs/annotatorsCreate.js";
6
+ import { CreateAnnotatorEndpointAnnotatorsPostRequest$zodSchema } from "../../models/createannotatorendpointannotatorspostop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: CreateAnnotatorEndpointAnnotatorsPostRequest$zodSchema,
11
+ };
12
+
13
+ export const tool$annotatorsCreate: ToolDefinition<typeof args> = {
14
+ name: "create-annotator",
15
+ description:
16
+ `Create an annotator, a human labeller who can be assigned annotation tasks.
17
+ `,
18
+ scopes: ["write"],
19
+ annotations: {
20
+ "title": "Create annotator",
21
+ "destructiveHint": false,
22
+ "idempotentHint": false,
23
+ "openWorldHint": true,
24
+ "readOnlyHint": false,
25
+ },
26
+ args,
27
+ tool: async (client, args, ctx) => {
28
+ const [result] = await annotatorsCreate(
29
+ client,
30
+ args.request,
31
+ { fetchOptions: { signal: ctx.signal } },
32
+ ).$inspect();
33
+
34
+ if (!result.ok) {
35
+ return {
36
+ content: [{ type: "text", text: result.error.message }],
37
+ isError: true,
38
+ };
39
+ }
40
+
41
+ return formatResult(result.value);
42
+ },
43
+ };
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { annotatorsList } from "../../funcs/annotatorsList.js";
6
+ import { ListAnnotatorsAnnotatorsGetRequest$zodSchema } from "../../models/listannotatorsannotatorsgetop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: ListAnnotatorsAnnotatorsGetRequest$zodSchema.optional(),
11
+ };
12
+
13
+ export const tool$annotatorsList: ToolDefinition<typeof args> = {
14
+ name: "list-annotators",
15
+ description: `List your annotators with their job counts and agreement scores.
16
+ `,
17
+ scopes: ["read"],
18
+ annotations: {
19
+ "title": "List annotators",
20
+ "destructiveHint": false,
21
+ "idempotentHint": false,
22
+ "openWorldHint": true,
23
+ "readOnlyHint": true,
24
+ },
25
+ args,
26
+ tool: async (client, args, ctx) => {
27
+ const [result] = await annotatorsList(
28
+ client,
29
+ args.request,
30
+ { fetchOptions: { signal: ctx.signal } },
31
+ ).$inspect();
32
+
33
+ if (!result.ok) {
34
+ return {
35
+ content: [{ type: "text", text: result.error.message }],
36
+ isError: true,
37
+ };
38
+ }
39
+
40
+ return formatResult(result.value);
41
+ },
42
+ };
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { annotatorsUpdate } from "../../funcs/annotatorsUpdate.js";
6
+ import { UpdateAnnotatorEndpointAnnotatorsAnnotatorUuidPutRequest$zodSchema } from "../../models/updateannotatorendpointannotatorsannotatoruuidputop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: UpdateAnnotatorEndpointAnnotatorsAnnotatorUuidPutRequest$zodSchema,
11
+ };
12
+
13
+ export const tool$annotatorsUpdate: ToolDefinition<typeof args> = {
14
+ name: "update-annotator",
15
+ description: `Rename an annotator in your workspace.
16
+ `,
17
+ scopes: ["write"],
18
+ annotations: {
19
+ "title": "Update annotator",
20
+ "destructiveHint": false,
21
+ "idempotentHint": true,
22
+ "openWorldHint": true,
23
+ "readOnlyHint": false,
24
+ },
25
+ args,
26
+ tool: async (client, args, ctx) => {
27
+ const [result] = await annotatorsUpdate(
28
+ client,
29
+ args.request,
30
+ { fetchOptions: { signal: ctx.signal } },
31
+ ).$inspect();
32
+
33
+ if (!result.ok) {
34
+ return {
35
+ content: [{ type: "text", text: result.error.message }],
36
+ isError: true,
37
+ };
38
+ }
39
+
40
+ return formatResult(result.value);
41
+ },
42
+ };
@@ -0,0 +1,47 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { tracesCreate } from "../../funcs/tracesCreate.js";
6
+ import { IngestTraceTracesPostRequest$zodSchema } from "../../models/ingesttracetracespostop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: IngestTraceTracesPostRequest$zodSchema,
11
+ };
12
+
13
+ export const tool$tracesCreate: ToolDefinition<typeof args> = {
14
+ name: "create-trace",
15
+ description:
16
+ `Store one production agent turn against an agent in the caller's org:
17
+ the conversation history as input, what the agent produced as output,
18
+ and optional metadata. Use this to capture live traffic for later
19
+ review and conversion into tests. Fails with 429 once the workspace
20
+ hits its trace limit.
21
+ `,
22
+ scopes: ["write"],
23
+ annotations: {
24
+ "title": "Create trace",
25
+ "destructiveHint": false,
26
+ "idempotentHint": false,
27
+ "openWorldHint": true,
28
+ "readOnlyHint": false,
29
+ },
30
+ args,
31
+ tool: async (client, args, ctx) => {
32
+ const [result] = await tracesCreate(
33
+ client,
34
+ args.request,
35
+ { fetchOptions: { signal: ctx.signal } },
36
+ ).$inspect();
37
+
38
+ if (!result.ok) {
39
+ return {
40
+ content: [{ type: "text", text: result.error.message }],
41
+ isError: true,
42
+ };
43
+ }
44
+
45
+ return formatResult(result.value);
46
+ },
47
+ };
@@ -0,0 +1,11 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type AnnotatorCreate = { name: string };
8
+
9
+ export const AnnotatorCreate$zodSchema: z.ZodType<AnnotatorCreate> = z.object({
10
+ name: z.string().describe("Annotator name, unique within your workspace"),
11
+ });
@@ -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 AnnotatorCreateResponse = { uuid: string; message: string };
8
+
9
+ export const AnnotatorCreateResponse$zodSchema: z.ZodType<
10
+ AnnotatorCreateResponse
11
+ > = z.object({
12
+ message: z.string().describe("Success message"),
13
+ uuid: z.string().describe("ID of the newly created annotator"),
14
+ });
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type AnnotatorResponse = {
8
+ uuid: string;
9
+ name: string;
10
+ created_at: string;
11
+ updated_at: string;
12
+ jobs_count?: number | null | undefined;
13
+ current_agreement?: number | null | undefined;
14
+ pair_count?: number | null | undefined;
15
+ };
16
+
17
+ export const AnnotatorResponse$zodSchema: z.ZodType<AnnotatorResponse> = z
18
+ .object({
19
+ created_at: z.string().describe(
20
+ "When the annotator was created (ISO 8601 UTC)",
21
+ ),
22
+ current_agreement: z.number().nullable().optional().describe(
23
+ "Latest pairwise mean agreement with other annotators, from 0 to 1",
24
+ ),
25
+ jobs_count: z.int().nullable().optional().describe(
26
+ "Number of labelling jobs assigned to this annotator",
27
+ ),
28
+ name: z.string().describe("Annotator name"),
29
+ pair_count: z.int().nullable().optional().describe(
30
+ "Number of comparable annotation pairs behind the current agreement score",
31
+ ),
32
+ updated_at: z.string().describe(
33
+ "When the annotator was last updated (ISO 8601 UTC)",
34
+ ),
35
+ uuid: z.string().describe("Annotator ID"),
36
+ });
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type AnnotatorUpdate = { name?: string | null | undefined };
8
+
9
+ export const AnnotatorUpdate$zodSchema: z.ZodType<AnnotatorUpdate> = z.object({
10
+ name: z.string().nullable().optional().describe(
11
+ "New annotator name, unique within your workspace. Omit to leave unchanged",
12
+ ),
13
+ });
@@ -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
+ AnnotatorCreate,
8
+ AnnotatorCreate$zodSchema,
9
+ } from "./annotatorcreate.js";
10
+ import {
11
+ AnnotatorCreateResponse,
12
+ AnnotatorCreateResponse$zodSchema,
13
+ } from "./annotatorcreateresponse.js";
14
+ import {
15
+ HTTPValidationError,
16
+ HTTPValidationError$zodSchema,
17
+ } from "./httpvalidationerror.js";
18
+
19
+ export type CreateAnnotatorEndpointAnnotatorsPostRequest = {
20
+ xAPIKey?: string | null | undefined;
21
+ body: AnnotatorCreate;
22
+ };
23
+
24
+ export const CreateAnnotatorEndpointAnnotatorsPostRequest$zodSchema: z.ZodType<
25
+ CreateAnnotatorEndpointAnnotatorsPostRequest
26
+ > = z.object({
27
+ body: AnnotatorCreate$zodSchema,
28
+ xAPIKey: z.string().nullable().optional(),
29
+ });
30
+
31
+ export type CreateAnnotatorEndpointAnnotatorsPostResponse =
32
+ | AnnotatorCreateResponse
33
+ | HTTPValidationError;
34
+
35
+ export const CreateAnnotatorEndpointAnnotatorsPostResponse$zodSchema: z.ZodType<
36
+ CreateAnnotatorEndpointAnnotatorsPostResponse
37
+ > = z.union([
38
+ AnnotatorCreateResponse$zodSchema,
39
+ HTTPValidationError$zodSchema,
40
+ ]);
@@ -0,0 +1,37 @@
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 { TraceIngest, TraceIngest$zodSchema } from "./traceingest.js";
11
+ import {
12
+ TraceIngestResponse,
13
+ TraceIngestResponse$zodSchema,
14
+ } from "./traceingestresponse.js";
15
+
16
+ export type IngestTraceTracesPostRequest = {
17
+ xAPIKey?: string | null | undefined;
18
+ body: TraceIngest;
19
+ };
20
+
21
+ export const IngestTraceTracesPostRequest$zodSchema: z.ZodType<
22
+ IngestTraceTracesPostRequest
23
+ > = z.object({
24
+ body: TraceIngest$zodSchema,
25
+ xAPIKey: z.string().nullable().optional(),
26
+ });
27
+
28
+ export type IngestTraceTracesPostResponse =
29
+ | TraceIngestResponse
30
+ | HTTPValidationError;
31
+
32
+ export const IngestTraceTracesPostResponse$zodSchema: z.ZodType<
33
+ IngestTraceTracesPostResponse
34
+ > = z.union([
35
+ TraceIngestResponse$zodSchema,
36
+ HTTPValidationError$zodSchema,
37
+ ]);
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import {
7
+ AnnotatorResponse,
8
+ AnnotatorResponse$zodSchema,
9
+ } from "./annotatorresponse.js";
10
+ import {
11
+ HTTPValidationError,
12
+ HTTPValidationError$zodSchema,
13
+ } from "./httpvalidationerror.js";
14
+
15
+ export type ListAnnotatorsAnnotatorsGetRequest = {
16
+ xAPIKey?: string | null | undefined;
17
+ };
18
+
19
+ export const ListAnnotatorsAnnotatorsGetRequest$zodSchema: z.ZodType<
20
+ ListAnnotatorsAnnotatorsGetRequest
21
+ > = z.object({
22
+ xAPIKey: z.string().nullable().optional(),
23
+ });
24
+
25
+ export type ListAnnotatorsAnnotatorsGetResponse =
26
+ | Array<AnnotatorResponse>
27
+ | HTTPValidationError;
28
+
29
+ export const ListAnnotatorsAnnotatorsGetResponse$zodSchema: z.ZodType<
30
+ ListAnnotatorsAnnotatorsGetResponse
31
+ > = z.union([
32
+ z.array(AnnotatorResponse$zodSchema).describe("Successful Response"),
33
+ HTTPValidationError$zodSchema,
34
+ ]);
@@ -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
+ TraceMetadataEntry,
8
+ TraceMetadataEntry$zodSchema,
9
+ } from "./tracemetadataentry.js";
10
+ import { TraceOutput, TraceOutput$zodSchema } from "./traceoutput.js";
11
+ import { TraceTurn, TraceTurn$zodSchema } from "./traceturn.js";
12
+
13
+ export type TraceIngest = {
14
+ agent_id: string;
15
+ message_id?: string | null | undefined;
16
+ conversation_id?: string | null | undefined;
17
+ input: Array<TraceTurn>;
18
+ output: TraceOutput;
19
+ metadata?: Array<TraceMetadataEntry> | null | undefined;
20
+ };
21
+
22
+ export const TraceIngest$zodSchema: z.ZodType<TraceIngest> = z.object({
23
+ agent_id: z.string().describe(
24
+ "ID of the agent that produced the turn. Must be an agent in your workspace",
25
+ ),
26
+ conversation_id: z.string().nullable().optional().describe(
27
+ "Your own ID for the conversation this turn belongs to, stored for reference only. Omit if you have none",
28
+ ),
29
+ input: z.array(TraceTurn$zodSchema).describe(
30
+ "Conversation history up to the reported output, oldest turn first, in OpenAI chat format",
31
+ ),
32
+ message_id: z.string().nullable().optional().describe(
33
+ "Your own ID for the last user message in `input`, stored for reference only. Omit if you have none",
34
+ ),
35
+ metadata: z.array(TraceMetadataEntry$zodSchema).nullable().optional()
36
+ .describe(
37
+ "Key-value pairs stored with the trace. Prefer OTel `gen_ai.*` key names where they fit. Omit if you have none",
38
+ ),
39
+ output: TraceOutput$zodSchema,
40
+ });
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type TraceIngestResponse = {
8
+ uuid: string;
9
+ message_id?: string | null | undefined;
10
+ conversation_id?: string | null | undefined;
11
+ created_at: string;
12
+ };
13
+
14
+ export const TraceIngestResponse$zodSchema: z.ZodType<TraceIngestResponse> = z
15
+ .object({
16
+ conversation_id: z.string().nullable().optional().describe(
17
+ "The conversation ID you sent, if any",
18
+ ),
19
+ created_at: z.string().describe(
20
+ "When the trace was created (ISO 8601 UTC)",
21
+ ),
22
+ message_id: z.string().nullable().optional().describe(
23
+ "The message ID you sent, if any",
24
+ ),
25
+ uuid: z.string().describe("Unique ID for the trace"),
26
+ });
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type TraceMetadataEntry = { key: string; value: string };
8
+
9
+ export const TraceMetadataEntry$zodSchema: z.ZodType<TraceMetadataEntry> = z
10
+ .object({
11
+ key: z.string().describe("Name of the metadata entry"),
12
+ value: z.string().describe("Value of the metadata entry"),
13
+ });