@dalmia/calibrate-mcp 0.0.85 → 0.0.86

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 (65) hide show
  1. package/bin/mcp-server.js +124 -31
  2. package/bin/mcp-server.js.map +19 -14
  3. package/esm/funcs/annotationTasksGetAgreement.js +1 -6
  4. package/esm/funcs/annotationTasksGetAgreement.js.map +1 -1
  5. package/esm/landing-page.js +1 -1
  6. package/esm/lib/config.d.ts +2 -2
  7. package/esm/lib/config.js +2 -2
  8. package/esm/mcp-server/mcp-server.js +1 -1
  9. package/esm/mcp-server/server.js +1 -1
  10. package/esm/mcp-server/tools/annotationTasksGetAgreement.js +1 -1
  11. package/esm/models/annotatorresponse.d.ts +2 -0
  12. package/esm/models/annotatorresponse.d.ts.map +1 -1
  13. package/esm/models/annotatorresponse.js +3 -0
  14. package/esm/models/annotatorresponse.js.map +1 -1
  15. package/esm/models/answersummary.d.ts +8 -0
  16. package/esm/models/answersummary.d.ts.map +1 -0
  17. package/esm/models/answersummary.js +10 -0
  18. package/esm/models/answersummary.js.map +1 -0
  19. package/esm/models/evaluatoragreement.d.ts +41 -0
  20. package/esm/models/evaluatoragreement.d.ts.map +1 -0
  21. package/esm/models/evaluatoragreement.js +42 -0
  22. package/esm/models/evaluatoragreement.js.map +1 -0
  23. package/esm/models/evaluatorswithhumansblock.d.ts +7 -0
  24. package/esm/models/evaluatorswithhumansblock.d.ts.map +1 -0
  25. package/esm/models/evaluatorswithhumansblock.js +9 -0
  26. package/esm/models/evaluatorswithhumansblock.js.map +1 -0
  27. package/esm/models/humanagreementblock.d.ts +0 -3
  28. package/esm/models/humanagreementblock.d.ts.map +1 -1
  29. package/esm/models/humanagreementblock.js +0 -2
  30. package/esm/models/humanagreementblock.js.map +1 -1
  31. package/esm/models/interannotatoragreement.d.ts +34 -0
  32. package/esm/models/interannotatoragreement.d.ts.map +1 -0
  33. package/esm/models/interannotatoragreement.js +34 -0
  34. package/esm/models/interannotatoragreement.js.map +1 -0
  35. package/esm/models/kappaofanswerkind.d.ts +60 -0
  36. package/esm/models/kappaofanswerkind.d.ts.map +1 -0
  37. package/esm/models/kappaofanswerkind.js +52 -0
  38. package/esm/models/kappaofanswerkind.js.map +1 -0
  39. package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.d.ts +0 -20
  40. package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.d.ts.map +1 -1
  41. package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.js +0 -15
  42. package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.js.map +1 -1
  43. package/esm/models/taskagreementresponse.d.ts +4 -5
  44. package/esm/models/taskagreementresponse.d.ts.map +1 -1
  45. package/esm/models/taskagreementresponse.js +6 -6
  46. package/esm/models/taskagreementresponse.js.map +1 -1
  47. package/esm/tool-names.js +1 -1
  48. package/esm/tool-names.js.map +1 -1
  49. package/package.json +1 -1
  50. package/src/funcs/annotationTasksGetAgreement.ts +1 -6
  51. package/src/landing-page.ts +1 -1
  52. package/src/lib/config.ts +2 -2
  53. package/src/mcp-server/mcp-server.ts +1 -1
  54. package/src/mcp-server/server.ts +1 -1
  55. package/src/mcp-server/tools/annotationTasksGetAgreement.ts +1 -1
  56. package/src/models/annotatorresponse.ts +9 -0
  57. package/src/models/answersummary.ts +19 -0
  58. package/src/models/evaluatoragreement.ts +85 -0
  59. package/src/models/evaluatorswithhumansblock.ts +21 -0
  60. package/src/models/humanagreementblock.ts +0 -5
  61. package/src/models/interannotatoragreement.ts +69 -0
  62. package/src/models/kappaofanswerkind.ts +101 -0
  63. package/src/models/taskagreementannotationtaskstaskuuidagreementgetop.ts +0 -28
  64. package/src/models/taskagreementresponse.ts +14 -9
  65. package/src/tool-names.ts +1 -1
