bitfab-cli 0.2.410 → 0.2.412
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 +23 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28597,6 +28597,18 @@ var dateOnlyStringSchema = external_exports.string().regex(DATE_PATTERN, "Must b
|
|
|
28597
28597
|
return date5.getFullYear() === year && date5.getMonth() === month - 1 && date5.getDate() === day;
|
|
28598
28598
|
}, "Must be a valid calendar date");
|
|
28599
28599
|
var GET_TRACE_LABELS_MAX_IDS = 100;
|
|
28600
|
+
var GET_TRACES_DEFAULT_SPAN_LIMIT = 50;
|
|
28601
|
+
var SPAN_READ_MAX_RESPONSE_CHARS = 32e3;
|
|
28602
|
+
var GET_TRACES_MAX_SPAN_LIMIT = 200;
|
|
28603
|
+
var GET_TRACES_MAX_SPAN_NAMES = 50;
|
|
28604
|
+
var spanFieldSchema = external_exports.enum([
|
|
28605
|
+
"input",
|
|
28606
|
+
"output",
|
|
28607
|
+
"reasoning",
|
|
28608
|
+
"content",
|
|
28609
|
+
"errors",
|
|
28610
|
+
"contexts"
|
|
28611
|
+
]);
|
|
28600
28612
|
var GET_TRACE_ASSERTIONS_MAX_IDS = 100;
|
|
28601
28613
|
var MAX_ASSERTIONS_PER_REQUEST = 50;
|
|
28602
28614
|
var MAX_ASSIGNEE_EMAIL_LENGTH = 320;
|
|
@@ -28729,10 +28741,14 @@ var searchTraces = {
|
|
|
28729
28741
|
var getTraces = {
|
|
28730
28742
|
name: "get_traces",
|
|
28731
28743
|
title: "Get Traces",
|
|
28732
|
-
description:
|
|
28744
|
+
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. Spans come back one page at a time (${GET_TRACES_DEFAULT_SPAN_LIMIT} per trace by default) and the whole response is capped in size, so it always fits in context. When a trace has more spans than one page, the response lists every span name with its count and says which spanOffset reads the next page: narrow with spanNames (only spans with those names) and spanFields (only those fields) rather than paging through thousands of spans, and fetch any one truncated field in full with get_span_field. To load only labels + annotations for many traces at once (no span content), use get_trace_labels instead.`,
|
|
28733
28745
|
inputSchema: {
|
|
28734
28746
|
traceIds: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.uuid()).min(1).max(10)).describe("Trace IDs to read (1-10)"),
|
|
28735
|
-
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),
|
|
28747
|
+
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), and leaves out any span field over 10k chars, printing its size instead (name it in spanFields to preview it anyway, or read it in full with get_span_field): prefer it when scanning or identifying candidate traces. "full" renders every field untruncated up to 10k chars each, with no per-span ceiling, until the response size cap: use it when you need complete detail on a handful of spans, ideally narrowed with spanNames.'),
|
|
28748
|
+
spanNames: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.string().min(1)).min(1).max(GET_TRACES_MAX_SPAN_NAMES)).optional().describe("Only show spans whose name exactly matches one of these. A trace with more spans than one page lists its span names and counts, so read that list first and pass the names you need. Omit to show every span."),
|
|
28749
|
+
spanOffset: external_exports.preprocess(parseJsonString, external_exports.number().int().min(0)).optional().describe("Skip this many spans in each trace, counted after the spanNames filter (default 0). The response says which offset reads the next page."),
|
|
28750
|
+
spanLimit: external_exports.preprocess(parseJsonString, external_exports.number().int().min(1).max(GET_TRACES_MAX_SPAN_LIMIT)).optional().describe(`Show at most this many spans per trace (default ${GET_TRACES_DEFAULT_SPAN_LIMIT}, max ${GET_TRACES_MAX_SPAN_LIMIT}). The response size cap can stop a page early, and says so when it does.`),
|
|
28751
|
+
spanFields: external_exports.preprocess(parseJsonString, external_exports.array(spanFieldSchema).max(6)).optional().describe("Only show these span fields (input, output, reasoning, content, errors, contexts). Omit to show all of them, with fields over 10k chars left out in summary scope. A field named here is previewed even when it is large. Pass [] to list spans with only their name, ID, duration, tokens, and model, which is the cheapest way to see a large trace's shape.")
|
|
28736
28752
|
}
|
|
28737
28753
|
};
|
|
28738
28754
|
var getTraceLabels = {
|
|
@@ -28755,12 +28771,13 @@ var generateLabelEvidence = {
|
|
|
28755
28771
|
var getSpanField = {
|
|
28756
28772
|
name: "get_span_field",
|
|
28757
28773
|
title: "Get Span Field",
|
|
28758
|
-
description:
|
|
28774
|
+
description: `Fetch the COMPLETE, untruncated value of a single span field. get_traces truncates or leaves out 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 ${SPAN_READ_MAX_RESPONSE_CHARS} chars per call so the response fits in context; when the field is longer, the response says which offset reads the next part. Prefer this over re-reading the whole trace when you only need one large field in full.`,
|
|
28759
28775
|
inputSchema: {
|
|
28760
28776
|
traceId: external_exports.uuid().describe("The trace ID the span belongs to"),
|
|
28761
28777
|
spanId: external_exports.uuid().describe("The span ID to read, taken from the `[ID: ...]` shown for the span in get_traces output"),
|
|
28762
|
-
field:
|
|
28763
|
-
maxChars: external_exports.preprocess(parseJsonString, external_exports.number().int().positive()).optional().describe(
|
|
28778
|
+
field: spanFieldSchema.describe("Which span field to return in full: input, output, reasoning, content, errors, or contexts"),
|
|
28779
|
+
maxChars: external_exports.preprocess(parseJsonString, external_exports.number().int().positive()).optional().describe(`Maximum characters to return (default and upper limit ${SPAN_READ_MAX_RESPONSE_CHARS}). Larger values are treated as ${SPAN_READ_MAX_RESPONSE_CHARS}.`),
|
|
28780
|
+
offset: external_exports.preprocess(parseJsonString, external_exports.number().int().min(0)).optional().describe("Character position to start reading from (default 0). Pass the offset a previous response gave to read the next part of a long field.")
|
|
28764
28781
|
}
|
|
28765
28782
|
};
|
|
28766
28783
|
var labelEvidenceShape = external_exports.preprocess(parseJsonString, external_exports.array(external_exports.object({
|
|
@@ -28875,7 +28892,7 @@ var saveTraceAssertions = {
|
|
|
28875
28892
|
assertions: external_exports.preprocess(parseJsonString, external_exports.array(external_exports.object({
|
|
28876
28893
|
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."),
|
|
28877
28894
|
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."),
|
|
28878
|
-
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."),
|
|
28895
|
+
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."),
|
|
28879
28896
|
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."),
|
|
28880
28897
|
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."),
|
|
28881
28898
|
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."),
|
package/package.json
CHANGED