@dalmia/calibrate-mcp 0.0.88 → 0.0.90

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 (49) hide show
  1. package/bin/mcp-server.js +223 -190
  2. package/bin/mcp-server.js.map +18 -18
  3. package/esm/funcs/annotationTasksGetAgreement.js +7 -1
  4. package/esm/funcs/annotationTasksGetAgreement.js.map +1 -1
  5. package/esm/funcs/annotationTasksGetSummary.js +3 -0
  6. package/esm/funcs/annotationTasksGetSummary.js.map +1 -1
  7. package/esm/funcs/{workspaceCurrent.d.ts → organizationsCurrent.d.ts} +2 -2
  8. package/esm/funcs/organizationsCurrent.d.ts.map +1 -0
  9. package/esm/funcs/{workspaceCurrent.js → organizationsCurrent.js} +2 -2
  10. package/esm/funcs/organizationsCurrent.js.map +1 -0
  11. package/esm/landing-page.js +1 -1
  12. package/esm/lib/config.d.ts +2 -2
  13. package/esm/lib/config.js +2 -2
  14. package/esm/mcp-server/mcp-server.js +1 -1
  15. package/esm/mcp-server/server.js +3 -3
  16. package/esm/mcp-server/server.js.map +1 -1
  17. package/esm/mcp-server/tools/{workspaceCurrent.d.ts → organizationsCurrent.d.ts} +2 -2
  18. package/esm/mcp-server/tools/organizationsCurrent.d.ts.map +1 -0
  19. package/esm/mcp-server/tools/{workspaceCurrent.js → organizationsCurrent.js} +4 -4
  20. package/esm/mcp-server/tools/organizationsCurrent.js.map +1 -0
  21. package/esm/models/listtracesendpointtracesgetop.js +2 -2
  22. package/esm/models/listtracesendpointtracesgetop.js.map +1 -1
  23. package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.d.ts +33 -0
  24. package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.d.ts.map +1 -1
  25. package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.js +22 -0
  26. package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.js.map +1 -1
  27. package/esm/models/tasksummaryannotationtaskstaskuuidsummarygetop.d.ts +32 -0
  28. package/esm/models/tasksummaryannotationtaskstaskuuidsummarygetop.d.ts.map +1 -1
  29. package/esm/models/tasksummaryannotationtaskstaskuuidsummarygetop.js +23 -0
  30. package/esm/models/tasksummaryannotationtaskstaskuuidsummarygetop.js.map +1 -1
  31. package/esm/models/tasksummaryresponse.js +1 -1
  32. package/esm/models/tasksummaryresponse.js.map +1 -1
  33. package/package.json +1 -1
  34. package/src/funcs/annotationTasksGetAgreement.ts +7 -1
  35. package/src/funcs/annotationTasksGetSummary.ts +3 -0
  36. package/src/funcs/{workspaceCurrent.ts → organizationsCurrent.ts} +1 -1
  37. package/src/landing-page.ts +1 -1
  38. package/src/lib/config.ts +2 -2
  39. package/src/mcp-server/mcp-server.ts +1 -1
  40. package/src/mcp-server/server.ts +3 -3
  41. package/src/mcp-server/tools/{workspaceCurrent.ts → organizationsCurrent.ts} +3 -3
  42. package/src/models/listtracesendpointtracesgetop.ts +2 -2
  43. package/src/models/taskagreementannotationtaskstaskuuidagreementgetop.ts +52 -0
  44. package/src/models/tasksummaryannotationtaskstaskuuidsummarygetop.ts +51 -0
  45. package/src/models/tasksummaryresponse.ts +1 -1
  46. package/esm/funcs/workspaceCurrent.d.ts.map +0 -1
  47. package/esm/funcs/workspaceCurrent.js.map +0 -1
  48. package/esm/mcp-server/tools/workspaceCurrent.d.ts.map +0 -1
  49. package/esm/mcp-server/tools/workspaceCurrent.js.map +0 -1
package/bin/mcp-server.js CHANGED
@@ -6570,7 +6570,15 @@ function writeFromReadableStream(stream, writable) {
6570
6570
  }
6571
6571
  return writeFromReadableStreamDefaultReader(stream.getReader(), writable);
6572
6572
  }
