bitfab-cli 0.2.373 → 0.2.375

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 +22 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23729,6 +23729,7 @@ var dateOnlyStringSchema = external_exports.string().regex(DATE_PATTERN, "Must b
23729
23729
  var GET_TRACE_LABELS_MAX_IDS = 100;
23730
23730
  var GET_TRACE_ASSERTIONS_MAX_IDS = 100;
23731
23731
  var MAX_ASSERTIONS_PER_REQUEST = 50;
23732
+ var MAX_ASSIGNEE_EMAIL_LENGTH = 320;
23732
23733
  var GET_GRADER_LABELS_MAX_IDS = 100;
23733
23734
  var DEFAULT_GRADER_LABEL_LIMIT = 50;
23734
23735
  var MAX_GRADER_LABEL_LIMIT = 200;
@@ -23902,10 +23903,12 @@ var justificationShape = external_exports.preprocess(parseJsonString, external_e
23902
23903
  spanId: external_exports.uuid().describe("The span this reason comes from, taken from the `[ID: ...]` shown for that span in get_traces output."),
23903
23904
  text: external_exports.string().trim().min(1).max(1e4).describe("What that span shows, in one or two sentences.")
23904
23905
  })).min(1).max(50)).describe("Evidence: one entry per span you are relying on, each with its own reason, so a reviewer can open the span and check the claim. Quote what the span actually shows rather than restating the assertion. 1-50 entries.");
