bitfab-cli 0.2.228 → 0.2.229

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 +70 -60
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -28006,8 +28006,8 @@ var dateOnlyStringSchema = external_exports.string().regex(DATE_PATTERN, "Must b
28006
28006
  const date5 = parseDateOnly(value);
28007
28007
  return date5.getFullYear() === year && date5.getMonth() === month - 1 && date5.getDate() === day;
28008
28008
  }, "Must be a valid calendar date");
28009
- var READ_TRACE_LABELS_MAX_IDS = 100;
28010
- var READ_GRADER_LABELS_MAX_IDS = 100;
28009
+ var GET_TRACE_LABELS_MAX_IDS = 100;
28010
+ var GET_GRADER_LABELS_MAX_IDS = 100;
28011
28011
  var DEFAULT_GRADER_LABEL_LIMIT = 50;
28012
28012
  var MAX_GRADER_LABEL_LIMIT = 200;
28013
28013
  function parseJsonString(val) {
@@ -28117,7 +28117,7 @@ var listTraceFunctions = {
28117
28117
  var searchTraces = {
28118
28118
  name: "search_traces",
28119
28119
  title: "Search Traces",
28120
- description: "Search and filter traces for a traced function. Returns matching traces with IDs, status, timestamps, total duration (ms), total token usage (in/out/cached/total), model, and output preview (all when available). Replay traces (from test runs) carry the same totals. Use read_traces for per-span duration, tokens, time-to-first-token, and model. Supports keyword search, date range, status filter, and regex matching. Use drillDown to refine previous results.",
28120
+ description: "Search and filter traces for a traced function. Returns matching traces with IDs, status, timestamps, total duration (ms), total token usage (in/out/cached/total), model, and output preview (all when available). Replay traces (from test runs) carry the same totals. Use get_traces for per-span duration, tokens, time-to-first-token, and model. Supports keyword search, date range, status filter, and regex matching. Use drillDown to refine previous results.",
28121
28121
  inputSchema: {
28122
28122
  traceFunctionKey: external_exports.string().describe("The trace function key to search"),
28123
28123
  searchQuery: external_exports.string().optional().describe("Full-text keyword search"),
@@ -28138,38 +28138,38 @@ var searchTraces = {
28138
28138
  hasDbSnapshot: external_exports.preprocess(parseJsonString, external_exports.boolean()).optional().describe("Filter by whether the trace captured a database snapshot reference. true returns only traces that can be replayed against a pinned historical DB branch (the 'Snapshot captured' traces); false returns only traces with no snapshot. Omit to include both.")
28139
28139
  }
28140
28140
  };
28141
- var readTraces = {
28142
- name: "read_traces",
28143
- title: "Read Traces",
28144
- description: 'Read one or more traces by ID. Includes inputs, outputs, status, environment tag, trace-level duration (ms), token usage (in/out/cached/total), and model (when available). Use these to compare latency and cost between a trace and its replay. Returns span details (input, output, reasoning, content, context, errors) plus per-span duration, tokens, time-to-first-token, and model when available. Use `scope: "summary"` when scanning many traces to keep the response small; `scope: "full"` when you need the complete untruncated detail of a few traces. To load only labels + annotations for many traces at once (no span content), use read_trace_labels instead.',
28141
+ var getTraces = {
28142
+ name: "get_traces",
28143
+ title: "Get Traces",
28144
+ description: 'Read one or more traces by ID. Includes inputs, outputs, status, environment tag, trace-level duration (ms), token usage (in/out/cached/total), and model (when available). Use these to compare latency and cost between a trace and its replay. Returns span details (input, output, reasoning, content, context, errors) plus per-span duration, tokens, time-to-first-token, and model when available. Use `scope: "summary"` when scanning many traces to keep the response small; `scope: "full"` when you need the complete untruncated detail of a few traces. To load only labels + annotations for many traces at once (no span content), use get_trace_labels instead.',
28145
28145
  inputSchema: {
28146
28146
  traceIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1).max(10)).describe("Trace IDs to read (1-10)"),
28147
28147
  scope: external_exports.enum(["summary", "full"]).optional().default("summary").describe('Level of span detail. "summary" (default) renders the same span structure as full but caps each span (its fields share a ~1500-char budget) and each trace-level field (~2000 chars), keeping the response small enough not to spill to disk: prefer it when scanning or identifying candidate traces. "full" renders every field untruncated up to 10k chars each, with no per-span ceiling, so reading several large traces can produce a big response: use it when you need complete detail on a handful of traces.')
28148
28148
  }
28149
28149
  };
28150
- var readTraceLabels = {
28151
- name: "read_trace_labels",
28152
- title: "Read Trace Labels",
28153
- description: `Read just the labels for one or more traces by ID: returns each trace's pass/fail verdict, its annotation (the reviewer's reasoning), and whether the label is human-validated (a human authored or approved it). No span content, inputs, or outputs are loaded, so the response is small and one call accepts up to ${READ_TRACE_LABELS_MAX_IDS} IDs. Use this to load a whole dataset's verdicts into context in a single call (e.g. when building or confirming a dataset). When you need a trace's actual inputs/outputs/spans, use read_traces instead.`,
28150
+ var getTraceLabels = {
28151
+ name: "get_trace_labels",
28152
+ title: "Get Trace Labels",
28153
+ description: `Read just the labels for one or more traces by ID: returns each trace's pass/fail verdict, its annotation (the reviewer's reasoning), and whether the label is human-validated (a human authored or approved it). No span content, inputs, or outputs are loaded, so the response is small and one call accepts up to ${GET_TRACE_LABELS_MAX_IDS} IDs. Use this to load a whole dataset's verdicts into context in a single call (e.g. when building or confirming a dataset). When you need a trace's actual inputs/outputs/spans, use get_traces instead.`,
28154
28154
  inputSchema: {
28155
- traceIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1).max(READ_TRACE_LABELS_MAX_IDS)).describe(`Trace IDs to read labels for (1-${READ_TRACE_LABELS_MAX_IDS})`)
28155
+ traceIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1).max(GET_TRACE_LABELS_MAX_IDS)).describe(`Trace IDs to read labels for (1-${GET_TRACE_LABELS_MAX_IDS})`)
28156
28156
  }
