bitfab-cli 0.2.520 → 0.2.522
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.js +15 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29282,7 +29282,7 @@ var regenerateAssertion = {
|
|
|
29282
29282
|
var saveTraceAssertions = {
|
|
29283
29283
|
name: "save_trace_assertions",
|
|
29284
29284
|
title: "Save Trace Assertions",
|
|
29285
|
-
description: `Record what SHOULD happen when this trace is replayed. Bitfab stores two kinds of record on a trace. A VERDICT says how a run that already happened turned out, and that is save_agent_verdicts / save_human_verdicts. 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 any number of assertions, and each verdict is recorded on one of them. 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_verdicts
|
|
29285
|
+
description: `Record what SHOULD happen when this trace is replayed. Bitfab stores two kinds of record on a trace. A VERDICT says how a run that already happened turned out, and that is save_agent_verdicts / save_human_verdicts. 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 any number of assertions, and each verdict is recorded on one of them. 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_verdicts,. Pass \`assertion\` plus optional \`passCriteria\` / \`failCriteria\`. \`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_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 by default. Pass it \`approvalStates: ["pending"]\` to read back drafts awaiting review, including the ones you just wrote. Each assertion with new text is checked against the writing rules and rewritten when it breaks one, unless \`guidedRewrite\` is false, so read the response for what was saved and for any claim to save separately. Up to ${MAX_ASSERTIONS_PER_REQUEST} per call.`,
|
|
29286
29286
|
inputSchema: {
|
|
29287
29287
|
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."),
|
|
29288
29288
|
assertions: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.object({
|
|
@@ -29291,7 +29291,7 @@ var saveTraceAssertions = {
|
|
|
29291
29291
|
category_assertion_id: external_exports.uuid().nullish().describe("Deprecated: the old name for category_id. Ignored when category_id is also sent."),
|
|
29292
29292
|
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. The replay gets this trace's input and world unchanged, so state the answer they settle, with its real names, dates, times, and amounts, never a condition such as 'if the meeting is booked' and never a pointer such as 'the times the user approved'. Never pin a value the recorded run chose where other choices are also correct, such as which of several open slots it offered or the channel it replied on; state the range or set instead. Answer the latest input, not the thread history. 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."),
|
|
29293
29293
|
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."),
|
|
29294
|
-
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.
|
|
29294
|
+
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. On an edit, omit to keep the current value and pass an empty string to clear it."),
|
|
29295
29295
|
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."),
|
|
29296
29296
|
targetOnEvaluatedTrace: assertionTargetShape.nullish(),
|
|
29297
29297
|
code: assertionCodeShape.nullish(),
|
|
@@ -29336,23 +29336,21 @@ var archiveTraceAssertions = {
|
|
|
29336
29336
|
var saveGrader = {
|
|
29337
29337
|
name: "save_grader",
|
|
29338
29338
|
title: "Save Grader",
|
|
29339
|
-
description:
|
|
29339
|
+
description: 'Edit an existing grader: rename it, rewrite its criteria, switch its judge model, archive it, or restore it. Graders are deprecated and new ones can no longer be created; when the user wants a new check, write assertions with save_trace_assertions instead. Pass graderId (from list_graders) plus only the fields to change. Set status to "archived" to retire a grader; any later save that omits status (or sets "active") restores it. Pass an empty string for passCriteria/failCriteria to clear them. After a successful 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. External graders (ones Bitfab never runs) take no model.',
|
|
29340
29340
|
inputSchema: {
|
|
29341
|
-
graderId: external_exports.uuid().
|
|
29342
|
-
|
|
29343
|
-
|
|
29344
|
-
|
|
29345
|
-
|
|
29346
|
-
|
|
29347
|
-
|
|
29348
|
-
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)."),
|
|
29349
|
-
external: external_exports.boolean().optional().describe("Create an external grader: Bitfab never runs it, and its verdicts arrive through save_grader_verdicts. Only honored when creating; on edit it must match the grader or be omitted.")
|
|
29341
|
+
graderId: external_exports.uuid().describe("Id of the grader to edit, from list_graders."),
|
|
29342
|
+
name: external_exports.string().min(1).optional().describe("New name, unique per trace function (e.g. 'No fabricated order ids'). Pass only to rename."),
|
|
29343
|
+
evaluationFocus: external_exports.string().min(1).optional().describe("What this grader evaluates: the property a trace of this function must satisfy, written as a concrete, checkable statement. Omit to keep the current value."),
|
|
29344
|
+
passCriteria: external_exports.string().optional().describe("Optional: what a PASSING trace looks like. Omit to keep the stored value; pass an empty string to clear it."),
|
|
29345
|
+
failCriteria: external_exports.string().optional().describe("Optional: what a FAILING trace looks like. Omit to keep the stored value; pass an empty string to clear it."),
|
|
29346
|
+
status: external_exports.enum(["active", "archived"]).optional().describe('Set "archived" to retire the grader (hidden from list_graders by default). Omit, or set "active", to keep its current running status; on an archived grader it restores it, as live when it has a trained prompt and as active otherwise.'),
|
|
29347
|
+
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).")
|
|
29350
29348
|
}
|
|
29351
29349
|
};
|
|
29352
29350
|
var listGraders = {
|
|
29353
29351
|
name: "list_graders",
|
|
29354
29352
|
title: "List Graders",
|
|
29355
|
-
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_verdicts. Each comes with id, name, status, evaluation focus, and pass/fail criteria. Call before save_grader to find the grader to edit
|
|
29353
|
+
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_verdicts. Each comes with id, name, status, evaluation focus, and pass/fail criteria. Call before save_grader to find the grader to edit. Results are newest-first and paginated. Archived graders are hidden unless includeArchived is true.",
|
|
29356
29354
|
inputSchema: {
|
|
29357
29355
|
traceFunctionKey: external_exports.string().min(1).describe("The trace function key to list graders for"),
|
|
29358
29356
|
includeArchived: external_exports.preprocess(parseJsonString, external_exports.boolean()).optional().describe("Include archived graders (default false)"),
|
|
@@ -29583,7 +29581,7 @@ var getGraderVerdicts = {
|
|
|
29583
29581
|
}
|
|
29584
29582
|
};
|
|
29585
29583
|
var graderVerdictEntryShape = external_exports.object({
|
|
29586
|
-
graderId: external_exports.uuid().describe("The external grader that produced this verdict (from list_graders
|
|
29584
|
+
graderId: external_exports.uuid().describe("The external grader that produced this verdict (from list_graders)."),
|
|
29587
29585
|
traceId: external_exports.uuid().describe("The trace the verdict is about."),
|
|
29588
29586
|
verdict: external_exports.enum(["pass", "fail"]).optional().describe('"pass" or "fail". Required unless the deprecated label is sent.'),
|
|
29589
29587
|
label: external_exports.boolean().optional().meta({ deprecated: true }).describe('Deprecated: the old spelling of verdict. true is "pass", false is "fail". Refused when verdict is also sent.'),
|
|
@@ -29594,7 +29592,7 @@ var graderVerdictEntryShape = external_exports.object({
|
|
|
29594
29592
|
var saveGraderVerdicts = {
|
|
29595
29593
|
name: "save_grader_verdicts",
|
|
29596
29594
|
title: "Save Grader Verdicts",
|
|
29597
|
-
description: `Record verdicts for EXTERNAL graders: graders
|
|
29595
|
+
description: `Record verdicts for EXTERNAL graders: existing graders 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_verdicts, 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 person's verdict on a trace belongs in save_human_verdicts. Up to ${SAVE_GRADER_VERDICTS_MAX_ENTRIES} entries per call; the whole call is rejected if any entry is invalid. The old \`labels\` array, with \`label\` (true or false) on each entry, is still accepted.`,
|
|
29598
29596
|
inputSchema: {
|
|
29599
29597
|
verdicts: external_exports.preprocess(parseJsonString, external_exports.array(graderVerdictEntryShape).min(1).max(SAVE_GRADER_VERDICTS_MAX_ENTRIES)).optional().describe(`One entry per grader per trace (1-${SAVE_GRADER_VERDICTS_MAX_ENTRIES}). Required unless the deprecated labels is sent.`),
|
|
29600
29598
|
labels: external_exports.preprocess(parseJsonString, external_exports.array(graderVerdictEntryShape).min(1).max(SAVE_GRADER_VERDICTS_MAX_ENTRIES)).optional().meta({ deprecated: true }).describe("Deprecated: the old name for verdicts. Refused when verdicts is also sent.")
|
|
@@ -31142,8 +31140,8 @@ var semver2 = __toESM(require_semver2(), 1);
|
|
|
31142
31140
|
|
|
31143
31141
|
// ../bitfab-plugin-lib/dist/bakedSdkVersions.js
|
|
31144
31142
|
var BAKED_SDK_VERSIONS = {
|
|
31145
|
-
typescript: "0.76.
|
|
31146
|
-
python: "0.76.
|
|
31143
|
+
typescript: "0.76.6",
|
|
31144
|
+
python: "0.76.5",
|
|
31147
31145
|
ruby: "0.75.4",
|
|
31148
31146
|
go: "0.75.4"
|
|
31149
31147
|
};
|
|
@@ -37107,7 +37105,6 @@ Finding out what happened:
|
|
|
37107
37105
|
Writing down what should happen:
|
|
37108
37106
|
- An assertion says what should happen when one trace is replayed. Draft them from what the trace did with ${generateTraceAssertions.name}, or write them with ${saveTraceAssertions.name}. They wait for review until approved. Retire one with ${archiveTraceAssertions.name}.
|
|
37109
37107
|
- A verdict says whether a run passed one assertion. Read a trace's assertions with ${getTraceAssertions.name}, then record your verdicts with ${saveAgentVerdicts.name}. Use ${saveHumanVerdicts.name} only when the user gives the verdict.
|
|
37110
|
-
- A grader is a pass/fail check for every trace of a function. Create one with ${saveGrader.name}.
|
|
37111
37108
|
- A scenario describes the situation one run was in. Read it with ${getScenario.name} and build it with ${saveScenario.name}.
|
|
37112
37109
|
|
|
37113
37110
|
Building datasets:
|
package/package.json
CHANGED