bitfab 0.63.2 → 0.64.0
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/cloudReplay.py +663 -757
- package/dist/{chunk-ZRZDSP2R.js → chunk-ANMDH7EL.js} +6 -6
- package/dist/{chunk-NZCQ5TG4.js → chunk-IYZRISE3.js} +2 -2
- package/dist/{chunk-NJQ5P6V7.js → chunk-LQ3IEVZK.js} +3 -3
- package/dist/{chunk-5WYDAQAK.js → chunk-U5RNB7LF.js} +2 -2
- package/dist/{chunk-5WYDAQAK.js.map → chunk-U5RNB7LF.js.map} +1 -1
- package/dist/{chunk-3D67XMAO.js → chunk-ZKP65VBL.js} +2 -2
- package/dist/{chunk-3D67XMAO.js.map → chunk-ZKP65VBL.js.map} +1 -1
- package/dist/{http-HXDG3XBJ.js → http-EACAYPVT.js} +2 -2
- package/dist/{http-OJLI4LKV.js → http-LGRICPE6.js} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/node.cjs +1 -1
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +3 -3
- package/dist/{replay-MIBLRJKS.js → replay-4XNNKZ6T.js} +3 -3
- package/dist/replayCli.js +29 -52
- package/dist/replayCli.js.map +1 -1
- package/dist/seedCli.js +2 -2
- package/package.json +2 -2
- /package/dist/{chunk-ZRZDSP2R.js.map → chunk-ANMDH7EL.js.map} +0 -0
- /package/dist/{chunk-NZCQ5TG4.js.map → chunk-IYZRISE3.js.map} +0 -0
- /package/dist/{chunk-NJQ5P6V7.js.map → chunk-LQ3IEVZK.js.map} +0 -0
- /package/dist/{http-HXDG3XBJ.js.map → http-EACAYPVT.js.map} +0 -0
- /package/dist/{http-OJLI4LKV.js.map → http-LGRICPE6.js.map} +0 -0
- /package/dist/{replay-MIBLRJKS.js.map → replay-4XNNKZ6T.js.map} +0 -0
package/dist/node.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
getCurrentTrace,
|
|
37
37
|
reseedFromRegistry,
|
|
38
38
|
seedFromRegistry
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-ANMDH7EL.js";
|
|
40
40
|
import "./chunk-YWXQM6J3.js";
|
|
41
41
|
import {
|
|
42
42
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
ReplayError,
|
|
46
46
|
reportReplayProgress,
|
|
47
47
|
serializeReplayResult
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-IYZRISE3.js";
|
|
49
49
|
import {
|
|
50
50
|
BitfabError,
|
|
51
51
|
DEFAULT_SERVICE_URL,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
MixedTracingError,
|
|
54
54
|
__version__,
|
|
55
55
|
flushTraces
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-ZKP65VBL.js";
|
|
57
57
|
import {
|
|
58
58
|
assertAsyncStorageRegistered,
|
|
59
59
|
registerAsyncLocalStorageClass
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
sleepForReplayPersistence,
|
|
11
11
|
waitForReplayPersistence,
|
|
12
12
|
warnJudgeAssertionsDeprecated
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-IYZRISE3.js";
|
|
14
|
+
import "./chunk-ZKP65VBL.js";
|
|
15
15
|
import "./chunk-MT36GJMW.js";
|
|
16
16
|
export {
|
|
17
17
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
waitForReplayPersistence,
|
|
27
27
|
warnJudgeAssertionsDeprecated
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=replay-
|
|
29
|
+
//# sourceMappingURL=replay-4XNNKZ6T.js.map
|
package/dist/replayCli.js
CHANGED
|
@@ -7,17 +7,15 @@ import {
|
|
|
7
7
|
runRegistryMain,
|
|
8
8
|
runReplayCli,
|
|
9
9
|
runSeedCli
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import
|
|
12
|
-
BitfabError
|
|
13
|
-
} from "./chunk-5WYDAQAK.js";
|
|
10
|
+
} from "./chunk-LQ3IEVZK.js";
|
|
11
|
+
import "./chunk-U5RNB7LF.js";
|
|
14
12
|
|
|
15
13
|
// src/cloudReplayCli.ts
|
|
16
14
|
var CLOUD_REPLAY_HINT = "Add --cloud to run the same replay on GitHub Actions; bitfab-replay --cloud --help explains it.";
|
|
17
15
|
function isCloudReplayCommand(argv) {
|
|
18
16
|
return argv.some((arg) => arg === "--cloud" || arg.startsWith("--cloud-"));
|
|
19
17
|
}
|
|
20
|
-
async function runCloudReplayCommand(argv,
|
|
18
|
+
async function runCloudReplayCommand(argv, helper) {
|
|
21
19
|
const [{ spawn }, { fileURLToPath }] = await Promise.all([
|
|
22
20
|
import("child_process"),
|
|
23
21
|
import("url")
|
|
@@ -28,54 +26,33 @@ async function runCloudReplayCommand(argv, io = {}, helper) {
|
|
|
28
26
|
...process.execArgv.filter((flag) => !/^--(inspect|debug)/.test(flag)),
|
|
29
27
|
fileURLToPath(new URL("./replayCli.js", import.meta.url))
|
|
30
28
|
];
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
child.stdout.setEncoding("utf8");
|
|
43
|
-
child.stderr.setEncoding("utf8");
|
|
44
|
-
child.stdout.on("data", (chunk) => {
|
|
45
|
-
stdout += chunk;
|
|
46
|
-
});
|
|
47
|
-
child.stderr.on("data", (chunk) => {
|
|
48
|
-
;
|
|
49
|
-
(io.stderr ?? ((text) => process.stderr.write(text)))(chunk);
|
|
50
|
-
});
|
|
51
|
-
child.on(
|
|
52
|
-
"error",
|
|
53
|
-
() => reject(new BitfabError("Cloud replay requires Python 3.10+ on PATH"))
|
|
54
|
-
);
|
|
55
|
-
child.on("close", (code) => {
|
|
56
|
-
if (code !== 0) {
|
|
57
|
-
if (stdout.trim() !== "") {
|
|
58
|
-
;
|
|
59
|
-
(io.stdout ?? console.log)(stdout.trim());
|
|
29
|
+
const keepWaiting = () => {
|
|
30
|
+
};
|
|
31
|
+
process.on("SIGINT", keepWaiting);
|
|
32
|
+
try {
|
|
33
|
+
return await new Promise((resolve) => {
|
|
34
|
+
const child = spawn("python3", [script, ...argv], {
|
|
35
|
+
stdio: "inherit",
|
|
36
|
+
env: {
|
|
37
|
+
...process.env,
|
|
38
|
+
BITFAB_REPLAY_COMMAND: JSON.stringify(replayCommand),
|
|
39
|
+
BITFAB_SDK_LANGUAGE: "typescript"
|
|
60
40
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
41
|
+
});
|
|
42
|
+
child.on("error", () => {
|
|
43
|
+
process.stderr.write(
|
|
44
|
+
"Cloud replay needs Python 3.10+ on PATH as python3\n"
|
|
65
45
|
);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
46
|
+
resolve(1);
|
|
47
|
+
});
|
|
48
|
+
child.on(
|
|
49
|
+
"close",
|
|
50
|
+
(code, signal) => resolve(code ?? (signal === "SIGINT" ? 130 : 1))
|
|
51
|
+
);
|
|
69
52
|
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
;
|
|
73
|
-
(io.stdout ?? console.log)(output.trimEnd());
|
|
74
|
-
return {};
|
|
53
|
+
} finally {
|
|
54
|
+
process.off("SIGINT", keepWaiting);
|
|
75
55
|
}
|
|
76
|
-
const result = JSON.parse(output);
|
|
77
|
-
(io.stdout ?? console.log)(JSON.stringify(result, null, 2));
|
|
78
|
-
return result;
|
|
79
56
|
}
|
|
80
57
|
|
|
81
58
|
// src/replayCli.ts
|
|
@@ -85,9 +62,6 @@ var USAGE = `Usage: bitfab-replay --registry <path> <pipeline> [options]
|
|
|
85
62
|
Run bitfab-replay --registry <path> --help to list replay options.
|
|
86
63
|
${CLOUD_REPLAY_HINT}`;
|
|
87
64
|
async function runReplayCommand(argv, io = {}, importer = importRegistry) {
|
|
88
|
-
if (isCloudReplayCommand(argv)) {
|
|
89
|
-
return runCloudReplayCommand(argv, io);
|
|
90
|
-
}
|
|
91
65
|
const { registryPath, commandArgs } = await parseRegistryCommandArgs(
|
|
92
66
|
argv,
|
|
93
67
|
USAGE
|
|
@@ -99,6 +73,9 @@ async function runReplayCommand(argv, io = {}, importer = importRegistry) {
|
|
|
99
73
|
return runReplayCli(registry, commandArgs, io, registryPath);
|
|
100
74
|
}
|
|
101
75
|
async function runReplayMain(argv, io = {}) {
|
|
76
|
+
if (isCloudReplayCommand(argv)) {
|
|
77
|
+
return runCloudReplayCommand(argv);
|
|
78
|
+
}
|
|
102
79
|
return runRegistryMain(() => runReplayCommand(argv, io), io);
|
|
103
80
|
}
|
|
104
81
|
runIfEntrypoint(import.meta.url, () => runReplayMain(process.argv.slice(2)));
|
package/dist/replayCli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cloudReplayCli.ts","../src/replayCli.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/cloudReplayCli.ts","../src/replayCli.ts"],"sourcesContent":["export const CLOUD_REPLAY_HINT =\n \"Add --cloud to run the same replay on GitHub Actions; bitfab-replay --cloud --help explains it.\"\n\nexport function isCloudReplayCommand(argv: readonly string[]): boolean {\n return argv.some((arg) => arg === \"--cloud\" || arg.startsWith(\"--cloud-\"))\n}\n\nexport async function runCloudReplayCommand(\n argv: readonly string[],\n helper?: string,\n): Promise<number> {\n const [{ spawn }, { fileURLToPath }] = await Promise.all([\n import(\"node:child_process\"),\n import(\"node:url\"),\n ])\n const script =\n helper ?? fileURLToPath(new URL(\"../cloudReplay.py\", import.meta.url))\n const replayCommand = [\n process.execPath,\n ...process.execArgv.filter((flag) => !/^--(inspect|debug)/.test(flag)),\n fileURLToPath(new URL(\"./replayCli.js\", import.meta.url)),\n ]\n const keepWaiting = () => {}\n process.on(\"SIGINT\", keepWaiting)\n try {\n return await new Promise<number>((resolve) => {\n const child = spawn(\"python3\", [script, ...argv], {\n stdio: \"inherit\",\n env: {\n ...process.env,\n BITFAB_REPLAY_COMMAND: JSON.stringify(replayCommand),\n BITFAB_SDK_LANGUAGE: \"typescript\",\n },\n })\n child.on(\"error\", () => {\n process.stderr.write(\n \"Cloud replay needs Python 3.10+ on PATH as python3\\n\",\n )\n resolve(1)\n })\n child.on(\"close\", (code, signal) =>\n resolve(code ?? (signal === \"SIGINT\" ? 130 : 1)),\n )\n })\n } finally {\n process.off(\"SIGINT\", keepWaiting)\n }\n}\n","#!/usr/bin/env node\n\nimport {\n CLOUD_REPLAY_HINT,\n isCloudReplayCommand,\n runCloudReplayCommand,\n} from \"./cloudReplayCli.js\"\nimport {\n importRegistry,\n parseRegistryCommandArgs,\n type RegistryImporter,\n resolveRegistry,\n runIfEntrypoint,\n runRegistryMain,\n} from \"./registryCommand.js\"\nimport type { ReplayResult } from \"./replay.js\"\nimport {\n type ReplayCliIo,\n type ReseedRegistryResult,\n runReplayCli,\n runSeedCli,\n type SeedResult,\n} from \"./replayRegistry.js\"\n\nconst USAGE = `Usage: bitfab-replay --registry <path> <pipeline> [options]\\n bitfab-replay --registry <path> <pipeline> --resume <experimentId>\\n bitfab-replay --registry <path> <pipeline> --seed <cases.jsonl> [--run]\\nRun bitfab-replay --registry <path> --help to list replay options.\\n${CLOUD_REPLAY_HINT}`\n\nexport async function runReplayCommand(\n argv: readonly string[],\n io: ReplayCliIo = {},\n importer: RegistryImporter = importRegistry,\n): Promise<ReplayResult<unknown> | SeedResult | ReseedRegistryResult> {\n const { registryPath, commandArgs } = await parseRegistryCommandArgs(\n argv,\n USAGE,\n )\n const registry = resolveRegistry(await importer(registryPath), registryPath)\n if (commandArgs.includes(\"--seed\")) {\n return runSeedCli(registry, commandArgs, io)\n }\n return runReplayCli(registry, commandArgs, io, registryPath)\n}\n\nexport async function runReplayMain(\n argv: readonly string[],\n io: ReplayCliIo = {},\n): Promise<number> {\n if (isCloudReplayCommand(argv)) {\n return runCloudReplayCommand(argv)\n }\n return runRegistryMain(() => runReplayCommand(argv, io), io)\n}\n\nrunIfEntrypoint(import.meta.url, () => runReplayMain(process.argv.slice(2)))\n"],"mappings":";;;;;;;;;;;;;AAAO,IAAM,oBACX;AAEK,SAAS,qBAAqB,MAAkC;AACrE,SAAO,KAAK,KAAK,CAAC,QAAQ,QAAQ,aAAa,IAAI,WAAW,UAAU,CAAC;AAC3E;AAEA,eAAsB,sBACpB,MACA,QACiB;AACjB,QAAM,CAAC,EAAE,MAAM,GAAG,EAAE,cAAc,CAAC,IAAI,MAAM,QAAQ,IAAI;AAAA,IACvD,OAAO,eAAoB;AAAA,IAC3B,OAAO,KAAU;AAAA,EACnB,CAAC;AACD,QAAM,SACJ,UAAU,cAAc,IAAI,IAAI,qBAAqB,YAAY,GAAG,CAAC;AACvE,QAAM,gBAAgB;AAAA,IACpB,QAAQ;AAAA,IACR,GAAG,QAAQ,SAAS,OAAO,CAAC,SAAS,CAAC,qBAAqB,KAAK,IAAI,CAAC;AAAA,IACrE,cAAc,IAAI,IAAI,kBAAkB,YAAY,GAAG,CAAC;AAAA,EAC1D;AACA,QAAM,cAAc,MAAM;AAAA,EAAC;AAC3B,UAAQ,GAAG,UAAU,WAAW;AAChC,MAAI;AACF,WAAO,MAAM,IAAI,QAAgB,CAAC,YAAY;AAC5C,YAAM,QAAQ,MAAM,WAAW,CAAC,QAAQ,GAAG,IAAI,GAAG;AAAA,QAChD,OAAO;AAAA,QACP,KAAK;AAAA,UACH,GAAG,QAAQ;AAAA,UACX,uBAAuB,KAAK,UAAU,aAAa;AAAA,UACnD,qBAAqB;AAAA,QACvB;AAAA,MACF,CAAC;AACD,YAAM,GAAG,SAAS,MAAM;AACtB,gBAAQ,OAAO;AAAA,UACb;AAAA,QACF;AACA,gBAAQ,CAAC;AAAA,MACX,CAAC;AACD,YAAM;AAAA,QAAG;AAAA,QAAS,CAAC,MAAM,WACvB,QAAQ,SAAS,WAAW,WAAW,MAAM,EAAE;AAAA,MACjD;AAAA,IACF,CAAC;AAAA,EACH,UAAE;AACA,YAAQ,IAAI,UAAU,WAAW;AAAA,EACnC;AACF;;;ACvBA,IAAM,QAAQ;AAAA;AAAA;AAAA;AAAA,EAA+R,iBAAiB;AAE9T,eAAsB,iBACpB,MACA,KAAkB,CAAC,GACnB,WAA6B,gBACuC;AACpE,QAAM,EAAE,cAAc,YAAY,IAAI,MAAM;AAAA,IAC1C;AAAA,IACA;AAAA,EACF;AACA,QAAM,WAAW,gBAAgB,MAAM,SAAS,YAAY,GAAG,YAAY;AAC3E,MAAI,YAAY,SAAS,QAAQ,GAAG;AAClC,WAAO,WAAW,UAAU,aAAa,EAAE;AAAA,EAC7C;AACA,SAAO,aAAa,UAAU,aAAa,IAAI,YAAY;AAC7D;AAEA,eAAsB,cACpB,MACA,KAAkB,CAAC,GACF;AACjB,MAAI,qBAAqB,IAAI,GAAG;AAC9B,WAAO,sBAAsB,IAAI;AAAA,EACnC;AACA,SAAO,gBAAgB,MAAM,iBAAiB,MAAM,EAAE,GAAG,EAAE;AAC7D;AAEA,gBAAgB,YAAY,KAAK,MAAM,cAAc,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC;","names":[]}
|
package/dist/seedCli.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
runIfEntrypoint,
|
|
7
7
|
runRegistryMain,
|
|
8
8
|
runSeedCli
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-LQ3IEVZK.js";
|
|
10
|
+
import "./chunk-U5RNB7LF.js";
|
|
11
11
|
|
|
12
12
|
// src/seedCli.ts
|
|
13
13
|
var USAGE = "Usage: bitfab-seed --registry <path> <pipeline> --from-trace <id>[,<id>...]\n bitfab-seed --registry <path> <pipeline> --cases <cases.jsonl> [--run]\nRun bitfab-seed --registry <path> <pipeline> --help for details.";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitfab",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.64.0",
|
|
4
4
|
"description": "Bitfab client for provider-based API calls with local BAML execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
"devDependencies": {
|
|
279
|
-
"@boundaryml/baml": "^0.
|
|
279
|
+
"@boundaryml/baml": "^0.226.2",
|
|
280
280
|
"@langchain/core": "1.2.3",
|
|
281
281
|
"@langchain/langgraph": "^1.4.8",
|
|
282
282
|
"@openai/agents": "^0.13.5",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|