@naturali/sdk 0.281.4 → 0.282.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1434,7 +1434,7 @@ var AgentVersions = class {
1434
1434
  *
1435
1435
  * When the release carries a `promotion_gate`, the newest `completed` run of the eval it names that was recorded against this agent (`agent_id`) and pinned to the canary version (`agent_version`) must give a claim verdict of `supported`: the run's verdict, made worse by the production and run-age rules its evidence declares. A newer run revokes an older one. Otherwise the call is a `409`, whose `meta` names that run's `eval_run_id`, `claim`, and the claim's `verdict` and `verdict_reasons` when there is one, and the rollout is left running untouched. The run that cleared the gate is recorded as `eval_run_id` on the version that goes live.
1436
1436
  *
1437
- * Every claim the stable version's run supports must be supported by the canary too, unless the release names its eval in `released_claims`. The stable side is judged by its run's verdict alone, so a claim it demonstrated stays required when its traffic stops or its run ages; the canary side by its claim's verdict, which adds the production rules and the run age its run recorded. Otherwise the call is a `409 PROMOTION_CLAIM_UNMET` whose `meta` names the `eval_id`, the stable version's `claim`, and the canary's `eval_run_id`, `verdict` and `verdict_reasons` (null when it has no run). The version that goes live records the claims the canary held (`GET /v1/projects/{project_id}/agents/{agent_id}/versions/{version}/promotion-claims`) and the release's `released_claims`.
1437
+ * Every claim the stable version's run supports must be supported by the canary too, unless the release names its eval in `released_claims`. The stable side is judged by its run's verdict alone, so a claim it demonstrated stays required when its traffic stops or its run ages; the canary side by its claim's verdict, which adds the production rules and the run age its run recorded. Otherwise the call is a `409 PROMOTION_CLAIM_UNMET` whose `meta` names the `eval_id`, the stable version's `claim`, and the canary's `eval_run_id`, `verdict` and `verdict_reasons` (null when it holds no claim of that eval: no run, or a run that carries no claim). The version that goes live records the claims the canary held (`GET /v1/projects/{project_id}/agents/{agent_id}/versions/{version}/promotion-claims`) and the release's `released_claims`.
1438
1438
  *
1439
1439
  */
1440
1440
  static promoteAgentRelease(options) {
@@ -3100,6 +3100,43 @@ var Evaluations = class {
3100
3100
  });
3101
3101
  }
3102
3102
  /**
3103
+ * Clear an eval result's label
3104
+ *
3105
+ * Removes the label from one result; a result with none is unchanged.
3106
+ */
3107
+ static clearEvalResultLabel(options) {
3108
+ return (options.client ?? client).delete({
3109
+ url: "/v1/projects/{project_id}/evals/{eval_id}/runs/{eval_run_id}/results/{eval_result_id}/label",
3110
+ ...options
3111
+ });
3112
+ }
3113
+ /**
3114
+ * Label an eval result
3115
+ *
3116
+ * Records a person's pass/fail verdict on one result, replacing any earlier label. The result's `passed` stays what its scorers said; the label is what each scorer's agreement is measured against (`GET /v1/projects/{project_id}/evals/{eval_id}/runs/{eval_run_id}/calibration`).
3117
+ */
3118
+ static labelEvalResult(options) {
3119
+ return (options.client ?? client).put({
3120
+ url: "/v1/projects/{project_id}/evals/{eval_id}/runs/{eval_run_id}/results/{eval_result_id}/label",
3121
+ ...options,
3122
+ headers: {
3123
+ "Content-Type": "application/json",
3124
+ ...options.headers
3125
+ }
3126
+ });
3127
+ }
3128
+ /**
3129
+ * Read an eval run's calibration
3130
+ *
3131
+ * How far each scorer of the run agrees with the results people labeled (`PUT /v1/projects/{project_id}/evals/{eval_id}/runs/{eval_run_id}/results/{eval_result_id}/label`), under the fingerprint of the scorers that graded it. Each disagreement is a result whose scorer outcome in `scores` differs from its `human_label`.
3132
+ */
3133
+ static getEvalRunCalibration(options) {
3134
+ return (options.client ?? client).get({
3135
+ url: "/v1/projects/{project_id}/evals/{eval_id}/runs/{eval_run_id}/calibration",
3136
+ ...options
3137
+ });
3138
+ }
3139
+ /**
3103
3140
  * Cancel an eval run
3104
3141
  *
3105
3142
  * Cancels a queued or running run: its outstanding item tasks are dropped so it stops consuming provider budget, and the run settles as `cancelled`.