bitfab-cli 0.2.373 → 0.2.374

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 +8 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23902,10 +23902,12 @@ var justificationShape = external_exports.preprocess(parseJsonString, external_e
23902
23902
  spanId: external_exports.uuid().describe("The span this reason comes from, taken from the `[ID: ...]` shown for that span in get_traces output."),
23903
23903
  text: external_exports.string().trim().min(1).max(1e4).describe("What that span shows, in one or two sentences.")
23904
23904
  })).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.");
23905
+ 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.';
23906
+ var optionalApprovalState = () => external_exports.enum(["pending", "approved", "rejected"]).optional().describe(APPROVAL_STATE_DESCRIPTION);
23905
23907
  var saveAssertionCategory = {
23906
23908
  name: "save_assertion_category",
23907
23909
  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.",
23910
+ 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
23911
  inputSchema: {
23910
23912
  id: external_exports.uuid().optional().describe("Existing category ID to edit. Omit to create a category."),
23911
23913
  title: external_exports.string().trim().min(1).describe("The category title."),
@@ -23933,19 +23935,20 @@ var deleteAssertionCategory = {
23933
23935
  var saveTraceAssertions = {
23934
23936
  name: "save_trace_assertions",
23935
23937
  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.`,
23938
+ 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. 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
23939
  inputSchema: {
23938
23940
  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
23941
  assertions: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.object({
23940
23942
  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
23943
  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."),
23944
+ 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
23945
  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
23946
  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
23947
  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
23948
  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.")
23949
+ 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."),
23950
+ 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."),
23951
+ approvalState: optionalApprovalState()
23949
23952
  })).min(1).max(MAX_ASSERTIONS_PER_REQUEST)).describe(`One entry per assertion (1-${MAX_ASSERTIONS_PER_REQUEST})`)
23950
23953
  }
23951
23954
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitfab-cli",
3
- "version": "0.2.373",
3
+ "version": "0.2.374",
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",