package/bin/mcp-server.js CHANGED
@@ -53279,9 +53279,9 @@ var init_config = __esm(() => {
53279
53279
  SDK_METADATA = {
53280
53280
  language: "typescript",
53281
53281
  openapiDocVersion: "0.1.0",
53282
- sdkVersion: "0.0.85",
53282
+ sdkVersion: "0.0.86",
53283
53283
  genVersion: "2.915.1",
53284
- userAgent: "speakeasy-sdk/mcp-typescript 0.0.85 2.915.1 0.1.0 @dalmia/calibrate-mcp"
53284
+ userAgent: "speakeasy-sdk/mcp-typescript 0.0.86 2.915.1 0.1.0 @dalmia/calibrate-mcp"
53285
53285
  };
53286
53286
  });
53287
53287
 
@@ -58958,6 +58958,82 @@ var init_annotationTasksGet2 = __esm(() => {
58958
58958
  };
58959
58959
  });
58960
58960
 
58961
+ // src/models/answersummary.ts
58962
+ var AnswerSummary$zodSchema;
58963
+ var init_answersummary = __esm(() => {
58964
+ init_zod();
58965
+ AnswerSummary$zodSchema = object({
58966
+ count: int().describe("How many answers there are"),
58967
+ mean: number2().nullable().describe("Mean of the rating answers"),
58968
+ true_count: int().nullable().describe("How many pass/fail answers are a pass")
58969
+ });
58970
+ });
58971
+
58972
+ // src/models/interannotatoragreement.ts
58973
+ var InterAnnotatorAgreementKappaType$zodSchema, InterAnnotatorAgreementKappaBlankReason$zodSchema, InterAnnotatorAgreement$zodSchema;
58974
+ var init_interannotatoragreement = __esm(() => {
58975
+ init_zod();
58976
+ InterAnnotatorAgreementKappaType$zodSchema = _enum([
58977
+ "fleiss",
58978
+ "linear_weighted_fleiss",
58979
+ "cohen",
58980
+ "linear_weighted_cohen"
58981
+ ]);
58982
+ InterAnnotatorAgreementKappaBlankReason$zodSchema = _enum([
58983
+ "too_few_items",
58984
+ "everyone_agreed"
58985
+ ]);
58986
+ InterAnnotatorAgreement$zodSchema = object({
58987
+ chance_agreement: number2().nullable().describe("Agreement expected by chance alone, which `kappa` corrects for, on the same scale as the agreement"),
58988
+ current: number2().nullable().describe("Current mean pairwise agreement among annotators on this evaluator"),
58989
+ kappa: number2().nullable().describe("Agreement corrected for the agreement expected by chance, where 1 is perfect agreement, 0 is chance level, and below 0 is worse than chance"),
58990
+ kappa_blank_reason: InterAnnotatorAgreementKappaBlankReason$zodSchema.nullable().describe("Why `kappa` is blank when answers were compared:\n\n- `too_few_items`: every evaluator compared these answers on only one item, and one item cannot show the agreement expected by chance\n- `everyone_agreed`: every compared answer is the same, so agreement cannot be told apart from chance\n"),
58991
+ kappa_type: InterAnnotatorAgreementKappaType$zodSchema.nullable().describe("The kind of kappa reported in `kappa`:\n\n- `fleiss`: Fleiss' kappa between three or more annotators\n- `linear_weighted_fleiss`: Fleiss' kappa between three or more annotators, giving partial credit to close ratings\n- `cohen`: Cohen's kappa between exactly two annotators, between a judge and the annotators, or between one annotator and the others\n- `linear_weighted_cohen`: Cohen's kappa between exactly two annotators, between a judge and the annotators, or between one annotator and the others, giving partial credit to close ratings\n"),
58992
+ pair_count: int().describe("How many annotator pairs the current value averages over")
58993
+ });
58994
+ });
58995
+
58996
+ // src/models/evaluatoragreement.ts
58997
+ var EvaluatorAgreementKappaType$zodSchema, EvaluatorAgreementKappaBlankReason$zodSchema, EvaluatorAgreement$zodSchema;
58998
+ var init_evaluatoragreement = __esm(() => {
58999
+ init_zod();
59000
+ init_answersummary();
59001
+ init_interannotatoragreement();
59002
+ EvaluatorAgreementKappaType$zodSchema = _enum([
59003
+ "fleiss",
59004
+ "linear_weighted_fleiss",
59005
+ "cohen",
59006
+ "linear_weighted_cohen"
59007
+ ]);
59008
+ EvaluatorAgreementKappaBlankReason$zodSchema = _enum([
59009
+ "too_few_items",
59010
+ "everyone_agreed"
59011
+ ]);
59012
+ EvaluatorAgreement$zodSchema = object({
59013
+ chance_agreement: number2().nullable().describe("Agreement expected by chance alone, which `kappa` corrects for, on the same scale as the agreement"),
59014
+ current: number2().nullable().describe("Current mean agreement between this evaluator's judge and the annotators"),
59015
+ evaluator_id: string2().describe("ID of the evaluator"),
59016
+ human_result: AnswerSummary$zodSchema.nullable().describe("The annotators' answers for this evaluator"),
59017
+ inter_annotator: InterAnnotatorAgreement$zodSchema,
59018
+ kappa: number2().nullable().describe("Agreement corrected for the agreement expected by chance, where 1 is perfect agreement, 0 is chance level, and below 0 is worse than chance"),
59019
+ kappa_blank_reason: EvaluatorAgreementKappaBlankReason$zodSchema.nullable().describe("Why `kappa` is blank when answers were compared:\n\n- `too_few_items`: every evaluator compared these answers on only one item, and one item cannot show the agreement expected by chance\n- `everyone_agreed`: every compared answer is the same, so agreement cannot be told apart from chance\n"),
59020
+ kappa_type: EvaluatorAgreementKappaType$zodSchema.nullable().describe("The kind of kappa reported in `kappa`:\n\n- `fleiss`: Fleiss' kappa between three or more annotators\n- `linear_weighted_fleiss`: Fleiss' kappa between three or more annotators, giving partial credit to close ratings\n- `cohen`: Cohen's kappa between exactly two annotators, between a judge and the annotators, or between one annotator and the others\n- `linear_weighted_cohen`: Cohen's kappa between exactly two annotators, between a judge and the annotators, or between one annotator and the others, giving partial credit to close ratings\n"),
59021
+ name: string2().nullable().describe("Name of the evaluator"),
59022
+ pair_count: int().describe("How many judge and annotator pairs the current value averages over"),
59023
+ result: AnswerSummary$zodSchema
59024
+ });
59025
+ });
59026
+
59027
+ // src/models/evaluatorswithhumansblock.ts
59028
+ var EvaluatorsWithHumansBlock$zodSchema;
59029
+ var init_evaluatorswithhumansblock = __esm(() => {
59030
+ init_zod();
59031
+ EvaluatorsWithHumansBlock$zodSchema = object({
59032
+ current: number2().nullable().describe("Current mean agreement between the evaluators and the annotators, weighted by how many pairs each evaluator compared"),
59033
+ pair_count: int().describe("How many evaluator and annotator pairs the current value averages over")
59034
+ });
59035
+ });
59036
+
58961
59037
  // src/models/humanagreementblock.ts
