@dalmia/calibrate-mcp 0.0.89 → 0.0.91

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 (40) hide show
  1. package/bin/mcp-server.js +49 -16
  2. package/bin/mcp-server.js.map +15 -15
  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/landing-page.js +1 -1
  8. package/esm/lib/config.d.ts +2 -2
  9. package/esm/lib/config.js +2 -2
  10. package/esm/mcp-server/mcp-server.js +1 -1
  11. package/esm/mcp-server/server.js +1 -1
  12. package/esm/models/listtracesendpointtracesgetop.js +3 -3
  13. package/esm/models/listtracesendpointtracesgetop.js.map +1 -1
  14. package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.d.ts +33 -0
  15. package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.d.ts.map +1 -1
  16. package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.js +22 -0
  17. package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.js.map +1 -1
  18. package/esm/models/tasksummaryannotationtaskstaskuuidsummarygetop.d.ts +32 -0
  19. package/esm/models/tasksummaryannotationtaskstaskuuidsummarygetop.d.ts.map +1 -1
  20. package/esm/models/tasksummaryannotationtaskstaskuuidsummarygetop.js +23 -0
  21. package/esm/models/tasksummaryannotationtaskstaskuuidsummarygetop.js.map +1 -1
  22. package/esm/models/tasksummaryresponse.js +1 -1
  23. package/esm/models/tasksummaryresponse.js.map +1 -1
  24. package/esm/models/tracelistresponse.js +1 -1
  25. package/esm/models/tracelistresponse.js.map +1 -1
  26. package/esm/models/tracesummary.js +1 -1
  27. package/esm/models/tracesummary.js.map +1 -1
  28. package/package.json +1 -1
  29. package/src/funcs/annotationTasksGetAgreement.ts +7 -1
  30. package/src/funcs/annotationTasksGetSummary.ts +3 -0
  31. package/src/landing-page.ts +1 -1
  32. package/src/lib/config.ts +2 -2
  33. package/src/mcp-server/mcp-server.ts +1 -1
  34. package/src/mcp-server/server.ts +1 -1
  35. package/src/models/listtracesendpointtracesgetop.ts +3 -3
  36. package/src/models/taskagreementannotationtaskstaskuuidagreementgetop.ts +52 -0
  37. package/src/models/tasksummaryannotationtaskstaskuuidsummarygetop.ts +51 -0
  38. package/src/models/tasksummaryresponse.ts +1 -1
  39. package/src/models/tracelistresponse.ts +1 -1
  40. package/src/models/tracesummary.ts +1 -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.89",
53311
+ sdkVersion: "0.0.91",
53302
53312
  genVersion: "2.915.1",
53303
- userAgent: "speakeasy-sdk/mcp-typescript 0.0.89 2.915.1 0.1.0 @dalmia/calibrate-mcp"
53313
+ userAgent: "speakeasy-sdk/mcp-typescript 0.0.91 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",
@@ -63155,7 +63188,7 @@ var init_tracesummary = __esm(() => {
63155
63188
  metadata_count: int().describe("Number of metadata entries stored with the trace"),
63156
63189
  output: TraceOutput$zodSchema.nullable().optional().describe("What the agent produced for this turn. Sent only with `include_content`"),
63157
63190
  response_preview: string2().nullable().optional().describe("The agent reply, truncated for display"),
63158
- results: array(TraceScoreResult$zodSchema).optional().describe("Results for each evaluator on the latest scoring run"),
63191
+ results: array(TraceScoreResult$zodSchema).optional().describe("Results on the latest scoring run from the evaluators linked to the agent"),
63159
63192
  tool_call_count: int().describe("Number of tool calls the agent issued for this turn"),
63160
63193
  tool_calls: array(TraceToolCall$zodSchema).describe("Tools the agent issued on this turn, with the arguments it passed"),
63161
63194
  tool_names: array(string2()).describe("Names of the tools the agent issued on this turn, in order"),
@@ -63174,7 +63207,7 @@ var init_tracelistresponse = __esm(() => {
63174
63207
  items: array(TraceSummary$zodSchema).describe("The page of results"),
63175
63208
  limit: int().nullable().optional().describe("The applied `limit` (null when unbounded)"),
63176
63209
  offset: int().default(0).describe("The applied `offset`"),
63177
- score_averages: array(TraceScoreAverage$zodSchema).nullable().optional().describe("One entry per evaluator that scored at least one matching trace, averaged over every matching trace rather than this page. Ask for it with `include_score_averages`"),
63210
+ score_averages: array(TraceScoreAverage$zodSchema).nullable().optional().describe("One average for each evaluator linked to the agent that scored at least one trace matching the filters, covering all the matching traces it scored rather than this page. Ask for it with `include_score_averages`"),
63178
63211
  total: int().describe("Total number of items matching the query, before pagination")
63179
63212
  }).describe("The page, plus the averages when `include_score_averages` asked for them.");
63180
63213
  });