23906
+ var APPROVAL_STATE_DESCRIPTION = 'Review decision to record on an assertion that already exists, so it needs that assertion\'s `id` and is refused on a new one: write it first, then decide it, so putting a claim into force is never the same call that made it up. "approved" means it holds up, so replays start checking it and it counts as validated; "rejected" means it does not, so replays keep ignoring it; "pending" returns it to not reviewed and clears who decided it. Omit to leave the current decision alone. Approving decides what every later replay of the trace is judged against, so read the assertion and the spans it cites before deciding, and put what you checked in the justification.';
23907
+ var optionalApprovalState = () => external_exports.enum(["pending", "approved", "rejected"]).optional().describe(APPROVAL_STATE_DESCRIPTION);
23905
23908
  var saveAssertionCategory = {
23906
23909
  name: "save_assertion_category",
23907
23910
  title: "Save Assertion Category",
23908
- description: "Create or edit an assertion category shared within this organization. Returns its ID for category_assertion_id in save_trace_assertions. Omit id to create. Pass an existing id to edit. Omit description on an edit to preserve it. Pass an empty description to clear it.",
23911
+ description: "Create or edit an assertion category shared within this organization, and record a review decision on one that already exists with approvalState. Returns its ID for category_assertion_id in save_trace_assertions. Omit id to create. Pass an existing id to edit. Omit description on an edit to preserve it. Pass an empty description to clear it. Editing the title or description returns the category to not reviewed unless the same call says otherwise.",
23909
23912
  inputSchema: {
23910
23913
  id: external_exports.uuid().optional().describe("Existing category ID to edit. Omit to create a category."),
23911
23914
  title: external_exports.string().trim().min(1).describe("The category title."),
@@ -23918,6 +23921,12 @@ var listAssertionCategories = {
23918
23921
  description: "List assertion categories in this organization with their IDs, titles, and descriptions. Use the returned ID as category_assertion_id in save_trace_assertions.",
23919
23922
  inputSchema: {}
23920
23923
  };
23924
+ var listOrganizationMembers = {
23925
+ name: "list_organization_members",
23926
+ title: "List Organization Members",
23927
+ description: "List the people in this organization, each with their name and email. Call it before save_trace_assertions when routing an assertion to a reviewer, so `assigneeEmail` carries an address someone here actually holds rather than a guess: an email belonging to nobody in the organization fails that call. It also names who an approval or an assertion came from when a read shows only an email. This is the organization the API key belongs to, so it takes no arguments.",
23928
+ inputSchema: {}
23929
+ };
23921
23930
  var getAssertionCategory = {
23922
23931
  name: "get_assertion_category",
23923
23932
  title: "Get Assertion Category",
@@ -23933,26 +23942,28 @@ var deleteAssertionCategory = {
23933
23942
  var saveTraceAssertions = {
23934
23943
  name: "save_trace_assertions",
23935
23944
  title: "Save Trace Assertions",
23936
- description: `Record what SHOULD happen when this trace is replayed. Bitfab stores two kinds of label on a trace. A VERDICT says how a run that already happened turned out, and that is save_agent_labels / save_human_labels. An ASSERTION, which is what this tool writes, says what a correct run looks like for THIS specific input, carries no pass/fail of its own, and is checked against a later replay once a person approves it. A trace holds at most one verdict per author and any number of assertions. Call it when the user describes the right answer for a particular case, for example "this booking should have picked the 6am flight, not the 9am". This is not a verdict on a run that already happened, which is save_agent_labels, and it is not a check that applies to every trace of a function, which is save_grader. Pass \`assertion\` plus optional \`passCriteria\` / \`failCriteria\`, the same trio save_grader takes, so an assertion that proves out across many traces can later be promoted into a grader with no rewriting. \`humanNote\` stores people-only context on the assertion; preserve and return it, but never use it to judge whether a replay passed. Pass an entry's \`id\` to edit an existing assertion, or omit it to add a new one, so two callers adding different assertions to one trace never overwrite each other. What this tool writes is saved awaiting review, so nothing checks it yet; a person approves it in Bitfab and from then on every replay of the trace is judged against it. Call get_trace_assertions first to find the assertion to edit and to avoid creating a duplicate, and read them back before judging a replay, where it lists the approved ones only. Up to ${MAX_ASSERTIONS_PER_REQUEST} per call.`,
23945
+ description: `Record what SHOULD happen when this trace is replayed. Bitfab stores two kinds of label on a trace. A VERDICT says how a run that already happened turned out, and that is save_agent_labels / save_human_labels. An ASSERTION, which is what this tool writes, says what a correct run looks like for THIS specific input, carries no pass/fail of its own, and is checked against a later replay once a reviewer approves it. A trace holds at most one verdict per author and any number of assertions. Call it when the user describes the right answer for a particular case, for example "this booking should have picked the 6am flight, not the 9am". This is not a verdict on a run that already happened, which is save_agent_labels, and it is not a check that applies to every trace of a function, which is save_grader. Pass \`assertion\` plus optional \`passCriteria\` / \`failCriteria\`, the same trio save_grader takes, so an assertion that proves out across many traces can later be promoted into a grader with no rewriting. \`humanNote\` stores people-only context on the assertion; preserve and return it, but never use it to judge whether a replay passed. \`assigneeEmail\` names the member who should review it, which routes the assertion to that person without deciding anything, so it never changes the approval state. Pass an entry's \`id\` to edit an existing assertion, or omit it to add a new one, so two callers adding different assertions to one trace never overwrite each other. What this tool writes is saved awaiting review, so nothing checks it yet; a reviewer approves it, in Bitfab or with \`approvalState\` on a later call here, and from then on every replay of the trace is judged against it. \`approvalState\` decides an assertion that already exists, so deciding one is \`{ id, approvalState }\` with nothing else: an omitted \`assertion\` keeps the current wording. It is refused on a new assertion, so the call that invents a claim is never the call that puts it into force. One decision covers the assertion and the category it is filed under, so set \`category_assertion_id\` and \`approvalState\` in the same entry when you are deciding both; recategorizing on a later call without deciding returns it to not reviewed, since the approval covered the old category. What it gates is whether replays check the assertion at all, so decide from the assertion and the spans it cites rather than from memory of having written it. Rewording an assertion, or changing its criteria, target, or category, returns it to not reviewed unless the same call says otherwise. Call get_trace_assertions first to find the assertion to edit and to avoid creating a duplicate, and read them back before judging a replay, where it lists the approved ones only. Up to ${MAX_ASSERTIONS_PER_REQUEST} per call.`,
23937
23946
  inputSchema: {
23938
23947
  traceId: external_exports.uuid().describe("The ORIGINAL trace to attach assertions to. A replay trace id is refused, and the error names the original to retry with, because a replay reads its original's assertions automatically."),
23939
23948
  assertions: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.object({
23940
23949
  id: external_exports.uuid().optional().describe("Id of an existing assertion to edit, from a previous save or from get_trace_assertions. Omit to add a new one."),
23941
23950
  category_assertion_id: external_exports.uuid().nullish().describe("Category ID from save_assertion_category or list_assertion_categories. Omit on an edit to preserve the category. Pass null to remove it."),
23942
- assertion: external_exports.string().min(1).describe("The single thing that must hold, in one sentence, stated so a reader who has never seen this trace could check it, e.g. 'The itinerary returned lands before 9am local time'. One claim per assertion: if you are about to write 'and', write two assertions instead, so each can pass or fail on its own."),
23951
+ assertion: external_exports.string().min(1).optional().describe("The single thing that must hold, in one sentence, stated so a reader who has never seen this trace could check it, e.g. 'The itinerary returned lands before 9am local time'. One claim per assertion: if you are about to write 'and', write two assertions instead, so each can pass or fail on its own. Required when adding an assertion. Omit on an edit to preserve the current wording, which is what a call that only records an approval wants."),
23943
23952
  humanNote: external_exports.string().max(1e4).optional().describe("People-only context attached to this assertion. It is returned by reads but must never be used as evidence when assessing a replay. On an edit, omit to preserve it and pass an empty string to clear it."),
23944
23953
  passCriteria: external_exports.string().optional().describe("How a judge should recognise a pass, when the assertion alone leaves room to argue, e.g. 'arrival timestamp is strictly before 09:00 in the destination timezone'. Optional, and only worth writing when it removes real ambiguity. Same field save_grader takes, so an assertion that proves out across many traces is promoted into a grader by copying it. On an edit, omit to keep the current value and pass an empty string to clear it."),
23945
23954
  failCriteria: external_exports.string().optional().describe("How a judge should recognise a failure, for cases the pass criteria do not obviously exclude, e.g. 'any leg departing after 09:00, including connections'. Optional. On an edit, omit to keep the current value and pass an empty string to clear it."),
23946
23955
  targetOnEvaluatedTrace: assertionTargetShape.optional(),
23947
- justification: justificationShape.optional().describe("Why this assertion is right for THIS trace, cited span by span: the spans that show what the run actually did, each with its own reason. Omit on an edit to preserve it. A person reviews it in Bitfab and marks the assertion approved or rejected, so an assertion with no justification is one a reviewer has to reconstruct from scratch. Cite spans on this trace only."),
23948
- categoryJustification: justificationShape.optional().describe("Why `category_assertion_id` is the right category for this assertion, cited span by span. Omit on an edit to preserve it. Changing the category clears it, since it justified the old one. Cite spans on this trace only.")
23956
+ justification: justificationShape.optional().describe("Why this assertion is right for THIS trace, cited span by span: the spans that show what the run actually did, each with its own reason. Omit on an edit to preserve it. It is the evidence behind `approvalState`, so an assertion with no justification is one a reviewer has to reconstruct from scratch. Cite spans on this trace only."),
23957
+ categoryJustification: justificationShape.optional().describe("Why `category_assertion_id` is the right category for this assertion, cited span by span. Omit on an edit to preserve it. Changing the category clears it, since it justified the old one. Cite spans on this trace only."),
23958
+ approvalState: optionalApprovalState(),
23959
+ assigneeEmail: external_exports.email().max(MAX_ASSIGNEE_EMAIL_LENGTH).nullish().describe("Email of the organization member who should review this assertion, which routes it into their queue in Bitfab. Assigning decides nothing, so it leaves the approval state alone. The email must belong to a member of this organization, or the call fails naming it. Omit on an edit to preserve the current assignee, and pass null to leave it to nobody.")
23949
23960
  })).min(1).max(MAX_ASSERTIONS_PER_REQUEST)).describe(`One entry per assertion (1-${MAX_ASSERTIONS_PER_REQUEST})`)
23950
23961
  }
23951
23962
  };
23952
23963
  var getTraceAssertions = {
23953
23964
  name: "get_trace_assertions",
23954
23965
  title: "Get Trace Assertions",
23955
- description: `Read what SHOULD happen when one or more traces are replayed: each trace's approved assertions, their pass/fail criteria, people-only human note, and what part of the evaluated trace each one checks. Only assertions a person has approved are returned, because only those are checked on a replay; a trace whose assertions are all still awaiting review reads the same as one with none. Categorized assertions include category_assertion_id and the category's id, title, and description. A human note is returned so it can be read and edited, but it is never assessment evidence: judge only from the assertion, pass/fail criteria, and evaluated trace. Call this before judging a replay so the verdict is measured against what the user actually asked for rather than a guess, and before save_trace_assertions to find the assertion to edit or to avoid creating a duplicate. No span content is loaded, so one call accepts up to ${GET_TRACE_ASSERTIONS_MAX_IDS} ids. Accepts original trace ids and replay trace ids alike: a replay with no assertions of its own reads its original's, and the response says which original they came from. An assertion whose target cannot be found on the trace being evaluated is errored, never passed, so record it with save_agent_labels \`skip\` rather than a FAIL.`,
23966
+ description: `Read what SHOULD happen when one or more traces are replayed: each trace's approved assertions, their pass/fail criteria, people-only human note, who is assigned to review each one, and what part of the evaluated trace each one checks. Only assertions a person has approved are returned, because only those are checked on a replay; a trace whose assertions are all still awaiting review reads the same as one with none. Categorized assertions include category_assertion_id and the category's id, title, and description. A human note is returned so it can be read and edited, but it is never assessment evidence: judge only from the assertion, pass/fail criteria, and evaluated trace. Call this before judging a replay so the verdict is measured against what the user actually asked for rather than a guess, and before save_trace_assertions to find the assertion to edit or to avoid creating a duplicate. No span content is loaded, so one call accepts up to ${GET_TRACE_ASSERTIONS_MAX_IDS} ids. Accepts original trace ids and replay trace ids alike: a replay with no assertions of its own reads its original's, and the response says which original they came from. An assertion whose target cannot be found on the trace being evaluated is errored, never passed, so record it with save_agent_labels \`skip\` rather than a FAIL.`,
23956
23967
  inputSchema: {
23957
23968
  traceIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1).max(GET_TRACE_ASSERTIONS_MAX_IDS)).describe(`Original trace IDs to read assertions for (1-${GET_TRACE_ASSERTIONS_MAX_IDS})`)
23958
23969
  }
@@ -24262,6 +24273,7 @@ var ALL_TOOL_CONTRACTS = [
24262
24273
  saveTraceAssertions,
24263
24274
  getTraceAssertions,
24264
24275
  archiveTraceAssertions,
24276
+ listOrganizationMembers,
24265
24277
  saveGrader,
24266
24278
  listGraders,
24267
24279
  saveDataset,
@@ -24883,10 +24895,10 @@ var semver3 = __toESM(require_semver2(), 1);
24883
24895
 
24884
24896
  // ../bitfab-plugin-lib/dist/bakedSdkVersions.js
24885
24897
  var BAKED_SDK_VERSIONS = {
24886
- typescript: "0.58.1",
24887
- python: "0.58.2",
24888
- ruby: "0.58.1",
24889
- go: "0.58.1"
24898
+ typescript: "0.58.2",
24899
+ python: "0.58.3",
24900
+ ruby: "0.58.2",
24901
+ go: "0.58.2"
24890
24902
  };
24891
24903
 
24892
24904
  // ../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.373",
3
+ "version": "0.2.375",
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",