bitfab-cli 0.2.400 → 0.2.401

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 (2) hide show
  1. package/dist/index.js +26 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23449,6 +23449,7 @@ var MAX_ASSIGNEE_EMAIL_LENGTH = 320;
23449
23449
  var GET_GRADER_LABELS_MAX_IDS = 100;
23450
23450
  var DEFAULT_GRADER_LABEL_LIMIT = 50;
23451
23451
  var MAX_GRADER_LABEL_LIMIT = 200;
23452
+ var SAVE_GRADER_LABELS_MAX_ENTRIES = 200;
23452
23453
  function parseJsonString(val) {
23453
23454
  if (typeof val !== "string") {
23454
23455
  return val;
@@ -23752,7 +23753,7 @@ var archiveTraceAssertions = {
23752
23753
  var saveGrader = {
23753
23754
  name: "save_grader",
23754
23755
  title: "Save Grader",
23755
- description: `Create or edit an automated grader (LLM-as-judge): a pass/fail check that describes what must hold for a traced function (e.g. 'The reply never invents order numbers'). Call when the user asks to add, define, update, rename, archive, or restore an automated grader or check for a traced function. To create, pass traceFunctionKey + name + evaluationFocus. To edit, pass graderId (from list_graders) plus only the fields to change; saving with the name of an existing grader on the same function updates that grader instead of creating a duplicate. Set status to "archived" to retire a grader; any later save that omits status (or sets "active") restores it. On edit, pass an empty string for passCriteria/failCriteria to clear them. After a successful create or update, present the returned grader definition to the user, including its evaluation focus and any pass/fail criteria; do not respond with only a generic success confirmation. Graders are definitions only for now: nothing auto-evaluates them on new traces yet, so do not promise live grading. Call list_graders first to find ids and avoid duplicates.`,
23756
+ description: `Create or edit a grader: a pass/fail check that describes what must hold for a traced function (e.g. 'The reply never invents order numbers'). Call when the user asks to add, define, update, rename, archive, or restore a grader or check for a traced function. By default the grader is an LLM-as-judge that Bitfab runs; pass external: true when the user evaluates traces themselves. To create, pass traceFunctionKey + name + evaluationFocus. To edit, pass graderId (from list_graders) plus only the fields to change; saving with the name of an existing grader on the same function updates that grader instead of creating a duplicate. Set status to "archived" to retire a grader; any later save that omits status (or sets "active") restores it. On edit, pass an empty string for passCriteria/failCriteria to clear them. After a successful create or update, present the returned grader definition to the user, including its evaluation focus and any pass/fail criteria; do not respond with only a generic success confirmation. Graders are definitions only for now: nothing auto-evaluates them on new traces yet, so do not promise live grading. Call list_graders first to find ids and avoid duplicates. An external grader is one the user runs themselves (their own eval harness, CI, a human review queue): Bitfab never runs it, and its verdicts are posted with save_grader_labels. A grader's external setting is fixed at creation and cannot be changed on edit, and external graders take no model.`,
23756
23757
  inputSchema: {
23757
23758
  graderId: external_exports.uuid().optional().describe("Id of an existing grader to edit (from list_graders or a previous save). Omit to create a new grader (or update-by-name)."),
23758
23759
  traceFunctionKey: external_exports.string().min(1).optional().describe("The traced function the grader applies to. Required when graderId is omitted; ignored when it is set."),
@@ -23765,13 +23766,14 @@ var saveGrader = {
23765
23766
  status: external_exports.enum(["active", "archived"]).optional().describe(`The grader's status: "active" (the default for a create or edit) or "archived" to retire it (hidden from list_graders by default). Omit on edit to keep it active / restore an archived grader.`),
23766
23767
  // Keep the enum in sync with bitfab-web's save_grader route schema
23767
23768
  // (GRADER_MODEL_SLUGS in graderModels.ts).
23768
- model: external_exports.enum(["gemini-2-5-flash", "sol", "terra", "opus-4-8", "gemini-3-1-pro"]).optional().describe("Optional: the judge model this grader runs on. One of: gemini-2-5-flash, sol, terra, opus-4-8, gemini-3-1-pro. Omit to keep the current value (defaults to gemini-2-5-flash).")
23769
+ model: external_exports.enum(["gemini-2-5-flash", "sol", "terra", "opus-4-8", "gemini-3-1-pro"]).optional().describe("Optional: the judge model this grader runs on. One of: gemini-2-5-flash, sol, terra, opus-4-8, gemini-3-1-pro. Omit to keep the current value (defaults to gemini-2-5-flash)."),
23770
+ external: external_exports.boolean().optional().describe("Create an external grader: Bitfab never runs it, and its verdicts arrive through save_grader_labels. Only honored when creating; on edit it must match the grader or be omitted.")
23769
23771
  }
23770
23772
  };
23771
23773
  var listGraders = {
23772
23774
  name: "list_graders",
23773
23775
  title: "List Graders",
23774
- description: "List the automated graders (LLM-as-judge definitions) for a traced function, with id, name, status, and each one's evaluation focus and pass/fail criteria. Call before save_grader to find the grader to edit or to avoid creating a duplicate. Results are newest-first and paginated. Archived graders are hidden unless includeArchived is true.",
23776
+ description: "List the graders for a traced function: LLM-as-judge graders Bitfab runs, and external graders (marked 'Runs: externally') whose verdicts the user posts with save_grader_labels. Each comes with id, name, status, evaluation focus, and pass/fail criteria. Call before save_grader to find the grader to edit or to avoid creating a duplicate. Results are newest-first and paginated. Archived graders are hidden unless includeArchived is true.",
23775
23777
  inputSchema: {
23776
23778
  traceFunctionKey: external_exports.string().min(1).describe("The trace function key to list graders for"),
23777
23779
  includeArchived: external_exports.preprocess(parseJsonString, external_exports.boolean()).optional().describe("Include archived graders (default false)"),
@@ -23992,13 +23994,28 @@ var getExperiment = {
23992
23994
  var getGraderLabels = {
23993
23995
  name: "get_grader_labels",
23994
23996
  title: "Get Grader Labels",
23995
- description: `Read the INDIVIDUAL verdicts each automated grader (LLM-as-judge) recorded, one row per grader per trace, with the grader's reason, its failure diagnostic, the confidence, and whether the verdict came from a human or from a grader run. This is the per-grader breakdown that get_trace_labels does not show: that tool returns one grader-agnostic verdict per trace, so use it for a dataset's overall pass/fail and use this one to see WHICH check failed and why. Pass traceIds to see every grader's verdict on those traces, graderId to see that grader's most recent verdicts across traces (newest first, use it to diagnose a grader that is misfiring), or both to narrow to one grader on specific traces. Call list_graders first if you need grader ids.`,
23997
+ description: `Read the INDIVIDUAL verdicts each grader recorded, one row per grader per trace, with the grader's reason, its failure diagnostic, the confidence, and whether the verdict came from a human, a grader Bitfab ran, or an external grader whose verdict was posted from outside Bitfab with save_grader_labels. This is the per-grader breakdown that get_trace_labels does not show: that tool returns one grader-agnostic verdict per trace, so use it for a dataset's overall pass/fail and use this one to see WHICH check failed and why. Pass traceIds to see every grader's verdict on those traces, graderId to see that grader's most recent verdicts across traces (newest first, use it to diagnose a grader that is misfiring), or both to narrow to one grader on specific traces. Call list_graders first if you need grader ids.`,
23996
23998
  inputSchema: {
23997
23999
  traceIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1).max(GET_GRADER_LABELS_MAX_IDS)).optional().describe(`Trace IDs to read grader verdicts for (1-${GET_GRADER_LABELS_MAX_IDS}). Omit to read by grader instead.`),
23998
24000
  graderId: external_exports.uuid().optional().describe("Restrict to one grader (from list_graders). On its own, returns that grader's most recent verdicts across all traces."),
23999
24001
  limit: external_exports.preprocess(parseJsonString, external_exports.number().int().min(1).max(MAX_GRADER_LABEL_LIMIT)).optional().describe(`Max labels to return when reading by grader alone (default ${DEFAULT_GRADER_LABEL_LIMIT}, max ${MAX_GRADER_LABEL_LIMIT}). Ignored when traceIds is given.`)
24000
24002
  }
24001
24003
  };
24004
+ var saveGraderLabels = {
24005
+ name: "save_grader_labels",
24006
+ title: "Save Grader Labels",
24007
+ description: `Record verdicts for EXTERNAL graders: graders created with save_grader external: true, which Bitfab never runs because the user evaluates traces somewhere else (their own eval harness, CI, a review queue). Each entry is one grader's pass/fail on one trace, written as that grader's own verdict, so it shows up everywhere Bitfab-run grader verdicts do: get_grader_labels, dataset and experiment pass rates, and the trace's grader panel. Saving again for the same grader and trace replaces the earlier verdict. Rejects every grader that is not external: Bitfab runs its own graders, and a human's verdict on a trace belongs in save_human_labels. Up to ${SAVE_GRADER_LABELS_MAX_ENTRIES} entries per call; the whole call is rejected if any entry is invalid.`,
24008
+ inputSchema: {
24009
+ labels: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.object({
24010
+ graderId: external_exports.uuid().describe("The external grader that produced this verdict (from list_graders or save_grader)."),
24011
+ traceId: external_exports.uuid().describe("The trace the verdict is about."),
24012
+ label: external_exports.boolean().describe("true for PASS, false for FAIL. Required."),
24013
+ reason: external_exports.string().min(1).optional().describe("Why the grader reached this verdict. Optional."),
24014
+ failureDiagnostic: external_exports.string().min(1).optional().describe("For a FAIL: what went wrong in the trace, in a form someone fixing it can act on. Optional."),
24015
+ confidence: external_exports.enum(["VeryLow", "Low", "Medium", "High", "VeryHigh"]).optional().describe("How confident the grader is: VeryLow / Low / Medium / High / VeryHigh. Optional.")
24016
+ })).min(1).max(SAVE_GRADER_LABELS_MAX_ENTRIES)).describe(`One entry per grader per trace (1-${SAVE_GRADER_LABELS_MAX_ENTRIES}).`)
24017
+ }
24018
+ };
24002
24019
  var getSimPlan = {
24003
24020
  name: "get_sim_plan",
24004
24021
  title: "Get Sim Plan",
@@ -24022,6 +24039,7 @@ var saveSimPlan = {
24022
24039
  };
24023
24040
  var ALL_TOOL_CONTRACTS = [
24024
24041
  getGraderLabels,
24042
+ saveGraderLabels,
24025
24043
  getExperiment,
24026
24044
  getExperimentGroup,
24027
24045
  saveExperiment,
@@ -24679,10 +24697,10 @@ var semver3 = __toESM(require_semver2(), 1);
24679
24697
 
24680
24698
  // ../bitfab-plugin-lib/dist/bakedSdkVersions.js
24681
24699
  var BAKED_SDK_VERSIONS = {
24682
- typescript: "0.62.2",
24683
- python: "0.62.1",
24684
- ruby: "0.62.1",
24685
- go: "0.62.1"
24700
+ typescript: "0.62.3",
24701
+ python: "0.62.2",
24702
+ ruby: "0.62.2",
24703
+ go: "0.62.2"
24686
24704
  };
24687
24705
 
24688
24706
  // ../bitfab-plugin-lib/dist/installedSdk.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitfab-cli",
3
- "version": "0.2.400",
3
+ "version": "0.2.401",
4
4
  "description": "Install and configure the Bitfab plugin in Claude Code, Codex, or Cursor, or the Bitfab skill pack in Amp (Alpha).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",