28157
28157
  };
28158
- var readSpanField = {
28159
- name: "read_span_field",
28160
- title: "Read Span Field",
28161
- description: "Fetch the COMPLETE, untruncated value of a single span field. read_traces truncates large span fields and prints a note telling you to call this when you need the full text. Pass the traceId, the spanId (the `[ID: ...]` shown for that span in read_traces output), and the field to retrieve. Returns up to 100k chars by default; pass a higher maxChars to read more of an extremely large field. Prefer this over re-reading the whole trace when you only need one large field in full.",
28158
+ var getSpanField = {
28159
+ name: "get_span_field",
28160
+ title: "Get Span Field",
28161
+ description: "Fetch the COMPLETE, untruncated value of a single span field. get_traces truncates large span fields and prints a note telling you to call this when you need the full text. Pass the traceId, the spanId (the `[ID: ...]` shown for that span in get_traces output), and the field to retrieve. Returns up to 100k chars by default; pass a higher maxChars to read more of an extremely large field. Prefer this over re-reading the whole trace when you only need one large field in full.",
28162
28162
  inputSchema: {
28163
28163
  traceId: external_exports.uuid().describe("The trace ID the span belongs to"),
28164
- spanId: external_exports.uuid().describe("The span ID to read, taken from the `[ID: ...]` shown for the span in read_traces output"),
28164
+ spanId: external_exports.uuid().describe("The span ID to read, taken from the `[ID: ...]` shown for the span in get_traces output"),
28165
28165
  field: external_exports.enum(["input", "output", "reasoning", "content", "errors", "contexts"]).describe("Which span field to return in full: input, output, reasoning, content, errors, or contexts"),
28166
28166
  maxChars: external_exports.preprocess(parseJsonString, external_exports.number().int().positive()).optional().describe("Maximum characters to return (default 100000). Raise it to read further into an extremely large field.")
28167
28167
  }
28168
28168
  };
28169
- var updateAgentLabels = {
28170
- name: "update_agent_labels",
28171
- title: "Update Agent Labels",
28172
- description: "Set, skip, or archive the agent's pass/fail verdict on one or more traces (`labelSource=\"agent\"`). Use this AFTER you have read the traces with read_traces and decided yourself whether each one looks like a pass, a fail, or genuinely cannot be judged. To set a verdict, pass `label` (true=PASS, false=FAIL) and `annotation` (your reasoning, shown to the human reviewer in the labeling UI). Optionally pass `confidence` (`VeryLow|Low|Medium|High|VeryHigh`) to record how confident you are - surfaced in the labeling UI so reviewers can prioritize low-confidence verdicts. To explicitly skip a trace you cannot decide on (instead of leaving it unlabeled), pass `skip: true` and omit label/annotation - this records an explicit skip so coverage checks know you intentionally did not verdict it. To clear a previously-set agent verdict (e.g., you changed your mind or labeled the wrong trace), pass `archive: true` and omit label/annotation. New verdicts start unapproved (`approvedAt=null`); once a human approves one, it joins the validated dataset (queryable via `search_traces` with `validated: true`). Archiving is non-destructive - the row is hidden from all reads but kept for audit, and you can immediately re-label the trace from scratch. For replay results, key each label by the replay item's `originalTraceId` (the original trace it was replayed from; `sourceTraceId` is accepted as a deprecated alias) plus the top-level `testRunId` instead of a `traceId`: the server resolves it to the replay trace via lineage, so you never need a server-generated replay trace id. Returns an agent-readable summary with one parseable effective label line per updated trace, keyed by the id you supplied (`originalTraceId` for replay verdicts, otherwise `traceId`), so command callers can verify persistence.",
28169
+ var saveAgentLabels = {
28170
+ name: "save_agent_labels",
28171
+ title: "Save Agent Labels",
28172
+ description: "Set, skip, or archive the agent's pass/fail verdict on one or more traces (`labelSource=\"agent\"`). Use this AFTER you have read the traces with get_traces and decided yourself whether each one looks like a pass, a fail, or genuinely cannot be judged. To set a verdict, pass `label` (true=PASS, false=FAIL) and `annotation` (your reasoning, shown to the human reviewer in the labeling UI). Optionally pass `confidence` (`VeryLow|Low|Medium|High|VeryHigh`) to record how confident you are - surfaced in the labeling UI so reviewers can prioritize low-confidence verdicts. To explicitly skip a trace you cannot decide on (instead of leaving it unlabeled), pass `skip: true` and omit label/annotation - this records an explicit skip so coverage checks know you intentionally did not verdict it. To clear a previously-set agent verdict (e.g., you changed your mind or labeled the wrong trace), pass `archive: true` and omit label/annotation. New verdicts start unapproved (`approvedAt=null`); once a human approves one, it joins the validated dataset (queryable via `search_traces` with `validated: true`). Archiving is non-destructive - the row is hidden from all reads but kept for audit, and you can immediately re-label the trace from scratch. For replay results, key each label by the replay item's `originalTraceId` (the original trace it was replayed from; `sourceTraceId` is accepted as a deprecated alias) plus the top-level `testRunId` instead of a `traceId`: the server resolves it to the replay trace via lineage, so you never need a server-generated replay trace id. Returns an agent-readable summary with one parseable effective label line per updated trace, keyed by the id you supplied (`originalTraceId` for replay verdicts, otherwise `traceId`), so command callers can verify persistence.",
28173
28173
  inputSchema: {
28174
28174
  testRunId: external_exports.uuid().optional().describe("The replay test run id. Required when any label targets a trace by originalTraceId (replay verdicts); ignored otherwise."),
28175
28175
  labels: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.object({
@@ -28184,10 +28184,10 @@ var updateAgentLabels = {
28184
28184
  })).min(1).max(50)).describe("One update per trace (1-50)")
28185
28185
  }
28186
28186
  };
28187
- var setHumanLabels = {
28188
- name: "set_human_labels",
28189
- title: "Set Human Labels",
28190
- description: 'Record one or more human-authored pass/fail verdicts that are VALIDATED immediately (`labelSource="human"`, no approval step). Unlike update_agent_labels (which writes agent suggestions that start unapproved), labels set here join the validated dataset the instant they are written and satisfy `search_traces` with `validated: true`. Pass `label` (true=PASS, false=FAIL), `annotation` (the reasoning behind the verdict), and optionally `confidence` (`VeryLow|Low|Medium|High|VeryHigh`). USE ONLY when a human has explicitly decided the verdict, for example saving a known production bug as a test case. Do NOT use this for the agent\'s own first-pass guesses on traces awaiting human review; use update_agent_labels for those so they go through the normal approve/edit loop.',
28187
+ var saveHumanLabels = {
28188
+ name: "save_human_labels",
28189
+ title: "Save Human Labels",
28190
+ description: 'Record one or more human-authored pass/fail verdicts that are VALIDATED immediately (`labelSource="human"`, no approval step). Unlike save_agent_labels (which writes agent suggestions that start unapproved), labels set here join the validated dataset the instant they are written and satisfy `search_traces` with `validated: true`. Pass `label` (true=PASS, false=FAIL), `annotation` (the reasoning behind the verdict), and optionally `confidence` (`VeryLow|Low|Medium|High|VeryHigh`). USE ONLY when a human has explicitly decided the verdict, for example saving a known production bug as a test case. Do NOT use this for the agent\'s own first-pass guesses on traces awaiting human review; use save_agent_labels for those so they go through the normal approve/edit loop.',
28191
28191
  inputSchema: {
28192
28192
  labels: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.object({
28193
28193
  traceId: external_exports.uuid().describe("The trace ID to label"),
@@ -28228,10 +28228,10 @@ var listGraders = {
28228
28228
  cursor: external_exports.string().min(1).optional().describe("Opaque cursor from the previous page; reuse the same filters")
28229
28229
  }
28230
28230
  };
28231
- var createDataset = {
28232
- name: "create_dataset",
28233
- title: "Create Dataset",
28234
- description: "Create a labeled dataset for a traced function. Datasets are named buckets of traces (e.g. 'Hallucination failures', 'Edge cases for grader X') that humans review and that experiments replay against. Pass traceFunctionKey, a short human-readable name, and an optional description. Returns the new dataset id; use it with add_traces_to_dataset to populate.",
28231
+ var saveDataset = {
28232
+ name: "save_dataset",
28233
+ title: "Save Dataset",
28234
+ description: "Create or edit a labeled dataset for a traced function. Datasets are named buckets of traces (e.g. 'Hallucination failures', 'Edge cases for grader X') that humans review and that experiments replay against. Pass traceFunctionKey, a short human-readable name, and an optional description. Saving with the name of an existing dataset on the same trace function updates that dataset instead of creating a duplicate, so re-running a flow is safe; pass a new description to change it, or omit it to leave the current one. Returns the dataset id; use it with add_traces_to_dataset to populate. Call list_datasets first when you need to see what already exists.",
28235
28235
  inputSchema: {
28236
28236
  traceFunctionKey: external_exports.string().min(1).describe("The trace function key the dataset is scoped to (must match traces you'll add)"),
28237
28237
  name: external_exports.string().min(1).describe("Short human-readable name shown in the labeling UI (e.g. 'Hallucination failures')"),
@@ -28241,7 +28241,7 @@ var createDataset = {
28241
28241
  var listDatasets = {
28242
28242
  name: "list_datasets",
28243
28243
  title: "List Datasets",
28244
- description: "List all datasets for a traced function, with id, name, description, current trace count, and assigned graders for each. Call this before changing trace or grader assignments to discover dataset ids and current membership, or before create_dataset to avoid duplicates.",
28244
+ description: "List all datasets for a traced function, with id, name, description, current trace count, and assigned graders for each. Call this before changing trace or grader assignments to discover dataset ids and current membership, or before save_dataset to avoid duplicates.",
28245
28245
  inputSchema: {
28246
28246
  traceFunctionKey: external_exports.string().min(1).describe("The trace function key to list datasets for")
28247
28247
  }
@@ -28251,7 +28251,7 @@ var addTracesToDataset = {
28251
28251
  title: "Add Traces to Dataset",
28252
28252
  description: "Add one or more traces to a dataset. Idempotent: re-adding a trace already in the dataset is a no-op. Traces are validated against the dataset's traceFunctionKey; ids that don't belong to this organization, or to the dataset's trace function, are silently skipped (the response reports how many were added vs skipped).",
28253
28253
  inputSchema: {
28254
- datasetId: external_exports.uuid().describe("The dataset id (from create_dataset or list_datasets)"),
28254
+ datasetId: external_exports.uuid().describe("The dataset id (from save_dataset or list_datasets)"),
28255
28255
  traceIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1).max(100)).describe("Trace ids to add (1-100)")
28256
28256
  }
28257
28257
  };
@@ -28269,7 +28269,7 @@ var addGradersToDataset = {
28269
28269
  title: "Add Graders to Dataset",
28270
28270
  description: "Assign one or more graders to a dataset. Idempotent: assigning a grader that is already attached is a no-op. Graders must belong to this organization and match the dataset's traceFunctionKey; invalid ids are skipped and reported.",
28271
28271
  inputSchema: {
28272
- datasetId: external_exports.uuid().describe("The dataset id (from create_dataset or list_datasets)"),
28272
+ datasetId: external_exports.uuid().describe("The dataset id (from save_dataset or list_datasets)"),
28273
28273
  graderIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1).max(100)).describe("Grader ids to assign (1-100)")
28274
28274
  }
28275
28275
  };
@@ -28300,13 +28300,22 @@ var removeGradersFromExperiment = {
28300
28300
  graderIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1).max(100)).describe("Grader ids to detach (1-100)")
28301
28301
  }
28302
28302
  };
28303
- var addGraderToExperimentGroup = {
28304
- name: "add_grader_to_experiment_group",
28305
- title: "Add Grader to Experiment Group",
28306
- description: "Assign one grader to every experiment (test run) currently in an experiment group. The grader assignment is stored on each experiment, not on the group, so experiments added later do not inherit it automatically. Completed experiments immediately queue any missing grader evaluations; pending experiments use the grader when they complete. Idempotent when the grader is already assigned.",
28303
+ var addGradersToExperimentGroup = {
28304
+ name: "add_graders_to_experiment_group",
28305
+ title: "Add Graders to Experiment Group",
28306
+ description: "Assign one or more graders to every experiment (test run) currently in an experiment group. Grader assignments are stored on each experiment, not on the group, so experiments added later do not inherit them automatically. Completed experiments immediately queue any missing grader evaluations; pending experiments use the graders when they complete. Idempotent: assigning a grader already attached to an experiment is a no-op.",
28307
28307
  inputSchema: {
28308
28308
  experimentGroupId: external_exports.uuid().describe("The experiment group id"),
28309
- graderId: external_exports.uuid().describe("The grader id to assign")
28309
+ graderIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1).max(100)).describe("Grader ids to assign (1-100)")
28310
+ }
28311
+ };
28312
+ var removeGradersFromExperimentGroup = {
28313
+ name: "remove_graders_from_experiment_group",
28314
+ title: "Remove Graders from Experiment Group",
28315
+ description: "Detach one or more graders from every experiment (test run) currently in an experiment group, undoing add_graders_to_experiment_group. Grader ids not assigned to any experiment in the group are ignored and reported. The graders themselves are not deleted, and archived graders can still be detached. Because assignments live on each experiment rather than on the group, this only affects experiments currently in the group. Effect depends on run state, matching remove_graders_from_experiment: an in-progress experiment re-adds a detached grader from its dataset when it completes if the dataset still assigns it, while an already-completed experiment has a finalized grader set, so detaching permanently drops that grader from its results.",
28316
+ inputSchema: {
28317
+ experimentGroupId: external_exports.uuid().describe("The experiment group id"),
28318
+ graderIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1).max(100)).describe("Grader ids to detach (1-100)")
28310
28319
  }
28311
28320
  };