@@ -63196,8 +63229,8 @@ var init_listtracesendpointtracesgetop = __esm(() => {
63196
63229
  ListTracesEndpointTracesGetRequest$zodSchema = object({
63197
63230
  agent_id: string2().describe("Return only traces from this agent").nullable().optional(),
63198
63231
  conversation_id: string2().describe("Return only the turns of this conversation. Requires `agent_id`").nullable().optional(),
63199
- 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(),
63200
- 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(),
63201
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"),
63202
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"),
63203
63236
  labels: array(string2()).describe("Return only traces carrying at least one of these labels. Repeat the parameter for each label").nullable().optional(),
@@ -63206,7 +63239,7 @@ var init_listtracesendpointtracesgetop = __esm(() => {
63206
63239
  output_type: ListTracesEndpointTracesGetOutputType$zodSchema.nullable().optional().describe("Return only traces whose output is of this kind. `response` covers every trace carrying a reply, including one that also issued tool calls. `tool_call` covers traces that only issued tool calls"),
63207
63240
  q: string2().describe("Return only traces containing this text in their message ID, conversation ID, conversation history, output, or metadata").nullable().optional(),
63208
63241
  score: array(string2()).describe("Return only traces whose latest scoring run matches this condition. Each is written as `<evaluator ID>:<condition>`, where the condition is `passed`, `failed`, or one of `=`, `!=`, `<`, `<=`, `>`, `>=` followed by a number, such as `>=4`. Repeat the parameter to require every condition at once").nullable().optional(),
63209
- sort_by_evaluator: string2().describe("Order traces by this evaluator's score on each trace's latest scoring run. Traces it has not scored come last whichever direction you pick").nullable().optional(),
63242
+ sort_by_evaluator: string2().describe("Order traces by this evaluator's score on each trace's latest scoring run. Traces this evaluator has not scored come last whichever direction you pick, and an evaluator not linked to the agent counts as having scored none").nullable().optional(),
63210
63243
  sort_order: SortOrder$zodSchema.default("desc").describe("Whether `sort_by_evaluator` puts the highest scores first or the lowest. Ignored without it"),
63211
63244
  xAPIKey: string2().nullable().optional()
63212
63245
  });
@@ -63354,7 +63387,7 @@ and metadata.
63354
63387
  function createMCPServer(deps) {
63355
63388
  const server = new McpServer({
63356
63389
  name: "CalibrateMcp",
63357
- version: "0.0.89"
63390
+ version: "0.0.91"
63358
63391
  });
63359
63392
  const getClient = deps.getSDK || (() => new CalibrateMcpCore({
63360
63393
  security: deps.security,
@@ -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.89/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.91/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.89"
67682
+ currentVersion: "0.0.91"
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=5A80FFDF0EAFC95564756E2164756E21
67690
+ //# debugId=0AC59BD4C954B3B164756E2164756E21
67658
67691
  //# sourceMappingURL=mcp-server.js.map