58962
59038
  var HumanAgreementBlock$zodSchema, HumanAgreementBlock$zodSchemaOutbound;
58963
59039
  var init_humanagreementblock = __esm(() => {
@@ -58965,14 +59041,12 @@ var init_humanagreementblock = __esm(() => {
58965
59041
  init_schemas4();
58966
59042
  HumanAgreementBlock$zodSchema = collectExtraKeys(object({
58967
59043
  current: number2().nullable().describe("Current mean pairwise agreement among annotators"),
58968
- pair_count: int().describe("How many annotator pairs the current value averages over"),
58969
- series: array(record(string2(), any())).describe("Agreement over time, one point per time bucket")
59044
+ pair_count: int().describe("How many annotator pairs the current value averages over")
58970
59045
  }).catchall(any()), "AdditionalProperties", true);
58971
59046
  HumanAgreementBlock$zodSchemaOutbound = object({
58972
59047
  AdditionalProperties: record(string2(), any()).optional(),
58973
59048
  current: nullable(number2()),
58974
- pair_count: int(),
58975
- series: array(record(string2(), any()))
59049
+ pair_count: int()
58976
59050
  }).transform((v) => {
58977
59051
  const { AdditionalProperties, ...rest } = v;
58978
59052
  return {
@@ -58987,19 +59061,19 @@ var TaskAgreementResponse$zodSchema, TaskAgreementResponse$zodSchemaOutbound;
58987
59061
  var init_taskagreementresponse = __esm(() => {
58988
59062
  init_zod();
58989
59063
  init_schemas4();
59064
+ init_evaluatoragreement();
59065
+ init_evaluatorswithhumansblock();
58990
59066
  init_humanagreementblock();
58991
59067
  TaskAgreementResponse$zodSchema = collectExtraKeys(object({
58992
- bucket: string2().describe("Time bucket used for the trend series"),
58993
- days: int().describe("Length of the trailing window in days"),
58994
- evaluators: array(record(string2(), any())).describe("Agreement between each evaluator and the annotators, plus that evaluator's own results and the human results, one entry per linked evaluator"),
59068
+ evaluators: array(EvaluatorAgreement$zodSchema).describe("Agreement between each evaluator and the annotators, plus that evaluator's own results and the human results, one entry per linked evaluator"),
59069
+ evaluators_with_humans: EvaluatorsWithHumansBlock$zodSchema,
58995
59070
  human_human: HumanAgreementBlock$zodSchema,
58996
59071
  task_id: string2().describe("ID of the task")
58997
59072
  }).catchall(any()), "AdditionalProperties", true);
58998
59073
  TaskAgreementResponse$zodSchemaOutbound = object({
58999
59074
  AdditionalProperties: record(string2(), any()).optional(),
59000
- bucket: string2(),
59001
- days: int(),
59002
- evaluators: array(record(string2(), any())),
59075
+ evaluators: array(EvaluatorAgreement$zodSchema),
59076
+ evaluators_with_humans: EvaluatorsWithHumansBlock$zodSchema,
59003
59077
  human_human: HumanAgreementBlock$zodSchemaOutbound,
59004
59078
  task_id: string2()
59005
59079
  }).transform((v) => {
@@ -59012,19 +59086,12 @@ var init_taskagreementresponse = __esm(() => {
59012
59086
  });
59013
59087
 
59014
59088
  // src/models/taskagreementannotationtaskstaskuuidagreementgetop.ts
59015
- var Bucket$zodSchema, TaskAgreementAnnotationTasksTaskUuidAgreementGetRequest$zodSchema, TaskAgreementAnnotationTasksTaskUuidAgreementGetResponse$zodSchema;
59089
+ var TaskAgreementAnnotationTasksTaskUuidAgreementGetRequest$zodSchema, TaskAgreementAnnotationTasksTaskUuidAgreementGetResponse$zodSchema;
59016
59090
  var init_taskagreementannotationtaskstaskuuidagreementgetop = __esm(() => {
59017
59091
  init_zod();
59018
59092
  init_httpvalidationerror();
59019
59093
  init_taskagreementresponse();
59020
- Bucket$zodSchema = _enum([
59021
- "week",
59022
- "month",
59023
- "year"
59024
- ]).describe("How to bucket points in the trend series");
59025
59094
  TaskAgreementAnnotationTasksTaskUuidAgreementGetRequest$zodSchema = object({
59026
- bucket: Bucket$zodSchema.default("week").describe("How to bucket points in the trend series"),
59027
- days: int().default(90).describe("Trailing window in days for the trend series"),
59028
59095
  task_uuid: string2().describe("Annotation task to act on"),
59029
59096
  xAPIKey: string2().nullable().optional()
59030
59097
  });
@@ -59052,10 +59119,6 @@ async function $do24(client$, request, options) {
59052
59119
  })
59053
59120
  };
59054
59121
  const path$ = pathToFunc("/annotation-tasks/{task_uuid}/agreement")(pathParams$);
59055
- const query$ = encodeFormQuery({
59056
- bucket: payload$.bucket,
59057
- days: payload$.days
59058
- });
59059
59122
  const headers$ = new Headers(compactMap({
59060
59123
  Accept: "application/json",
59061
59124
  "X-API-Key": encodeSimple("X-API-Key", payload$.xAPIKey, {
@@ -59087,7 +59150,6 @@ async function $do24(client$, request, options) {
59087
59150
  baseURL: options?.serverURL,
59088
59151
  path: path$,
59089
59152
  headers: headers$,
59090
- query: query$,
59091
59153
  body: body$,
59092
59154
  userAgent: client$._options.userAgent,
59093
59155
  timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
@@ -59132,7 +59194,7 @@ var init_annotationTasksGetAgreement2 = __esm(() => {
59132
59194
  };
59133
59195
  tool$annotationTasksGetAgreement = {
59134
59196
  name: "get-annotation-agreement",
59135
- description: `Get human-vs-human and human-vs-evaluator agreement metrics for a task, with a trend series.
59197
+ description: `Get human-vs-human and human-vs-evaluator agreement metrics for a task, with a chance-corrected kappa for each evaluator.
59136
59198
  `,
59137
59199
  scopes: ["read"],
59138
59200
  annotations: {
@@ -60175,14 +60237,45 @@ var init_annotatorsCreate2 = __esm(() => {
60175
60237
  };
60176
60238
  });
60177
60239
 
60240
+ // src/models/kappaofanswerkind.ts
60241
+ var KappaOfAnswerKindKappaType$zodSchema, KappaOfAnswerKindKappaBlankReason$zodSchema, AnswerKind$zodSchema, KappaOfAnswerKind$zodSchema;
60242
+ var init_kappaofanswerkind = __esm(() => {
60243
+ init_zod();
60244
+ KappaOfAnswerKindKappaType$zodSchema = _enum([
60245
+ "fleiss",
60246
+ "linear_weighted_fleiss",
60247
+ "cohen",
60248
+ "linear_weighted_cohen"
60249
+ ]);
60250
+ KappaOfAnswerKindKappaBlankReason$zodSchema = _enum([
60251
+ "too_few_items",
60252
+ "everyone_agreed"
60253
+ ]);
60254
+ AnswerKind$zodSchema = _enum([
60255
+ "binary",
60256
+ "rating"
60257
+ ]).describe("Which answers this entry covers:\n\n- `binary`: answers that either match or do not, such as pass or fail\n- `rating`: ratings on a scale\n");
60258
+ KappaOfAnswerKind$zodSchema = object({
60259
+ agreement: number2().nullable().describe("Mean agreement with the other annotators over the pairs `kappa` is worked out from, from 0 to 1. When `kappa_blank_reason` is `too_few_items`, over every compared pair of this kind"),
60260
+ answer_kind: AnswerKind$zodSchema.describe("Which answers this entry covers:\n\n- `binary`: answers that either match or do not, such as pass or fail\n- `rating`: ratings on a scale\n"),
60261
+ chance_agreement: number2().nullable().describe("Agreement expected by chance alone, which `kappa` corrects for, on the same scale as the agreement"),
60262
+ kappa: number2().nullable().describe("Agreement corrected for the agreement expected by chance, where 1 is perfect agreement, 0 is chance level, and below 0 is worse than chance"),
60263
+ kappa_blank_reason: KappaOfAnswerKindKappaBlankReason$zodSchema.nullable().describe("Why `kappa` is blank when answers were compared:\n\n- `too_few_items`: every evaluator compared these answers on only one item, and one item cannot show the agreement expected by chance\n- `everyone_agreed`: every compared answer is the same, so agreement cannot be told apart from chance\n"),
60264
+ kappa_type: KappaOfAnswerKindKappaType$zodSchema.nullable().describe("The kind of kappa reported in `kappa`:\n\n- `fleiss`: Fleiss' kappa between three or more annotators\n- `linear_weighted_fleiss`: Fleiss' kappa between three or more annotators, giving partial credit to close ratings\n- `cohen`: Cohen's kappa between exactly two annotators, between a judge and the annotators, or between one annotator and the others\n- `linear_weighted_cohen`: Cohen's kappa between exactly two annotators, between a judge and the annotators, or between one annotator and the others, giving partial credit to close ratings\n"),
60265
+ pair_count: int().describe("How many compared pairs `agreement` averages over")
60266
+ });
60267
+ });
60268
+
60178
60269
  // src/models/annotatorresponse.ts
60179
60270
  var AnnotatorResponse$zodSchema;
60180
60271
  var init_annotatorresponse = __esm(() => {
60181
60272
  init_zod();
60273
+ init_kappaofanswerkind();
60182
60274
  AnnotatorResponse$zodSchema = object({
60183
60275
  created_at: string2().describe("When the annotator was created (ISO 8601 UTC)"),
60184
60276
  current_agreement: number2().nullable().optional().describe("Latest pairwise mean agreement with other annotators, from 0 to 1"),
60185
60277
  jobs_count: int().nullable().optional().describe("Number of labelling jobs assigned to this annotator"),
60278
+ kappa_by_kind: array(KappaOfAnswerKind$zodSchema).nullable().optional().describe("Agreement with the other annotators and its kappa, one entry for each kind of answer compared, binary answers first. The kinds are never combined into one kappa"),
60186
60279
  name: string2().describe("Annotator name"),
60187
60280
  pair_count: int().nullable().optional().describe("Number of comparable annotation pairs behind the current agreement score"),
60188
60281
  updated_at: string2().describe("When the annotator was last updated (ISO 8601 UTC)"),
@@ -62954,7 +63047,7 @@ last. Requires a Calibrate API key (CALIBRATE_API_KEY).
62954
63047
  function createMCPServer(deps) {
62955
63048
  const server = new McpServer({
62956
63049
  name: "CalibrateMcp",
62957
- version: "0.0.85"
63050
+ version: "0.0.86"
62958
63051
  });
62959
63052
  const getClient = deps.getSDK || (() => new CalibrateMcpCore({
62960
63053
  security: deps.security,
@@ -63332,7 +63425,7 @@ must be in your workspace.
63332
63425
  },
63333
63426
  {
63334
63427
  name: "get-annotation-agreement",
63335
- description: `Get human-vs-human and human-vs-evaluator agreement metrics for a task, with a trend series.
63428
+ description: `Get human-vs-human and human-vs-evaluator agreement metrics for a task, with a chance-corrected kappa for each evaluator.
63336
63429
  `
63337
63430
  },
63338
63431
  {
@@ -64279,7 +64372,7 @@ http_headers = { "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
64279
64372
  <h1>Instructions</h1>
64280
64373
  <p>One-click installation for Claude Desktop users</p>
64281
64374
  <div class="instruction-item">
64282
- <a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.85/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
64375
+ <a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.86/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
64283
64376
  \uD83D\uDCE5 Download MCP Bundle
64284
64377
  </a>
64285
64378
  </div>
@@ -67233,7 +67326,7 @@ var routes = buildRouteMap({
67233
67326
  var app = buildApplication(routes, {
67234
67327
  name: "mcp",
67235
67328
  versionInfo: {
67236
- currentVersion: "0.0.85"
67329
+ currentVersion: "0.0.86"
67237
67330
  }
67238
67331
  });
67239
67332
  run(app, process3.argv.slice(2), buildContext(process3));
@@ -67241,5 +67334,5 @@ export {
67241
67334
  app
67242
67335
  };
67243
67336
 
67244
- //# debugId=A1741B450B8DD19464756E2164756E21
67337
+ //# debugId=F390FB93EA6317C264756E2164756E21
67245
67338
  //# sourceMappingURL=mcp-server.js.map