6573
- var RequestError, toRequestError = (e) => {
6573
+ var RequestError, validateRequestTarget = (target) => {
6574
+ const backslash = target.indexOf("\\");
6575
+ if (backslash !== -1) {
6576
+ const query = target.indexOf("?");
6577
+ if (query === -1 || backslash < query) {
6578
+ throw new RequestError("Backslash in request path");
6579
+ }
6580
+ }
6581
+ }, toRequestError = (e) => {
6574
6582
  if (e instanceof RequestError) {
6575
6583
  return e;
6576
6584
  }
@@ -6640,6 +6648,7 @@ var RequestError, toRequestError = (e) => {
6640
6648
  throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
6641
6649
  }
6642
6650
  try {
6651
+ validateRequestTarget(incomingUrl);
6643
6652
  const url2 = new URL(incomingUrl);
6644
6653
  req[urlKey] = url2.href;
6645
6654
  } catch (e) {
@@ -6660,6 +6669,7 @@ var RequestError, toRequestError = (e) => {
6660
6669
  } else {
6661
6670
  scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
6662
6671
  }
6672
+ validateRequestTarget(incomingUrl);
6663
6673
  const url = new URL(`${scheme}://${host}${incomingUrl}`);
6664
6674
  if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
6665
6675
  throw new RequestError("Invalid host header");
@@ -53298,9 +53308,9 @@ var init_config = __esm(() => {
53298
53308
  SDK_METADATA = {
53299
53309
  language: "typescript",
53300
53310
  openapiDocVersion: "0.1.0",
53301
- sdkVersion: "0.0.88",
53311
+ sdkVersion: "0.0.90",
53302
53312
  genVersion: "2.915.1",
53303
- userAgent: "speakeasy-sdk/mcp-typescript 0.0.88 2.915.1 0.1.0 @dalmia/calibrate-mcp"
53313
+ userAgent: "speakeasy-sdk/mcp-typescript 0.0.90 2.915.1 0.1.0 @dalmia/calibrate-mcp"
53304
53314
  };
53305
53315
  });
53306
53316
 
@@ -59105,12 +59115,19 @@ var init_taskagreementresponse = __esm(() => {
59105
59115
  });
59106
59116
 
59107
59117
  // src/models/taskagreementannotationtaskstaskuuidagreementgetop.ts
59108
- var TaskAgreementAnnotationTasksTaskUuidAgreementGetRequest$zodSchema, TaskAgreementAnnotationTasksTaskUuidAgreementGetResponse$zodSchema;
59118
+ var TaskAgreementAnnotationTasksTaskUuidAgreementGetDateField$zodSchema, TaskAgreementAnnotationTasksTaskUuidAgreementGetRequest$zodSchema, TaskAgreementAnnotationTasksTaskUuidAgreementGetResponse$zodSchema;
59109
59119
  var init_taskagreementannotationtaskstaskuuidagreementgetop = __esm(() => {
59110
59120
  init_zod();
59111
59121
  init_httpvalidationerror();
59112
59122
  init_taskagreementresponse();
59123
+ TaskAgreementAnnotationTasksTaskUuidAgreementGetDateField$zodSchema = _enum([
59124
+ "row_added",
59125
+ "annotator_answered"
59126
+ ]).describe("Which date `start` and `end` apply to:\n\n- `row_added`: when the row was added to the task\n- `annotator_answered`: when the annotator first gave the answer in their latest labelling job. Editing does not change this date\n\nOmit to use `row_added`");
59113
59127
  TaskAgreementAnnotationTasksTaskUuidAgreementGetRequest$zodSchema = object({
59128
+ date_field: TaskAgreementAnnotationTasksTaskUuidAgreementGetDateField$zodSchema.default("row_added").describe("Which date `start` and `end` apply to:\n\n- `row_added`: when the row was added to the task\n- `annotator_answered`: when the annotator first gave the answer in their latest labelling job. Editing does not change this date\n\nOmit to use `row_added`"),
59129
+ end: datetime2({ offset: true }).describe("Return only rows or answers dated before this time (ISO 8601). A time with no timezone is read as UTC. Omit for no latest date").nullable().optional(),
59130
+ start: datetime2({ offset: true }).describe("Return only rows or answers dated at or after this time (ISO 8601). A time with no timezone is read as UTC. Omit for no earliest date").nullable().optional(),
59114
59131
  task_uuid: string2().describe("Annotation task to act on"),
59115
59132
  xAPIKey: string2().nullable().optional()
59116
59133
  });
@@ -59138,6 +59155,11 @@ async function $do24(client$, request, options) {
59138
59155
  })
59139
59156
  };
59140
59157
  const path$ = pathToFunc("/annotation-tasks/{task_uuid}/agreement")(pathParams$);
59158
+ const query$ = encodeFormQuery({
59159
+ date_field: payload$.date_field,
59160
+ end: payload$.end,
59161
+ start: payload$.start
59162
+ });
59141
59163
  const headers$ = new Headers(compactMap({
59142
59164
  Accept: "application/json",
59143
59165
  "X-API-Key": encodeSimple("X-API-Key", payload$.xAPIKey, {
@@ -59169,6 +59191,7 @@ async function $do24(client$, request, options) {
59169
59191
  baseURL: options?.serverURL,
59170
59192
  path: path$,
59171
59193
  headers: headers$,
59194
+ query: query$,
59172
59195
  body: body$,
59173
59196
  userAgent: client$._options.userAgent,
59174
59197
  timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
@@ -59450,7 +59473,7 @@ var init_tasksummaryresponse = __esm(() => {
59450
59473
  evaluators: array(record(string2(), any())).describe("The task's evaluators, stable across pages, each with its live rubric"),
59451
59474
  item_comments: record(string2(), any()).nullable().optional().describe("Annotator comments, keyed by item ID"),
59452
59475
  pagination: PaginationMeta$zodSchema,
59453
- rows: array(record(string2(), any())).describe("One row per item, evaluator, and version on this page, with the evaluator's value and each annotator's label"),
59476
+ rows: array(record(string2(), any())).describe("One row per item, evaluator, and version on this page, with the evaluator's value and each annotator's label. `item_added_at` is when the row was added (ISO 8601 UTC). Each label's `answered_at` is when the annotator first gave it in their latest labelling job, and editing does not change it"),
59454
59477
  task_id: string2().describe("ID of the task"),
59455
59478
  task_type: TaskType$zodSchema.describe("Type of the task")
59456
59479
  }).catchall(any()), "AdditionalProperties", true);
@@ -59473,18 +59496,24 @@ var init_tasksummaryresponse = __esm(() => {
59473
59496
  });
59474
59497
 
59475
59498
  // src/models/tasksummaryannotationtaskstaskuuidsummarygetop.ts
59476
- var Order$zodSchema, TaskSummaryAnnotationTasksTaskUuidSummaryGetRequest$zodSchema, TaskSummaryAnnotationTasksTaskUuidSummaryGetResponse$zodSchema;
59499
+ var TaskSummaryAnnotationTasksTaskUuidSummaryGetDateField$zodSchema, Order$zodSchema, TaskSummaryAnnotationTasksTaskUuidSummaryGetRequest$zodSchema, TaskSummaryAnnotationTasksTaskUuidSummaryGetResponse$zodSchema;
59477
59500
  var init_tasksummaryannotationtaskstaskuuidsummarygetop = __esm(() => {
59478
59501
  init_zod();
59479
59502
  init_httpvalidationerror();
59480
59503
  init_tasksummaryresponse();
59504
+ TaskSummaryAnnotationTasksTaskUuidSummaryGetDateField$zodSchema = _enum([
59505
+ "row_added",
59506
+ "annotator_answered"
59507
+ ]).describe("Which date `start` and `end` apply to:\n\n- `row_added`: when the row was added to the task\n- `annotator_answered`: when the annotator first gave the answer in their latest labelling job. Editing does not change this date\n\nOmit to use `row_added`");
59481
59508
  Order$zodSchema = _enum([
59482
59509
  "asc",
59483
59510
  "desc"
59484
59511
  ]).describe("Sort direction");
59485
59512
  TaskSummaryAnnotationTasksTaskUuidSummaryGetRequest$zodSchema = object({
59486
59513
  compact: boolean2().default(false).describe("Return a compact response that omits heavy detail fields (`rows.payload`, `rows.evaluator_reasoning`, `rows.annotations.reasoning`, `evaluators.versions.system_prompt`, `evaluators.versions.output_config`, `evaluators.versions.variables`, `item_comments`), keeping only the lightweight decision fields. Omit for full detail"),
59514
+ date_field: TaskSummaryAnnotationTasksTaskUuidSummaryGetDateField$zodSchema.default("row_added").describe("Which date `start` and `end` apply to:\n\n- `row_added`: when the row was added to the task\n- `annotator_answered`: when the annotator first gave the answer in their latest labelling job. Editing does not change this date\n\nOmit to use `row_added`"),
59487
59515
  disagreement_only: boolean2().default(false).describe("When true, keep only rows where the evaluator disagreed with at least one annotator"),
59516
+ end: datetime2({ offset: true }).describe("Return only rows or answers dated before this time (ISO 8601). A time with no timezone is read as UTC. Omit for no latest date").nullable().optional(),
59488
59517
  item_id: string2().describe("Filter rows to a single item. The full task-wide annotator union is still returned in `annotators`").nullable().optional(),
59489
59518
  limit: int().default(50).describe("Maximum number of items to return"),
59490
59519
  live_only: boolean2().default(false).describe("When true, emit only one row for each (item, evaluator) pair using the evaluator's live version. Versions other than the live one that have runs are excluded"),
@@ -59492,6 +59521,7 @@ var init_tasksummaryannotationtaskstaskuuidsummarygetop = __esm(() => {
59492
59521
  order: Order$zodSchema.default("desc").describe("Sort direction"),
59493
59522
  q: string2().describe("Case-insensitive substring search on `payload.name`. Blank is a no-op").nullable().optional(),
59494
59523
  sort_by: string2().default("created_at").describe("Sort key for the results"),
59524
+ start: datetime2({ offset: true }).describe("Return only rows or answers dated at or after this time (ISO 8601). A time with no timezone is read as UTC. Omit for no earliest date").nullable().optional(),
59495
59525
  task_uuid: string2().describe("Annotation task to act on"),
59496
59526
  xAPIKey: string2().nullable().optional()
59497
59527
  });
@@ -59521,14 +59551,17 @@ async function $do26(client$, request, options) {
59521
59551
  const path$ = pathToFunc("/annotation-tasks/{task_uuid}/summary")(pathParams$);
59522
59552
  const query$ = encodeFormQuery({
59523
59553
  compact: payload$.compact,
59554
+ date_field: payload$.date_field,
59524
59555
  disagreement_only: payload$.disagreement_only,
59556
+ end: payload$.end,
59525
59557
  item_id: payload$.item_id,
59526
59558
  limit: payload$.limit,
59527
59559
  live_only: payload$.live_only,
59528
59560
  offset: payload$.offset,
59529
59561
  order: payload$.order,
59530
59562
  q: payload$.q,
59531
- sort_by: payload$.sort_by
59563
+ sort_by: payload$.sort_by,
59564
+ start: payload$.start
59532
59565
  });
59533
59566
  const headers$ = new Headers(compactMap({
59534
59567
  Accept: "application/json",
@@ -61870,6 +61903,146 @@ var init_evaluatorsList2 = __esm(() => {
61870
61903
  };
61871
61904
  });
61872
61905
 
61906
+ // src/models/currentworkspaceresponse.ts
61907
+ var CurrentWorkspaceResponse$zodSchema;
61908
+ var init_currentworkspaceresponse = __esm(() => {
61909
+ init_zod();
61910
+ CurrentWorkspaceResponse$zodSchema = object({
61911
+ name: string2().describe("Workspace display name"),
61912
+ uuid: string2().describe("Workspace ID. Put this at the front of a Calibrate web address to link straight to something in this workspace, as in `/<uuid>/tests`")
61913
+ });
61914
+ });
61915
+
61916
+ // src/models/getcurrentworkspaceorganizationscurrentgetop.ts
61917
+ var GetCurrentWorkspaceOrganizationsCurrentGetRequest$zodSchema, GetCurrentWorkspaceOrganizationsCurrentGetResponse$zodSchema;
61918
+ var init_getcurrentworkspaceorganizationscurrentgetop = __esm(() => {
61919
+ init_zod();
61920
+ init_currentworkspaceresponse();
61921
+ init_httpvalidationerror();
61922
+ GetCurrentWorkspaceOrganizationsCurrentGetRequest$zodSchema = object({
61923
+ xAPIKey: string2().nullable().optional()
61924
+ });
61925
+ GetCurrentWorkspaceOrganizationsCurrentGetResponse$zodSchema = union([
61926
+ CurrentWorkspaceResponse$zodSchema,
61927
+ HTTPValidationError$zodSchema
61928
+ ]);
61929
+ });
61930
+
61931
+ // src/funcs/organizationsCurrent.ts
61932
+ function organizationsCurrent(client$, request, options) {
61933
+ return new APIPromise($do40(client$, request, options));
61934
+ }
61935
+ async function $do40(client$, request, options) {
61936
+ const parsed$ = safeParse4(request, (value$) => GetCurrentWorkspaceOrganizationsCurrentGetRequest$zodSchema.optional().parse(value$), "Input validation failed");
61937
+ if (!parsed$.ok) {
61938
+ return [parsed$, { status: "invalid" }];
61939
+ }
61940
+ const payload$ = parsed$.value;
61941
+ const body$ = null;
61942
+ const path$ = pathToFunc("/organizations/current")();
61943
+ const headers$ = new Headers(compactMap({
61944
+ Accept: "application/json",
61945
+ "X-API-Key": encodeSimple("X-API-Key", payload$?.xAPIKey, {
61946
+ explode: false,
61947
+ charEncoding: "none"
61948
+ })
61949
+ }));
61950
+ const securityInput = await extractSecurity(client$._options.security);
61951
+ const requestSecurity = resolveGlobalSecurity(securityInput);
61952
+ const context = {
61953
+ options: client$._options,
61954
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
61955
+ operationID: "get_current_workspace_organizations_current_get",
61956
+ oAuth2Scopes: null,
61957
+ resolvedSecurity: requestSecurity,
61958
+ securitySource: client$._options.security,
61959
+ retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
61960
+ retryCodes: options?.retryCodes || [
61961
+ "429",
61962
+ "500",
61963
+ "502",
61964
+ "503",
61965
+ "504"
61966
+ ]
61967
+ };
61968
+ const requestRes = client$._createRequest(context, {
61969
+ security: requestSecurity,
61970
+ method: "GET",
61971
+ baseURL: options?.serverURL,
61972
+ path: path$,
61973
+ headers: headers$,
61974
+ body: body$,
61975
+ userAgent: client$._options.userAgent,
61976
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
61977
+ }, options);
61978
+ if (!requestRes.ok) {
61979
+ return [requestRes, { status: "invalid" }];
61980
+ }
61981
+ const req$ = requestRes.value;
61982
+ const doResult = await client$._do(req$, {
61983
+ context,
61984
+ errorCodes: [],
61985
+ retryConfig: context.retryConfig,
61986
+ retryCodes: context.retryCodes
61987
+ });
61988
+ if (!doResult.ok) {
61989
+ return [doResult, { status: "request-error", request: req$ }];
61990
+ }
61991
+ return [doResult, {
61992
+ status: "complete",
61993
+ request: req$,
61994
+ response: doResult.value
61995
+ }];
61996
+ }
61997
+ var init_organizationsCurrent = __esm(() => {
61998
+ init_encodings();
61999
+ init_primitives();
62000
+ init_schemas4();
62001
+ init_security();
62002
+ init_url();
62003
+ init_getcurrentworkspaceorganizationscurrentgetop();
62004
+ init_async();
62005
+ });
62006
+
62007
+ // src/mcp-server/tools/organizationsCurrent.ts
62008
+ var args40, tool$organizationsCurrent;
62009
+ var init_organizationsCurrent2 = __esm(() => {
62010
+ init_organizationsCurrent();
62011
+ init_getcurrentworkspaceorganizationscurrentgetop();
62012
+ init_tools();
62013
+ args40 = {
62014
+ request: GetCurrentWorkspaceOrganizationsCurrentGetRequest$zodSchema.optional()
62015
+ };
62016
+ tool$organizationsCurrent = {
62017
+ name: "get-current-workspace",
62018
+ description: `Get the workspace the caller's API key belongs to, as its ID and
62019
+ name. Put the ID at the front of a Calibrate web address to link
62020
+ straight to something in that workspace, as in \`/<uuid>/tests\`.
62021
+ Without it, a link opens whichever workspace the reader looked at
62022
+ last. Requires a Calibrate API key (CALIBRATE_API_KEY).
62023
+ `,
62024
+ scopes: ["read"],
62025
+ annotations: {
62026
+ title: "Get the current workspace",
62027
+ destructiveHint: false,
62028
+ idempotentHint: true,
62029
+ openWorldHint: true,
62030
+ readOnlyHint: true
62031
+ },
62032
+ args: args40,
62033
+ tool: async (client, args, ctx) => {
62034
+ const [result] = await organizationsCurrent(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62035
+ if (!result.ok) {
62036
+ return {
62037
+ content: [{ type: "text", text: result.error.message }],
62038
+ isError: true
62039
+ };
62040
+ }
62041
+ return formatResult(result.value);
62042
+ }
62043
+ };
62044
+ });
62045
+
61873
62046
  // src/models/chatmessage.ts
61874
62047
  var Role$zodSchema, ChatMessage$zodSchema;
61875
62048
  var init_chatmessage = __esm(() => {
@@ -61976,9 +62149,9 @@ var init_bulkuploadteststestsbulkpostop = __esm(() => {
61976
62149
 
61977
62150
  // src/funcs/testsBulkCreate.ts
61978
62151
  function testsBulkCreate(client$, request, options) {
61979
- return new APIPromise($do40(client$, request, options));
62152
+ return new APIPromise($do41(client$, request, options));
61980
62153
  }
61981
- async function $do40(client$, request, options) {
62154
+ async function $do41(client$, request, options) {
61982
62155
  const parsed$ = safeParse4(request, (value$) => BulkUploadTestsTestsBulkPostRequest$zodSchema.parse(value$), "Input validation failed");
61983
62156
  if (!parsed$.ok) {
61984
62157
  return [parsed$, { status: "invalid" }];
@@ -62052,12 +62225,12 @@ var init_testsBulkCreate = __esm(() => {
62052
62225
  });
62053
62226
 
62054
62227
  // src/mcp-server/tools/testsBulkCreate.ts
62055
- var args40, tool$testsBulkCreate;
62228
+ var args41, tool$testsBulkCreate;
62056
62229
  var init_testsBulkCreate2 = __esm(() => {
62057
62230
  init_testsBulkCreate();
62058
62231
  init_bulkuploadteststestsbulkpostop();
62059
62232
  init_tools();
62060
- args40 = {
62233
+ args41 = {
62061
62234
  request: BulkUploadTestsTestsBulkPostRequest$zodSchema
62062
62235
  };
62063
62236
  tool$testsBulkCreate = {
@@ -62074,7 +62247,7 @@ tests including their UUIDs.
62074
62247
  openWorldHint: true,
62075
62248
  readOnlyHint: false
62076
62249
  },
62077
- args: args40,
62250
+ args: args41,
62078
62251
  tool: async (client, args, ctx) => {
62079
62252
  const [result] = await testsBulkCreate(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62080
62253
  if (!result.ok) {
@@ -62136,9 +62309,9 @@ var init_createtestendpointtestspostop = __esm(() => {
62136
62309
 
62137
62310
  // src/funcs/testsCreate.ts
62138
62311
  function testsCreate(client$, request, options) {
62139
- return new APIPromise($do41(client$, request, options));
62312
+ return new APIPromise($do42(client$, request, options));
62140
62313
  }
62141
- async function $do41(client$, request, options) {
62314
+ async function $do42(client$, request, options) {
62142
62315
  const parsed$ = safeParse4(request, (value$) => CreateTestEndpointTestsPostRequest$zodSchema.parse(value$), "Input validation failed");
62143
62316
  if (!parsed$.ok) {
62144
62317
  return [parsed$, { status: "invalid" }];
@@ -62212,12 +62385,12 @@ var init_testsCreate = __esm(() => {
62212
62385
  });
62213
62386
 
62214
62387
  // src/mcp-server/tools/testsCreate.ts
62215
- var args41, tool$testsCreate;
62388
+ var args42, tool$testsCreate;
62216
62389
  var init_testsCreate2 = __esm(() => {
62217
62390
  init_testsCreate();
62218
62391
  init_createtestendpointtestspostop();
62219
62392
  init_tools();
62220
- args41 = {
62393
+ args42 = {
62221
62394
  request: CreateTestEndpointTestsPostRequest$zodSchema
62222
62395
  };
62223
62396
  tool$testsCreate = {
@@ -62234,7 +62407,7 @@ Requires a Calibrate API key (CALIBRATE_API_KEY).
62234
62407
  openWorldHint: true,
62235
62408
  readOnlyHint: false
62236
62409
  },
62237
- args: args41,
62410
+ args: args42,
62238
62411
  tool: async (client, args, ctx) => {
62239
62412
  const [result] = await testsCreate(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62240
62413
  if (!result.ok) {
@@ -62287,9 +62460,9 @@ var init_gettestendpointteststestuuidgetop = __esm(() => {
62287
62460
 
62288
62461
  // src/funcs/testsGet.ts
62289
62462
  function testsGet(client$, request, options) {
62290
- return new APIPromise($do42(client$, request, options));
62463
+ return new APIPromise($do43(client$, request, options));
62291
62464
  }
62292
- async function $do42(client$, request, options) {
62465
+ async function $do43(client$, request, options) {
62293
62466
  const parsed$ = safeParse4(request, (value$) => GetTestEndpointTestsTestUuidGetRequest$zodSchema.parse(value$), "Input validation failed");
62294
62467
  if (!parsed$.ok) {
62295
62468
  return [parsed$, { status: "invalid" }];
@@ -62368,12 +62541,12 @@ var init_testsGet = __esm(() => {
62368
62541
  });
62369
62542
 
62370
62543
  // src/mcp-server/tools/testsGet.ts
62371
- var args42, tool$testsGet;
62544
+ var args43, tool$testsGet;
62372
62545
  var init_testsGet2 = __esm(() => {
62373
62546
  init_testsGet();
62374
62547
  init_gettestendpointteststestuuidgetop();
62375
62548
  init_tools();
62376
- args42 = {
62549
+ args43 = {
62377
62550
  request: GetTestEndpointTestsTestUuidGetRequest$zodSchema
62378
62551
  };
62379
62552
  tool$testsGet = {
@@ -62390,7 +62563,7 @@ exist or belongs to another org.
62390
62563
  openWorldHint: true,
62391
62564
  readOnlyHint: true
62392
62565
  },
62393
- args: args42,
62566
+ args: args43,
62394
62567
  tool: async (client, args, ctx) => {
62395
62568
  const [result] = await testsGet(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62396
62569
  if (!result.ok) {
@@ -62424,9 +62597,9 @@ var init_listteststestsgetop = __esm(() => {
62424
62597
 
62425
62598
  // src/funcs/testsList.ts
62426
62599
  function testsList(client$, request, options) {
62427
- return new APIPromise($do43(client$, request, options));
62600
+ return new APIPromise($do44(client$, request, options));
62428
62601
  }
62429
- async function $do43(client$, request, options) {
62602
+ async function $do44(client$, request, options) {
62430
62603
  const parsed$ = safeParse4(request, (value$) => ListTestsTestsGetRequest$zodSchema.optional().parse(value$), "Input validation failed");
62431
62604
  if (!parsed$.ok) {
62432
62605
  return [parsed$, { status: "invalid" }];
@@ -62505,12 +62678,12 @@ var init_testsList = __esm(() => {
62505
62678
  });
62506
62679
 
62507
62680
  // src/mcp-server/tools/testsList.ts
62508
- var args43, tool$testsList;
62681
+ var args44, tool$testsList;
62509
62682
  var init_testsList2 = __esm(() => {
62510
62683
  init_testsList();
62511
62684
  init_listteststestsgetop();
62512
62685
  init_tools();
62513
- args43 = {
62686
+ args44 = {
62514
62687
  request: ListTestsTestsGetRequest$zodSchema.optional()
62515
62688
  };
62516
62689
  tool$testsList = {
@@ -62527,7 +62700,7 @@ before creating runs.
62527
62700
  openWorldHint: true,
62528
62701
  readOnlyHint: true
62529
62702
  },
62530
- args: args43,
62703
+ args: args44,
62531
62704
  tool: async (client, args, ctx) => {
62532
62705
  const [result] = await testsList(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62533
62706
  if (!result.ok) {
@@ -62580,9 +62753,9 @@ var init_updatetestendpointteststestuuidputop = __esm(() => {
62580
62753
 
62581
62754
  // src/funcs/testsUpdate.ts
62582
62755
  function testsUpdate(client$, request, options) {
62583
- return new APIPromise($do44(client$, request, options));
62756
+ return new APIPromise($do45(client$, request, options));
62584
62757
  }
62585
- async function $do44(client$, request, options) {
62758
+ async function $do45(client$, request, options) {
62586
62759
  const parsed$ = safeParse4(request, (value$) => UpdateTestEndpointTestsTestUuidPutRequest$zodSchema.parse(value$), "Input validation failed");
62587
62760
  if (!parsed$.ok) {
62588
62761
  return [parsed$, { status: "invalid" }];
@@ -62662,12 +62835,12 @@ var init_testsUpdate = __esm(() => {
62662
62835
  });
62663
62836
 
62664
62837
  // src/mcp-server/tools/testsUpdate.ts
62665
- var args44, tool$testsUpdate;
62838
+ var args45, tool$testsUpdate;
62666
62839
  var init_testsUpdate2 = __esm(() => {
62667
62840
  init_testsUpdate();
62668
62841
  init_updatetestendpointteststestuuidputop();
62669
62842
  init_tools();
62670
- args44 = {
62843
+ args45 = {
62671
62844
  request: UpdateTestEndpointTestsTestUuidPutRequest$zodSchema
62672
62845
  };
62673
62846
  tool$testsUpdate = {
@@ -62684,7 +62857,7 @@ fields to change (name, config). Returns the updated test. Fails with
62684
62857
  openWorldHint: true,
62685
62858
  readOnlyHint: false
62686
62859
  },
62687
- args: args44,
62860
+ args: args45,
62688
62861
  tool: async (client, args, ctx) => {
62689
62862
  const [result] = await testsUpdate(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62690
62863
  if (!result.ok) {
@@ -62808,9 +62981,9 @@ var init_ingesttracetracespostop = __esm(() => {
62808
62981
 
62809
62982
  // src/funcs/tracesCreate.ts
62810
62983
  function tracesCreate(client$, request, options) {
62811
- return new APIPromise($do45(client$, request, options));
62984
+ return new APIPromise($do46(client$, request, options));
62812
62985
  }
62813
- async function $do45(client$, request, options) {
62986
+ async function $do46(client$, request, options) {
62814
62987
  const parsed$ = safeParse4(request, (value$) => IngestTraceTracesPostRequest$zodSchema.parse(value$), "Input validation failed");
62815
62988
  if (!parsed$.ok) {
62816
62989
  return [parsed$, { status: "invalid" }];
@@ -62884,12 +63057,12 @@ var init_tracesCreate = __esm(() => {
62884
63057
  });
62885
63058
 
62886
63059
  // src/mcp-server/tools/tracesCreate.ts
62887
- var args45, tool$tracesCreate;
63060
+ var args46, tool$tracesCreate;
62888
63061
  var init_tracesCreate2 = __esm(() => {
62889
63062
  init_tracesCreate();
62890
63063
  init_ingesttracetracespostop();
62891
63064
  init_tools();
62892
- args45 = {
63065
+ args46 = {
62893
63066
  request: IngestTraceTracesPostRequest$zodSchema
62894
63067
  };
62895
63068
  tool$tracesCreate = {
@@ -62908,7 +63081,7 @@ hits its trace limit.
62908
63081
  openWorldHint: true,
62909
63082
  readOnlyHint: false
62910
63083
  },
62911
- args: args45,
63084
+ args: args46,
62912
63085
  tool: async (client, args, ctx) => {
62913
63086
  const [result] = await tracesCreate(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62914
63087
  if (!result.ok) {
@@ -63056,8 +63229,8 @@ var init_listtracesendpointtracesgetop = __esm(() => {
63056
63229
  ListTracesEndpointTracesGetRequest$zodSchema = object({
63057
63230
  agent_id: string2().describe("Return only traces from this agent").nullable().optional(),
63058
63231
  conversation_id: string2().describe("Return only the turns of this conversation. Requires `agent_id`").nullable().optional(),
63059
- created_after: datetime2({ offset: true }).describe("Return only traces created at or after this time (ISO 8601). A time with no timezone is read as UTC").nullable().optional(),
63060
- created_before: datetime2({ offset: true }).describe("Return only traces created before this time (ISO 8601). A time with no timezone is read as UTC").nullable().optional(),
63232
+ created_after: datetime2({ offset: true }).describe("Return only traces created at or after this time (ISO 8601). A time with no timezone is read as UTC. Omit for no earliest date").nullable().optional(),
63233
+ created_before: datetime2({ offset: true }).describe("Return only traces created before this time (ISO 8601). A time with no timezone is read as UTC. Omit for no latest date").nullable().optional(),
63061
63234
  include_content: boolean2().default(false).describe("Also return each trace's full input, output and metadata. Use `limit` and `offset` to page through them"),
63062
63235
  include_score_averages: boolean2().default(false).describe("Also return each evaluator's mean score over every matching trace, not just this page. Costs a pass over those traces, so ask for it when the filters change rather than on every page"),
63063
63236
  labels: array(string2()).describe("Return only traces carrying at least one of these labels. Repeat the parameter for each label").nullable().optional(),
@@ -63078,9 +63251,9 @@ var init_listtracesendpointtracesgetop = __esm(() => {
63078
63251
 
63079
63252
  // src/funcs/tracesList.ts
63080
63253
  function tracesList(client$, request, options) {
63081
- return new APIPromise($do46(client$, request, options));
63254
+ return new APIPromise($do47(client$, request, options));
63082
63255
  }
63083
- async function $do46(client$, request, options) {
63256
+ async function $do47(client$, request, options) {
63084
63257
  const parsed$ = safeParse4(request, (value$) => ListTracesEndpointTracesGetRequest$zodSchema.optional().parse(value$), "Input validation failed");
63085
63258
  if (!parsed$.ok) {
63086
63259
  return [parsed$, { status: "invalid" }];
@@ -63170,12 +63343,12 @@ var init_tracesList = __esm(() => {
63170
63343
  });
63171
63344
 
63172
63345
  // src/mcp-server/tools/tracesList.ts
63173
- var args46, tool$tracesList;
63346
+ var args47, tool$tracesList;
63174
63347
  var init_tracesList2 = __esm(() => {
63175
63348
  init_tracesList();
63176
63349
  init_listtracesendpointtracesgetop();
63177
63350
  init_tools();
63178
- args46 = {
63351
+ args47 = {
63179
63352
  request: ListTracesEndpointTracesGetRequest$zodSchema.optional()
63180
63353
  };
63181
63354
  tool$tracesList = {
@@ -63196,149 +63369,9 @@ and metadata.
63196
63369
  openWorldHint: true,
63197
63370
  readOnlyHint: true
63198
63371
  },
63199
- args: args46,
63200
- tool: async (client, args, ctx) => {
63201
- const [result] = await tracesList(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63202
- if (!result.ok) {
63203
- return {
63204
- content: [{ type: "text", text: result.error.message }],
63205
- isError: true
63206
- };
63207
- }
63208
- return formatResult(result.value);
63209
- }
63210
- };
63211
- });
63212
-
63213
- // src/models/currentworkspaceresponse.ts
63214
- var CurrentWorkspaceResponse$zodSchema;
63215
- var init_currentworkspaceresponse = __esm(() => {
63216
- init_zod();
63217
- CurrentWorkspaceResponse$zodSchema = object({
63218
- name: string2().describe("Workspace display name"),
63219
- uuid: string2().describe("Workspace ID. Put this at the front of a Calibrate web address to link straight to something in this workspace, as in `/<uuid>/tests`")
63220
- });
63221
- });
63222
-
63223
- // src/models/getcurrentworkspaceorganizationscurrentgetop.ts
63224
- var GetCurrentWorkspaceOrganizationsCurrentGetRequest$zodSchema, GetCurrentWorkspaceOrganizationsCurrentGetResponse$zodSchema;
63225
- var init_getcurrentworkspaceorganizationscurrentgetop = __esm(() => {
63226
- init_zod();
63227
- init_currentworkspaceresponse();
63228
- init_httpvalidationerror();
63229
- GetCurrentWorkspaceOrganizationsCurrentGetRequest$zodSchema = object({
63230
- xAPIKey: string2().nullable().optional()
63231
- });
63232
- GetCurrentWorkspaceOrganizationsCurrentGetResponse$zodSchema = union([
63233
- CurrentWorkspaceResponse$zodSchema,
63234
- HTTPValidationError$zodSchema
63235
- ]);
63236
- });
63237
-
63238
- // src/funcs/workspaceCurrent.ts
63239
- function workspaceCurrent(client$, request, options) {
63240
- return new APIPromise($do47(client$, request, options));
63241
- }
63242
- async function $do47(client$, request, options) {
63243
- const parsed$ = safeParse4(request, (value$) => GetCurrentWorkspaceOrganizationsCurrentGetRequest$zodSchema.optional().parse(value$), "Input validation failed");
63244
- if (!parsed$.ok) {
63245
- return [parsed$, { status: "invalid" }];
63246
- }
63247
- const payload$ = parsed$.value;
63248
- const body$ = null;
63249
- const path$ = pathToFunc("/organizations/current")();
63250
- const headers$ = new Headers(compactMap({
63251
- Accept: "application/json",
63252
- "X-API-Key": encodeSimple("X-API-Key", payload$?.xAPIKey, {
63253
- explode: false,
63254
- charEncoding: "none"
63255
- })
63256
- }));
63257
- const securityInput = await extractSecurity(client$._options.security);
63258
- const requestSecurity = resolveGlobalSecurity(securityInput);
63259
- const context = {
63260
- options: client$._options,
63261
- baseURL: options?.serverURL ?? client$._baseURL ?? "",
63262
- operationID: "get_current_workspace_organizations_current_get",
63263
- oAuth2Scopes: null,
63264
- resolvedSecurity: requestSecurity,
63265
- securitySource: client$._options.security,
63266
- retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
63267
- retryCodes: options?.retryCodes || [
63268
- "429",
63269
- "500",
63270
- "502",
63271
- "503",
63272
- "504"
63273
- ]
63274
- };
63275
- const requestRes = client$._createRequest(context, {
63276
- security: requestSecurity,
63277
- method: "GET",
63278
- baseURL: options?.serverURL,
63279
- path: path$,
63280
- headers: headers$,
63281
- body: body$,
63282
- userAgent: client$._options.userAgent,
63283
- timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
63284
- }, options);
63285
- if (!requestRes.ok) {
63286
- return [requestRes, { status: "invalid" }];
63287
- }
63288
- const req$ = requestRes.value;
63289
- const doResult = await client$._do(req$, {
63290
- context,
63291
- errorCodes: [],
63292
- retryConfig: context.retryConfig,
63293
- retryCodes: context.retryCodes
63294
- });
63295
- if (!doResult.ok) {
63296
- return [doResult, { status: "request-error", request: req$ }];
63297
- }
63298
- return [doResult, {
63299
- status: "complete",
63300
- request: req$,
63301
- response: doResult.value
63302
- }];
63303
- }
63304
- var init_workspaceCurrent = __esm(() => {
63305
- init_encodings();
63306
- init_primitives();
63307
- init_schemas4();
63308
- init_security();
63309
- init_url();
63310
- init_getcurrentworkspaceorganizationscurrentgetop();
63311
- init_async();
63312
- });
63313
-
63314
- // src/mcp-server/tools/workspaceCurrent.ts
63315
- var args47, tool$workspaceCurrent;
63316
- var init_workspaceCurrent2 = __esm(() => {
63317
- init_workspaceCurrent();
63318
- init_getcurrentworkspaceorganizationscurrentgetop();
63319
- init_tools();
63320
- args47 = {
63321
- request: GetCurrentWorkspaceOrganizationsCurrentGetRequest$zodSchema.optional()
63322
- };
63323
- tool$workspaceCurrent = {
63324
- name: "get-current-workspace",
63325
- description: `Get the workspace the caller's API key belongs to, as its ID and
63326
- name. Put the ID at the front of a Calibrate web address to link
63327
- straight to something in that workspace, as in \`/<uuid>/tests\`.
63328
- Without it, a link opens whichever workspace the reader looked at
63329
- last. Requires a Calibrate API key (CALIBRATE_API_KEY).
63330
- `,
63331
- scopes: ["read"],
63332
- annotations: {
63333
- title: "Get the current workspace",
63334
- destructiveHint: false,
63335
- idempotentHint: true,
63336
- openWorldHint: true,
63337
- readOnlyHint: true
63338
- },
63339
63372
  args: args47,
63340
63373
  tool: async (client, args, ctx) => {
63341
- const [result] = await workspaceCurrent(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63374
+ const [result] = await tracesList(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63342
63375
  if (!result.ok) {
63343
63376
  return {
63344
63377
  content: [{ type: "text", text: result.error.message }],
@@ -63354,7 +63387,7 @@ last. Requires a Calibrate API key (CALIBRATE_API_KEY).
63354
63387
  function createMCPServer(deps) {
63355
63388
  const server = new McpServer({
63356
63389
  name: "CalibrateMcp",
63357
- version: "0.0.88"
63390
+ version: "0.0.90"
63358
63391
  });
63359
63392
  const getClient = deps.getSDK || (() => new CalibrateMcpCore({
63360
63393
  security: deps.security,
@@ -63417,7 +63450,7 @@ function createMCPServer(deps) {
63417
63450
  tool(tool$annotatorsCreate);
63418
63451
  tool(tool$annotatorsList);
63419
63452
  tool(tool$annotatorsUpdate);
63420
- tool(tool$workspaceCurrent);
63453
+ tool(tool$organizationsCurrent);
63421
63454
  tool(tool$tracesCreate);
63422
63455
  tool(tool$tracesList);
63423
63456
  if (deps.dynamic) {
@@ -63469,6 +63502,7 @@ var init_server2 = __esm(() => {
63469
63502
  init_evaluatorsCreateVersion2();
63470
63503
  init_evaluatorsGet2();
63471
63504
  init_evaluatorsList2();
63505
+ init_organizationsCurrent2();
63472
63506
  init_testsBulkCreate2();
63473
63507
  init_testsCreate2();
63474
63508
  init_testsGet2();
@@ -63476,7 +63510,6 @@ var init_server2 = __esm(() => {
63476
63510
  init_testsUpdate2();
63477
63511
  init_tracesCreate2();
63478
63512
  init_tracesList2();
63479
- init_workspaceCurrent2();
63480
63513
  });
63481
63514
 
63482
63515
  // src/tool-names.ts
@@ -64692,7 +64725,7 @@ http_headers = { "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
64692
64725
  <h1>Instructions</h1>
64693
64726
  <p>One-click installation for Claude Desktop users</p>
64694
64727
  <div class="instruction-item">
64695
- <a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.88/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
64728
+ <a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.90/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
64696
64729
  \uD83D\uDCE5 Download MCP Bundle
64697
64730
  </a>
64698
64731
  </div>
@@ -67646,7 +67679,7 @@ var routes = buildRouteMap({
67646
67679
  var app = buildApplication(routes, {
67647
67680
  name: "mcp",
67648
67681
  versionInfo: {
67649
- currentVersion: "0.0.88"
67682
+ currentVersion: "0.0.90"
67650
67683
  }
67651
67684
  });
67652
67685
  run(app, process3.argv.slice(2), buildContext(process3));
@@ -67654,5 +67687,5 @@ export {
67654
67687
  app
67655
67688
  };
67656
67689
 
67657
- //# debugId=39FFE1149BBB266D64756E2164756E21
67690
+ //# debugId=169669D5EAB65D4664756E2164756E21
67658
67691
  //# sourceMappingURL=mcp-server.js.map