bitfab 0.11.4 → 0.11.5
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/{chunk-I3OKZ2TF.js → chunk-GWHHP5PL.js} +3 -3
- package/dist/chunk-GWHHP5PL.js.map +1 -0
- package/dist/{chunk-KAX2QQPS.js → chunk-KSUI74KL.js} +9 -3
- package/dist/chunk-KSUI74KL.js.map +1 -0
- package/dist/index.cjs +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -2
- package/dist/index.d.ts +28 -2
- package/dist/index.js +2 -2
- package/dist/node.cjs +11 -3
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +2 -2
- package/dist/{replay-IIBLVODH.js → replay-RR4IVBXE.js} +5 -3
- package/dist/replay-RR4IVBXE.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-I3OKZ2TF.js.map +0 -1
- package/dist/chunk-KAX2QQPS.js.map +0 -1
- package/dist/replay-IIBLVODH.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -171,6 +171,18 @@ interface TokenUsage {
|
|
|
171
171
|
cached: number | null;
|
|
172
172
|
total: number | null;
|
|
173
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Describes a single file edited as part of a code change.
|
|
176
|
+
*
|
|
177
|
+
* - `path`: file path (relative to the repo root, or any consistent root)
|
|
178
|
+
* - `before`: file contents before the change ("" for newly created files)
|
|
179
|
+
* - `after`: file contents after the change ("" for deleted files)
|
|
180
|
+
*/
|
|
181
|
+
interface CodeChangeFile {
|
|
182
|
+
path: string;
|
|
183
|
+
before: string;
|
|
184
|
+
after: string;
|
|
185
|
+
}
|
|
174
186
|
|
|
175
187
|
/**
|
|
176
188
|
* LangGraph/LangChain callback handler for Bitfab tracing.
|
|
@@ -253,6 +265,18 @@ interface ReplayOptions {
|
|
|
253
265
|
traceIds?: string[];
|
|
254
266
|
/** Maximum number of items to process in parallel. Set to 1 for sequential. Default 10. */
|
|
255
267
|
maxConcurrency?: number;
|
|
268
|
+
/**
|
|
269
|
+
* Description of the code change being tested in this replay. Stored on
|
|
270
|
+
* the resulting experiment so the change can be reviewed alongside results.
|
|
271
|
+
*/
|
|
272
|
+
codeChangeDescription?: string;
|
|
273
|
+
/**
|
|
274
|
+
* Files edited as part of this code change. Each entry holds the file path
|
|
275
|
+
* and the full `before`/`after` contents — the agent reads each file before
|
|
276
|
+
* and after editing and passes the two strings. Use `""` for newly created
|
|
277
|
+
* files (`before`) or deleted files (`after`).
|
|
278
|
+
*/
|
|
279
|
+
codeChangeFiles?: CodeChangeFile[];
|
|
256
280
|
}
|
|
257
281
|
interface ReplayItem<T> {
|
|
258
282
|
/** Deserialized inputs from the original trace. */
|
|
@@ -714,6 +738,8 @@ declare class Bitfab {
|
|
|
714
738
|
limit?: number;
|
|
715
739
|
traceIds?: string[];
|
|
716
740
|
maxConcurrency?: number;
|
|
741
|
+
codeChangeDescription?: string;
|
|
742
|
+
codeChangeFiles?: CodeChangeFile[];
|
|
717
743
|
}): Promise<ReplayResult<TReturn>>;
|
|
718
744
|
}
|
|
719
745
|
/**
|
|
@@ -777,7 +803,7 @@ declare class BitfabFunction {
|
|
|
777
803
|
/**
|
|
778
804
|
* SDK version from package.json (injected at build time)
|
|
779
805
|
*/
|
|
780
|
-
declare const __version__ = "0.11.
|
|
806
|
+
declare const __version__ = "0.11.5";
|
|
781
807
|
|
|
782
808
|
/**
|
|
783
809
|
* Constants for the Bitfab SDK.
|
|
@@ -787,4 +813,4 @@ declare const __version__ = "0.11.4";
|
|
|
787
813
|
*/
|
|
788
814
|
declare const DEFAULT_SERVICE_URL = "https://bitfab.ai";
|
|
789
815
|
|
|
790
|
-
export { type ActiveSpanContext, type AllowedEnvVars, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler, BitfabOpenAITracingProcessor, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type ProviderDefinition, type ReplayItem, type ReplayOptions, type ReplayResult, type SpanOptions, type SpanType, type TokenUsage, type TraceResponse, type TracingProcessor, type WrapBAMLOptions, type WrappedBamlFn, __version__, flushTraces, getCurrentSpan, getCurrentTrace };
|
|
816
|
+
export { type ActiveSpanContext, type AllowedEnvVars, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler, BitfabOpenAITracingProcessor, type CodeChangeFile, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type ProviderDefinition, type ReplayItem, type ReplayOptions, type ReplayResult, type SpanOptions, type SpanType, type TokenUsage, type TraceResponse, type TracingProcessor, type WrapBAMLOptions, type WrappedBamlFn, __version__, flushTraces, getCurrentSpan, getCurrentTrace };
|
package/dist/index.d.ts
CHANGED
|
@@ -171,6 +171,18 @@ interface TokenUsage {
|
|
|
171
171
|
cached: number | null;
|
|
172
172
|
total: number | null;
|
|
173
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Describes a single file edited as part of a code change.
|
|
176
|
+
*
|
|
177
|
+
* - `path`: file path (relative to the repo root, or any consistent root)
|
|
178
|
+
* - `before`: file contents before the change ("" for newly created files)
|
|
179
|
+
* - `after`: file contents after the change ("" for deleted files)
|
|
180
|
+
*/
|
|
181
|
+
interface CodeChangeFile {
|
|
182
|
+
path: string;
|
|
183
|
+
before: string;
|
|
184
|
+
after: string;
|
|
185
|
+
}
|
|
174
186
|
|
|
175
187
|
/**
|
|
176
188
|
* LangGraph/LangChain callback handler for Bitfab tracing.
|
|
@@ -253,6 +265,18 @@ interface ReplayOptions {
|
|
|
253
265
|
traceIds?: string[];
|
|
254
266
|
/** Maximum number of items to process in parallel. Set to 1 for sequential. Default 10. */
|
|
255
267
|
maxConcurrency?: number;
|
|
268
|
+
/**
|
|
269
|
+
* Description of the code change being tested in this replay. Stored on
|
|
270
|
+
* the resulting experiment so the change can be reviewed alongside results.
|
|
271
|
+
*/
|
|
272
|
+
codeChangeDescription?: string;
|
|
273
|
+
/**
|
|
274
|
+
* Files edited as part of this code change. Each entry holds the file path
|
|
275
|
+
* and the full `before`/`after` contents — the agent reads each file before
|
|
276
|
+
* and after editing and passes the two strings. Use `""` for newly created
|
|
277
|
+
* files (`before`) or deleted files (`after`).
|
|
278
|
+
*/
|
|
279
|
+
codeChangeFiles?: CodeChangeFile[];
|
|
256
280
|
}
|
|
257
281
|
interface ReplayItem<T> {
|
|
258
282
|
/** Deserialized inputs from the original trace. */
|
|
@@ -714,6 +738,8 @@ declare class Bitfab {
|
|
|
714
738
|
limit?: number;
|
|
715
739
|
traceIds?: string[];
|
|
716
740
|
maxConcurrency?: number;
|
|
741
|
+
codeChangeDescription?: string;
|
|
742
|
+
codeChangeFiles?: CodeChangeFile[];
|
|
717
743
|
}): Promise<ReplayResult<TReturn>>;
|
|
718
744
|
}
|
|
719
745
|
/**
|
|
@@ -777,7 +803,7 @@ declare class BitfabFunction {
|
|
|
777
803
|
/**
|
|
778
804
|
* SDK version from package.json (injected at build time)
|
|
779
805
|
*/
|
|
780
|
-
declare const __version__ = "0.11.
|
|
806
|
+
declare const __version__ = "0.11.5";
|
|
781
807
|
|
|
782
808
|
/**
|
|
783
809
|
* Constants for the Bitfab SDK.
|
|
@@ -787,4 +813,4 @@ declare const __version__ = "0.11.4";
|
|
|
787
813
|
*/
|
|
788
814
|
declare const DEFAULT_SERVICE_URL = "https://bitfab.ai";
|
|
789
815
|
|
|
790
|
-
export { type ActiveSpanContext, type AllowedEnvVars, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler, BitfabOpenAITracingProcessor, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type ProviderDefinition, type ReplayItem, type ReplayOptions, type ReplayResult, type SpanOptions, type SpanType, type TokenUsage, type TraceResponse, type TracingProcessor, type WrapBAMLOptions, type WrappedBamlFn, __version__, flushTraces, getCurrentSpan, getCurrentTrace };
|
|
816
|
+
export { type ActiveSpanContext, type AllowedEnvVars, type BamlExecutionResult, Bitfab, BitfabClaudeAgentHandler, type BitfabConfig, BitfabError, BitfabFunction, BitfabLangGraphCallbackHandler, BitfabOpenAITracingProcessor, type CodeChangeFile, type CurrentSpan, type CurrentTrace, DEFAULT_SERVICE_URL, type ProviderDefinition, type ReplayItem, type ReplayOptions, type ReplayResult, type SpanOptions, type SpanType, type TokenUsage, type TraceResponse, type TracingProcessor, type WrapBAMLOptions, type WrappedBamlFn, __version__, flushTraces, getCurrentSpan, getCurrentTrace };
|
package/dist/index.js
CHANGED
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
BitfabOpenAITracingProcessor,
|
|
7
7
|
getCurrentSpan,
|
|
8
8
|
getCurrentTrace
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GWHHP5PL.js";
|
|
10
10
|
import {
|
|
11
11
|
BitfabError,
|
|
12
12
|
DEFAULT_SERVICE_URL,
|
|
13
13
|
__version__,
|
|
14
14
|
flushTraces
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KSUI74KL.js";
|
|
16
16
|
export {
|
|
17
17
|
Bitfab,
|
|
18
18
|
BitfabClaudeAgentHandler,
|
package/dist/node.cjs
CHANGED
|
@@ -81,7 +81,7 @@ var __version__;
|
|
|
81
81
|
var init_version_generated = __esm({
|
|
82
82
|
"src/version.generated.ts"() {
|
|
83
83
|
"use strict";
|
|
84
|
-
__version__ = "0.11.
|
|
84
|
+
__version__ = "0.11.5";
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
|
|
@@ -285,11 +285,17 @@ var init_http = __esm({
|
|
|
285
285
|
* Start a replay session by fetching historical traces.
|
|
286
286
|
* Blocking call — creates a test run and returns lightweight item references.
|
|
287
287
|
*/
|
|
288
|
-
async startReplay(traceFunctionKey, limit, traceIds) {
|
|
288
|
+
async startReplay(traceFunctionKey, limit, traceIds, codeChangeDescription, codeChangeFiles) {
|
|
289
289
|
const payload = { traceFunctionKey, limit };
|
|
290
290
|
if (traceIds) {
|
|
291
291
|
payload.traceIds = traceIds;
|
|
292
292
|
}
|
|
293
|
+
if (codeChangeDescription !== void 0) {
|
|
294
|
+
payload.codeChangeDescription = codeChangeDescription;
|
|
295
|
+
}
|
|
296
|
+
if (codeChangeFiles !== void 0) {
|
|
297
|
+
payload.codeChangeFiles = codeChangeFiles;
|
|
298
|
+
}
|
|
293
299
|
return this.request("/api/sdk/replay/start", payload, {
|
|
294
300
|
timeout: 3e4
|
|
295
301
|
});
|
|
@@ -476,7 +482,9 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options) {
|
|
|
476
482
|
} = await httpClient.startReplay(
|
|
477
483
|
traceFunctionKey,
|
|
478
484
|
options?.limit ?? 5,
|
|
479
|
-
options?.traceIds
|
|
485
|
+
options?.traceIds,
|
|
486
|
+
options?.codeChangeDescription,
|
|
487
|
+
options?.codeChangeFiles
|
|
480
488
|
);
|
|
481
489
|
const maxConcurrency = options?.maxConcurrency ?? 10;
|
|
482
490
|
const tasks = serverItems.map(
|