bitfab-cli 0.2.453 → 0.2.455
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 +48 -30
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28862,20 +28862,20 @@ var justificationShape = external_exports.preprocess(parseJsonString, external_e
|
|
|
28862
28862
|
})).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.");
|
|
28863
28863
|
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.';
|
|
28864
28864
|
var optionalApprovalState = () => external_exports.enum(["pending", "approved", "rejected"]).optional().describe(APPROVAL_STATE_DESCRIPTION);
|
|
28865
|
-
var
|
|
28866
|
-
name: "
|
|
28867
|
-
title: "Save
|
|
28868
|
-
description: "Create or edit
|
|
28865
|
+
var saveCategory = {
|
|
28866
|
+
name: "save_category",
|
|
28867
|
+
title: "Save Category",
|
|
28868
|
+
description: "Create or edit a category shared within this organization. A category groups assertions and scenarios. Returns its ID, which save_trace_assertions takes as category_id. 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 every assertion filed under it to not reviewed.",
|
|
28869
28869
|
inputSchema: {
|
|
28870
28870
|
id: external_exports.uuid().optional().describe("Existing category ID to edit. Omit to create a category."),
|
|
28871
28871
|
title: external_exports.string().trim().min(1).describe("The category title."),
|
|
28872
|
-
description: external_exports.string().optional().describe("What assertions in this category have in common. Omit on an edit to preserve it. Pass an empty string to clear it.")
|
|
28872
|
+
description: external_exports.string().optional().describe("What the assertions and scenarios in this category have in common. Omit on an edit to preserve it. Pass an empty string to clear it.")
|
|
28873
28873
|
}
|
|
28874
28874
|
};
|
|
28875
|
-
var
|
|
28876
|
-
name: "
|
|
28877
|
-
title: "List
|
|
28878
|
-
description: "List
|
|
28875
|
+
var listCategories = {
|
|
28876
|
+
name: "list_categories",
|
|
28877
|
+
title: "List Categories",
|
|
28878
|
+
description: "List the categories in this organization with their IDs, titles, and descriptions. Use a returned ID as category_id in save_trace_assertions.",
|
|
28879
28879
|
inputSchema: {}
|
|
28880
28880
|
};
|
|
28881
28881
|
var listOrganizationMembers = {
|
|
@@ -28884,45 +28884,58 @@ var listOrganizationMembers = {
|
|
|
28884
28884
|
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.",
|
|
28885
28885
|
inputSchema: {}
|
|
28886
28886
|
};
|
|
28887
|
-
var
|
|
28888
|
-
name: "
|
|
28889
|
-
title: "Get
|
|
28890
|
-
description: "Read one
|
|
28887
|
+
var getCategory = {
|
|
28888
|
+
name: "get_category",
|
|
28889
|
+
title: "Get Category",
|
|
28890
|
+
description: "Read one category in this organization by ID, including its title and description.",
|
|
28891
28891
|
inputSchema: { id: external_exports.uuid().describe("ID of the category to read.") }
|
|
28892
28892
|
};
|
|
28893
|
-
var
|
|
28894
|
-
name: "
|
|
28895
|
-
title: "Delete
|
|
28896
|
-
description: "Delete
|
|
28893
|
+
var deleteCategory = {
|
|
28894
|
+
name: "delete_category",
|
|
28895
|
+
title: "Delete Category",
|
|
28896
|
+
description: "Delete a category from this organization. The assertions and scenarios filed under it are kept and lose only that category. Existing verdicts are kept.",
|
|
28897
28897
|
inputSchema: { id: external_exports.uuid().describe("ID of the category to delete.") }
|
|
28898
28898
|
};
|
|
28899
|
+
function deprecatedAlias(current, name, title) {
|
|
28900
|
+
return {
|
|
28901
|
+
...current,
|
|
28902
|
+
name,
|
|
28903
|
+
title,
|
|
28904
|
+
description: `Deprecated: use ${current.name}, which does the same thing. ${current.description}`
|
|
28905
|
+
};
|
|
28906
|
+
}
|
|
28907
|
+
var saveAssertionCategory = deprecatedAlias(saveCategory, "save_assertion_category", "Save Assertion Category");
|
|
28908
|
+
var listAssertionCategories = deprecatedAlias(listCategories, "list_assertion_categories", "List Assertion Categories");
|
|
28909
|
+
var getAssertionCategory = deprecatedAlias(getCategory, "get_assertion_category", "Get Assertion Category");
|
|
28910
|
+
var deleteAssertionCategory = deprecatedAlias(deleteCategory, "delete_assertion_category", "Delete Assertion Category");
|
|
28899
28911
|
var generateTraceAssertions = {
|
|
28900
28912
|
name: "generate_trace_assertions",
|
|
28901
28913
|
title: "Generate Trace Assertions",
|
|
28902
|
-
description: 'Generate review-ready assertion drafts from what one original trace actually did. Call this when the user asks Bitfab to generate assertions, infer expected behavior from a trace, or turn a known root cause into regression checks. Bitfab reads the organization\'s existing
|
|
28914
|
+
description: 'Generate review-ready assertion drafts from what one original trace actually did. Call this when the user asks Bitfab to generate assertions, infer expected behavior from a trace, or turn a known root cause into regression checks. Bitfab reads the organization\'s existing categories, selects the categories supported by trace evidence, and generates assertions one category at a time. The generated assertions are saved awaiting human review, so they are not checked on replays until a person approves them. Read them back with get_trace_assertions and `approvalStates: ["pending"]`. Generation runs on Bitfab and this call waits up to four minutes for it. If it is still running after that, the result says so, and calling again with the same traceId and without regenerate checks on it. A trace has one generation at a time, so a repeat call joins the running or finished generation instead of spending model calls again, and regenerate while one is running joins that one too. Set regenerate to true after it finishes to archive the prior generated drafts and replace them. A failed generation is returned as an error with its reason. Human-authored assertions are never replaced. Pass guidance when the user knows what the assertions should be about, most often a root cause analysis of why the trace was wrong; it narrows the evidence and produces smaller assertions. Pass categoryIds to limit generation to those categories. A replay trace id is refused because assertions belong to the original trace.',
|
|
28903
28915
|
inputSchema: {
|
|
28904
28916
|
traceId: external_exports.uuid().describe("The ORIGINAL trace to generate assertions for. A replay trace id is refused, and the error names the original to retry with."),
|
|
28905
28917
|
guidance: external_exports.string().trim().min(1).max(1e4).optional().describe("Optional assertion guidance, such as a root cause analysis of why the trace went wrong. Use it to focus generation on the smallest assertions that would catch this failure."),
|
|
28906
|
-
categoryIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1)).optional().describe("Optional
|
|
28918
|
+
categoryIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1)).optional().describe("Optional category ids from list_categories. Limits generation to these categories. Omit to let Bitfab choose from every category in the organization. An id outside the organization fails the call before any work starts."),
|
|
28907
28919
|
regenerate: external_exports.preprocess(parseJsonString, external_exports.boolean()).optional().describe("Set true to rerun generation and replace prior generated drafts. Omit or set false to reuse the existing generation result.")
|
|
28908
28920
|
}
|
|
28909
28921
|
};
|
|
28910
28922
|
var saveTraceAssertions = {
|
|
28911
28923
|
name: "save_trace_assertions",
|
|
28912
28924
|
title: "Save Trace Assertions",
|
|
28913
|
-
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 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_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 \`
|
|
28925
|
+
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 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_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_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. Up to ${MAX_ASSERTIONS_PER_REQUEST} per call.`,
|
|
28914
28926
|
inputSchema: {
|
|
28915
28927
|
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."),
|
|
28916
28928
|
assertions: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.object({
|
|
28917
28929
|
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."),
|
|
28918
|
-
|
|
28930
|
+
category_id: external_exports.uuid().nullish().describe("Category ID from save_category or list_categories. Omit on an edit to preserve the category. Pass null to remove it."),
|
|
28931
|
+
category_assertion_id: external_exports.uuid().nullish().describe("Deprecated: the old name for category_id. Ignored when category_id is also sent."),
|
|
28919
28932
|
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."),
|
|
28920
28933
|
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."),
|
|
28921
28934
|
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."),
|
|
28922
28935
|
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."),
|
|
28923
28936
|
targetOnEvaluatedTrace: assertionTargetShape.nullish(),
|
|
28924
28937
|
justification: justificationShape.nullish().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, or pass null to remove 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."),
|
|
28925
|
-
categoryJustification: justificationShape.nullish().describe("Why `
|
|
28938
|
+
categoryJustification: justificationShape.nullish().describe("Why `category_id` is the right category for this assertion, cited span by span. Omit on an edit to preserve it, or pass null to remove it. Changing the category clears it, since it justified the old one. Cite spans on this trace only."),
|
|
28926
28939
|
approvalState: optionalApprovalState(),
|
|
28927
28940
|
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.")
|
|
28928
28941
|
})).min(1).max(MAX_ASSERTIONS_PER_REQUEST)).describe(`One entry per assertion (1-${MAX_ASSERTIONS_PER_REQUEST})`)
|
|
@@ -28931,7 +28944,7 @@ var saveTraceAssertions = {
|
|
|
28931
28944
|
var getTraceAssertions = {
|
|
28932
28945
|
name: "get_trace_assertions",
|
|
28933
28946
|
title: "Get Trace Assertions",
|
|
28934
|
-
description: `Read what SHOULD happen when one or more traces are replayed: each trace's assertions, their review state, 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. By default 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. Pass \`approvalStates\` to read other review states: \`["pending"]\` for the assertions still awaiting review, including the drafts generate_trace_assertions saved, so a batch of them can be reviewed and then decided with save_trace_assertions \`approvalState\`; add \`"rejected"\` to see the ones turned down. Judge a replay only against the approved ones. To find assertions without knowing which traces carry them, such as every draft awaiting review on a function, use list_trace_assertions. Each trace also reports its assertion generation, if one ran: running, completed with how many drafts it saved for review, or failed with the reason. Categorized assertions include
|
|
28947
|
+
description: `Read what SHOULD happen when one or more traces are replayed: each trace's assertions, their review state, 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. By default 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. Pass \`approvalStates\` to read other review states: \`["pending"]\` for the assertions still awaiting review, including the drafts generate_trace_assertions saved, so a batch of them can be reviewed and then decided with save_trace_assertions \`approvalState\`; add \`"rejected"\` to see the ones turned down. Judge a replay only against the approved ones. To find assertions without knowing which traces carry them, such as every draft awaiting review on a function, use list_trace_assertions. Each trace also reports its assertion generation, if one ran: running, completed with how many drafts it saved for review, or failed with the reason. Categorized assertions include category_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.`,
|
|
28935
28948
|
inputSchema: {
|
|
28936
28949
|
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})`),
|
|
28937
28950
|
approvalStates: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.enum(["pending", "approved", "rejected"])).min(1).max(3)).optional().describe('Review states to include: "approved" (checked on every replay), "pending" (awaiting review, including generated drafts), "rejected" (turned down, never checked). Defaults to ["approved"], which is what a replay is judged against. Pass ["pending"] to review drafts, or all three to see everything.')
|
|
@@ -28944,7 +28957,7 @@ var listTraceAssertions = {
|
|
|
28944
28957
|
inputSchema: {
|
|
28945
28958
|
approvalStates: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.enum(["pending", "approved", "rejected"])).min(1).max(3)).describe('Review states to list: "pending" (awaiting review, including generated drafts), "approved" (checked on every replay), "rejected" (turned down, never checked). Pass ["pending"] for the review queue.'),
|
|
28946
28959
|
traceFunctionKey: external_exports.string().min(1).optional().describe("Only assertions on traces of this traced function, from list_trace_functions. Omit to list across the whole organization."),
|
|
28947
|
-
categoryId: external_exports.union([external_exports.literal("unfiled"), external_exports.uuid()]).optional().describe('Only assertions filed under this category, from
|
|
28960
|
+
categoryId: external_exports.union([external_exports.literal("unfiled"), external_exports.uuid()]).optional().describe('Only assertions filed under this category, from list_categories, or "unfiled" for assertions with no category. Omit for every category.'),
|
|
28948
28961
|
limit: external_exports.preprocess(parseJsonString, external_exports.number().int().min(1).max(100)).optional().describe("Max assertions to return (default 25, max 100)"),
|
|
28949
28962
|
cursor: external_exports.string().min(1).optional().describe("Opaque cursor from the previous page; reuse the same filters")
|
|
28950
28963
|
}
|
|
@@ -29253,13 +29266,13 @@ var scenarioTargetSchema = {
|
|
|
29253
29266
|
var getScenario = {
|
|
29254
29267
|
name: "get_scenario",
|
|
29255
29268
|
title: "Get Scenario",
|
|
29256
|
-
description: "Read one scenario, found by its id or by a trace it was built from: the situation the trace function's run was in, as the trigger that started the run and the data available when it arrived, with a name and a description. The name, description, trigger, and data describe the situation only, never what the run did or should do. Returns the trigger and data summaries, then the actual outcome when one was saved (what the run actually did: one example, not what it should have done), then the name, description, trigger, data, and actualOutcome as JSON in exactly the shape save_scenario accepts. data.sources, when saved, says where the records came from and, for each kind of data, whether it was read in full, as of the run or as of capture, with columns the capture predates, or not captured at all. Call it before save_scenario so an edit starts from what is saved.",
|
|
29269
|
+
description: "Read one scenario, found by its id or by a trace it was built from: the situation the trace function's run was in, as the trigger that started the run and the data available when it arrived, with a name and a description. The name, description, trigger, and data describe the situation only, never what the run did or should do. Returns the trigger and data summaries, then the actual outcome when one was saved (what the run actually did: one example, not what it should have done), then the name, description, trigger, data, and actualOutcome as JSON in exactly the shape save_scenario accepts, including the categories it is filed under. data.sources, when saved, says where the records came from and, for each kind of data, whether it was read in full, as of the run or as of capture, with columns the capture predates, or not captured at all. Call it before save_scenario so an edit starts from what is saved.",
|
|
29257
29270
|
inputSchema: scenarioTargetSchema
|
|
29258
29271
|
};
|
|
29259
29272
|
var saveScenario = {
|
|
29260
29273
|
name: "save_scenario",
|
|
29261
29274
|
title: "Save Scenario",
|
|
29262
|
-
description: "Create or update one scenario. To create a scenario, or to replace its records, send traceId with records or recordsPath: the records your own system holds that relate to that trace's run, as of the run. Create the scenario first by sending traceId with records as an empty list: Bitfab builds only the trigger from the trace (so far only for traces of Noah's noah-agent-turn function; any other trace with no scenario is refused), and the data starts empty, with no records. The data holds only what you send afterwards: the trace shows what happened in the run, not all the data your system held when it ran. Check that the returned trigger is not empty before sending records. Records that are not empty are refused for a trace with no scenario yet, and for a scenario whose trigger is empty. Bitfab looks for each record's quote, and failing that its text, in the inputs and outputs of the trace's spans. A record found in a span cites that span and can back an assertion; a record found in no span is kept as context the run never saw. A trace that is a replay is refused, because a scenario belongs on the original. Send sources beside records to say where the records came from and how much of each kind of data was read; recordsPath forwards the file's sources on its own. records and recordsPath replace the saved records and sources whole (records with no sources clear the saved sources), need traceId rather than scenarioId, and cannot be sent with any field other than sources. To edit a scenario that already exists, find it by its id or by a trace it was built from and send name, description, trigger, data, or appendData, for example to add history the run had available, record data it was missing, or correct the trigger. name, description, trigger, and data each replace the saved value whole, and fields left out are kept. To record what the run actually did, send actualOutcome, read from the trace: its final output for the summary and the tool calls that ran for the actions. It is shown below the trigger as one example of how the run handled the situation, never as what it should have done, and it is not evidence for assertions. Bitfab does not fill it. Send null to clear it. To add to the data without resending it, use appendData instead of data: its history entries go after the saved ones and its missing items after the saved missing items, in one step that cannot lose another caller's append made at the same time. Send data or appendData, not both. trigger, data, and appendData entries must keep the shape get_scenario returns. A history entry's source names the span its text came from, on any trace linked to the scenario (a trace that finds it by traceId is one); set it to null or leave it out when the text is not in such a trace, and the entry still counts as data the run had but cannot be cited as evidence when the scenario is turned into assertions. A source naming a span on any other trace is refused. The trigger and data summaries are rebuilt from what is saved. An edit to a trace with no scenario, or to a scenario id that does not exist, is refused. Returns the saved scenario.",
|
|
29275
|
+
description: "Create or update one scenario. To create a scenario, or to replace its records, send traceId with records or recordsPath: the records your own system holds that relate to that trace's run, as of the run. Create the scenario first by sending traceId with records as an empty list: Bitfab builds only the trigger from the trace (so far only for traces of Noah's noah-agent-turn function; any other trace with no scenario is refused), and the data starts empty, with no records. The data holds only what you send afterwards: the trace shows what happened in the run, not all the data your system held when it ran. Check that the returned trigger is not empty before sending records. Records that are not empty are refused for a trace with no scenario yet, and for a scenario whose trigger is empty. Bitfab looks for each record's quote, and failing that its text, in the inputs and outputs of the trace's spans. A record found in a span cites that span and can back an assertion; a record found in no span is kept as context the run never saw. A trace that is a replay is refused, because a scenario belongs on the original. Send sources beside records to say where the records came from and how much of each kind of data was read; recordsPath forwards the file's sources on its own. records and recordsPath replace the saved records and sources whole (records with no sources clear the saved sources), need traceId rather than scenarioId, and cannot be sent with any field other than sources. To edit a scenario that already exists, find it by its id or by a trace it was built from and send name, description, trigger, data, or appendData, for example to add history the run had available, record data it was missing, or correct the trigger. name, description, trigger, and data each replace the saved value whole, and fields left out are kept. To record what the run actually did, send actualOutcome, read from the trace: its final output for the summary and the tool calls that ran for the actions. It is shown below the trigger as one example of how the run handled the situation, never as what it should have done, and it is not evidence for assertions. Bitfab does not fill it. Send null to clear it. To file the scenario under categories, send categoryIds with every category it belongs to; a scenario can be in any number. To add to the data without resending it, use appendData instead of data: its history entries go after the saved ones and its missing items after the saved missing items, in one step that cannot lose another caller's append made at the same time. Send data or appendData, not both. trigger, data, and appendData entries must keep the shape get_scenario returns. A history entry's source names the span its text came from, on any trace linked to the scenario (a trace that finds it by traceId is one); set it to null or leave it out when the text is not in such a trace, and the entry still counts as data the run had but cannot be cited as evidence when the scenario is turned into assertions. A source naming a span on any other trace is refused. The trigger and data summaries are rebuilt from what is saved. An edit to a trace with no scenario, or to a scenario id that does not exist, is refused. Returns the saved scenario.",
|
|
29263
29276
|
inputSchema: {
|
|
29264
29277
|
...scenarioTargetSchema,
|
|
29265
29278
|
name: external_exports.string().min(1).optional().describe("The scenario's name."),
|
|
@@ -29285,6 +29298,7 @@ var saveScenario = {
|
|
|
29285
29298
|
text: external_exports.string().describe("The text, as it appears in the span.")
|
|
29286
29299
|
}).nullable().optional().describe("The span the summary came from, on a trace linked to the scenario, or null.")
|
|
29287
29300
|
}).nullable()).optional().describe("What the run actually did. Replaces the saved actual outcome whole. Send null to clear it."),
|
|
29301
|
+
categoryIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid())).optional().describe("Every category this scenario is filed under, from list_categories. Replaces the saved categories whole: send an empty list to remove them all, and leave it out to keep them. An id outside the organization fails the call."),
|
|
29288
29302
|
records: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown()))).optional().describe(`The records related to this run, each { kind, ref, at, asOf, title, text, quote }. kind is one of "message", "contact", "preference", "memory", "email", "calendar_event", "action_item". ref is your own pointer to the row, such as "Input:234605". at is when the record came to exist, or null. asOf is "run" when the record is as it was at the run, or "now" when no history is kept for it. quote is a short exact string to look for in the run's spans, or null to look for the whole text. Prefer recordsPath, so the records never pass through the conversation. Send records or recordsPath, not both.`),
|
|
29289
29303
|
recordsPath: external_exports.string().min(1).optional().describe("Path to a local JSON file holding the records, either as an array or as an object with a records array. The Bitfab plugin reads the file and sends its records, so they never pass through the conversation. When the object also has frameAt, capturedAt, windows, and coverage, as Noah's scenario builder writes them, the plugin sends those as sources. Send records or recordsPath, not both."),
|
|
29290
29304
|
sources: external_exports.preprocess(parseJsonString, external_exports.record(external_exports.string(), external_exports.unknown())).optional().describe(`Where the records came from, as { frameAt, capturedAt, windows, coverage }: when the run started, when its data was captured (or null), how many days each windowed kind reaches (such as { "messagesDays": 3, "calendarDays": 7 }), and coverage, which gives each kind of data its capture status ("rewound-to-frame" for as of the run, "current-at-capture" for as of capture, "not-recorded" or "unavailable" for not captured) plus filledColumns { absentNullable, defaultedNonNullable }, the "table.column" names the capture predates. Only with records, never with recordsPath, which sends the file's own.`)
|
|
@@ -29321,6 +29335,10 @@ var ALL_TOOL_CONTRACTS = [
|
|
|
29321
29335
|
getSpan,
|
|
29322
29336
|
saveAgentLabels,
|
|
29323
29337
|
saveHumanLabels,
|
|
29338
|
+
saveCategory,
|
|
29339
|
+
listCategories,
|
|
29340
|
+
getCategory,
|
|
29341
|
+
deleteCategory,
|
|
29324
29342
|
saveAssertionCategory,
|
|
29325
29343
|
listAssertionCategories,
|
|
29326
29344
|
getAssertionCategory,
|
|
@@ -30027,10 +30045,10 @@ var semver3 = __toESM(require_semver2(), 1);
|
|
|
30027
30045
|
|
|
30028
30046
|
// ../bitfab-plugin-lib/dist/bakedSdkVersions.js
|
|
30029
30047
|
var BAKED_SDK_VERSIONS = {
|
|
30030
|
-
typescript: "0.
|
|
30031
|
-
python: "0.
|
|
30032
|
-
ruby: "0.
|
|
30033
|
-
go: "0.
|
|
30048
|
+
typescript: "0.65.0",
|
|
30049
|
+
python: "0.65.0",
|
|
30050
|
+
ruby: "0.65.0",
|
|
30051
|
+
go: "0.65.0"
|
|
30034
30052
|
};
|
|
30035
30053
|
|
|
30036
30054
|
// ../bitfab-plugin-lib/dist/installedSdk.js
|
package/package.json
CHANGED