28312
28321
  var listExperiments = {
@@ -28318,9 +28327,9 @@ var listExperiments = {
28318
28327
  limit: external_exports.preprocess(parseJsonString, external_exports.number().int().min(1).max(50)).optional().describe("Max experiments to return (default 20, max 50)")
28319
28328
  }
28320
28329
  };
28321
- var getExperimentTraces = {
28322
- name: "get_experiment_traces",
28323
- title: "Get Experiment Traces",
28330
+ var listExperimentTraces = {
28331
+ name: "list_experiment_traces",
28332
+ title: "List Experiment Traces",
28324
28333
  description: "Get individual trace results for an experiment (test run), including each replay trace's verdict (fixed, regressed, still-passing, still-failing, unpaired) by comparing against the original trace's label, plus token usage (input, output, cached, total) for the replay and the paired original so you can reason about cost and cache-read deltas. Use after list_experiments to drill into a specific experiment's results.",
28325
28334
  inputSchema: {
28326
28335
  testRunId: external_exports.uuid().describe("The experiment (test run) ID to get traces for")
@@ -28337,21 +28346,21 @@ var getReplayStatus = {
28337
28346
  var getTemplateReference = {
28338
28347
  name: "get_template_reference",
28339
28348
  title: "Get Template Reference",
28340
- description: "Read the agent-facing reference for Bitfab span templates: the engine (Nunjucks), the render-context schema (variables bound at render time), the composition model (no `{% extends %}` - assembler injects into base.njk), the registered custom filters and tests, common patterns from the live default templates, and error behavior. **Call this once per session before your first `get_template` or `update_template`** - without it, edits typically use the wrong syntax dialect, the wrong variable names, or break the layout. Read-only, no organization data, safe to cache.",
28349
+ description: "Read the agent-facing reference for Bitfab span templates: the engine (Nunjucks), the render-context schema (variables bound at render time), the composition model (no `{% extends %}` - assembler injects into base.njk), the registered custom filters and tests, common patterns from the live default templates, and error behavior. **Call this once per session before your first `get_template` or `save_template`** - without it, edits typically use the wrong syntax dialect, the wrong variable names, or break the layout. Read-only, no organization data, safe to cache.",
28341
28350
  inputSchema: {}
28342
28351
  };
28343
28352
  var getTemplate = {
28344
28353
  name: "get_template",
28345
28354
  title: "Get Template",
28346
- description: "Read the rendering template for a span type. Templates control how a span's input/output renders in the Bitfab UI. **Pass `traceFunctionKey` to scope to a specific trace function** (this is the normal mode for the `templates` skill). Resolution: per-key row \u2192 org-global override \u2192 file default. The response labels the source so you know whether you're editing a per-key row, seeding from the org-global, or starting from the file default. Without `traceFunctionKey`, returns the org-global override. Span types: llm, agent, function, guardrail, handoff, custom. Always call this before update_template so your edit starts from the live content. **If you haven't called `get_template_reference` this session, call it first** - it documents the Nunjucks engine, available variables, and base-template composition model, which you'll need to write a correct edit.",
28355
+ description: "Read the rendering template for a span type. Templates control how a span's input/output renders in the Bitfab UI. **Pass `traceFunctionKey` to scope to a specific trace function** (this is the normal mode for the `templates` skill). Resolution: per-key row \u2192 org-global override \u2192 file default. The response labels the source so you know whether you're editing a per-key row, seeding from the org-global, or starting from the file default. Without `traceFunctionKey`, returns the org-global override. Span types: llm, agent, function, guardrail, handoff, custom. Always call this before save_template so your edit starts from the live content. **If you haven't called `get_template_reference` this session, call it first** - it documents the Nunjucks engine, available variables, and base-template composition model, which you'll need to write a correct edit.",
28347
28356
  inputSchema: {
28348
28357
  spanType: external_exports.enum(["llm", "agent", "function", "guardrail", "handoff", "custom"]).describe("Span type whose template to read (llm | agent | function | guardrail | handoff | custom)"),
28349
28358
  traceFunctionKey: external_exports.string().min(1).optional().describe("Trace function key to scope the template to. When set, returns the per-key row if present; otherwise seeds from the org-global override; otherwise the file default. Omit to read the org-global template.")
28350
28359
  }
28351
28360
  };
28352
- var updateTemplate = {
28353
- name: "update_template",
28354
- title: "Update Template",
28361
+ var saveTemplate = {
28362
+ name: "save_template",
28363
+ title: "Save Template",
28355
28364
  description: "Upsert the rendering template for a span type. **Pass `traceFunctionKey` to scope the override to a single trace function** (this is the normal mode for the `templates` skill); the per-key row is created on first save and applied at render time only for spans on traces of that function. Without `traceFunctionKey`, edits the org-global override (applies when no per-key row matches). Updates are in-place: no version bump, no row juggling. The `template` body is the full template source you want stored, passed verbatim - do NOT wrap in `<![CDATA[ ... ]]>`, triple-backtick code fences, or any other escape construct; the value is stored exactly as received and a stray wrapper will silently break rendering (e.g. an opening `<![CDATA[` swallows the next `<style>` tag). Optional `name` and `description` are metadata shown in the templates UI. Span types: llm, agent, function, guardrail, handoff, custom. Always call get_template first so you're editing the current content rather than overwriting unrelated changes. **If you haven't called `get_template_reference` this session, call it first** - edits that don't match the documented Nunjucks variable shape will silently render empty in production.",
28356
28365
  inputSchema: {
28357
28366
  spanType: external_exports.enum(["llm", "agent", "function", "guardrail", "handoff", "custom"]).describe("Span type whose template to upsert (llm | agent | function | guardrail | handoff | custom)"),
@@ -28415,18 +28424,18 @@ var getExperiment = {
28415
28424
  testRunId: external_exports.uuid().describe("The experiment (test run) id, from list_experiments")
28416
28425
  }
28417
28426
  };
28418
- var readGraderLabels = {
28419
- name: "read_grader_labels",
28420
- title: "Read Grader Labels",
28421
- 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 read_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.`,
28427
+ var getGraderLabels = {
28428
+ name: "get_grader_labels",
28429
+ title: "Get Grader Labels",
28430
+ 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.`,
28422
28431
  inputSchema: {
28423
- traceIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1).max(READ_GRADER_LABELS_MAX_IDS)).optional().describe(`Trace IDs to read grader verdicts for (1-${READ_GRADER_LABELS_MAX_IDS}). Omit to read by grader instead.`),
28432
+ 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.`),
28424
28433
  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."),
28425
28434
  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.`)
28426
28435
  }
28427
28436
  };
28428
28437
  var ALL_TOOL_CONTRACTS = [
28429
- readGraderLabels,
28438
+ getGraderLabels,
28430
28439
  getExperiment,
28431
28440
  saveExperimentGroup,
28432
28441
  getBitfabApiKey,
@@ -28435,14 +28444,14 @@ var ALL_TOOL_CONTRACTS = [
28435
28444
  getDatabaseConnectionStatus,
28436
28445
  listTraceFunctions,
28437
28446
  searchTraces,
28438
- readTraces,
28439
- readTraceLabels,
28440
- readSpanField,
28441
- updateAgentLabels,
28442
- setHumanLabels,
28447
+ getTraces,
28448
+ getTraceLabels,
28449
+ getSpanField,
28450
+ saveAgentLabels,
28451
+ saveHumanLabels,
28443
28452
  saveGrader,
28444
28453
  listGraders,
28445
- createDataset,
28454
+ saveDataset,
28446
28455
  listDatasets,
28447
28456
  addTracesToDataset,
28448
28457
  removeTracesFromDataset,
@@ -28450,13 +28459,14 @@ var ALL_TOOL_CONTRACTS = [
28450
28459
  removeGradersFromDataset,
28451
28460
  addGradersToExperiment,
28452
28461
  removeGradersFromExperiment,
28453
- addGraderToExperimentGroup,
28462
+ addGradersToExperimentGroup,
28463
+ removeGradersFromExperimentGroup,
28454
28464
  listExperiments,
28455
- getExperimentTraces,
28465
+ listExperimentTraces,
28456
28466
  getReplayStatus,
28457
28467
  getTemplateReference,
28458
28468
  getTemplate,
28459
- updateTemplate,
28469
+ saveTemplate,
28460
28470
  createTracePlan,
28461
28471
  confirmTracePlan,
28462
28472
  getTracePlan
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitfab-cli",
3
- "version": "0.2.228",
3
+ "version": "0.2.229",
4
4
  "description": "Install and configure the Bitfab plugin in Claude Code, Codex, or Cursor.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",