baro-ai 0.118.3 → 0.118.4
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/run-architect.mjs +35 -26
- package/dist/run-architect.mjs.map +1 -1
- package/dist/runner.mjs +1 -1
- package/package.json +1 -1
package/dist/run-architect.mjs
CHANGED
|
@@ -8680,7 +8680,7 @@ var require_gaxios = __commonJS({
|
|
|
8680
8680
|
var retry_js_1 = require_retry3();
|
|
8681
8681
|
var stream_1 = __require("stream");
|
|
8682
8682
|
var interceptor_js_1 = require_interceptor();
|
|
8683
|
-
var
|
|
8683
|
+
var randomUUID6 = async () => globalThis.crypto?.randomUUID() || (await import("crypto")).randomUUID();
|
|
8684
8684
|
var HTTP_STATUS_NO_CONTENT = 204;
|
|
8685
8685
|
var Gaxios = class {
|
|
8686
8686
|
agentCache = /* @__PURE__ */ new Map();
|
|
@@ -8953,7 +8953,7 @@ var require_gaxios = __commonJS({
|
|
|
8953
8953
|
*/
|
|
8954
8954
|
["Blob", "File", "FormData"].includes(opts.data?.constructor?.name || "");
|
|
8955
8955
|
if (opts.multipart?.length) {
|
|
8956
|
-
const boundary = await
|
|
8956
|
+
const boundary = await randomUUID6();
|
|
8957
8957
|
preparedHeaders.set("content-type", `multipart/related; boundary=${boundary}`);
|
|
8958
8958
|
opts.body = stream_1.Readable.from(this.getMultipartRequest(opts.multipart, boundary));
|
|
8959
8959
|
} else if (shouldDirectlyPassData) {
|
|
@@ -22746,13 +22746,11 @@ var require_cross_spawn = __commonJS({
|
|
|
22746
22746
|
import {
|
|
22747
22747
|
mkdtempSync as mkdtempSync4,
|
|
22748
22748
|
readFileSync as readFileSync6,
|
|
22749
|
-
|
|
22750
|
-
rmSync as rmSync5,
|
|
22751
|
-
writeFileSync as writeFileSync4
|
|
22749
|
+
rmSync as rmSync6
|
|
22752
22750
|
} from "fs";
|
|
22753
|
-
import { randomUUID as
|
|
22751
|
+
import { randomUUID as randomUUID5 } from "crypto";
|
|
22754
22752
|
import { tmpdir as tmpdir5 } from "os";
|
|
22755
|
-
import {
|
|
22753
|
+
import { join as join10 } from "path";
|
|
22756
22754
|
|
|
22757
22755
|
// ../baro-orchestrator/src/telemetry/billing/cloud-receipt.ts
|
|
22758
22756
|
var BILLING_MONEY_SCALE = 9;
|
|
@@ -54328,6 +54326,33 @@ async function runArchitectPi(opts) {
|
|
|
54328
54326
|
);
|
|
54329
54327
|
}
|
|
54330
54328
|
|
|
54329
|
+
// ../baro-orchestrator/src/runtime/atomic-write.ts
|
|
54330
|
+
import { randomUUID as randomUUID4 } from "crypto";
|
|
54331
|
+
import { renameSync as renameSync2, rmSync as rmSync5, writeFileSync as writeFileSync4 } from "fs";
|
|
54332
|
+
import { basename as basename4, dirname as dirname3, join as join9 } from "path";
|
|
54333
|
+
function writeFileAtomic(path6, contents, rename = renameSync2) {
|
|
54334
|
+
const temporary = join9(
|
|
54335
|
+
dirname3(path6),
|
|
54336
|
+
`.${basename4(path6)}.${process.pid}.${randomUUID4()}.tmp`
|
|
54337
|
+
);
|
|
54338
|
+
try {
|
|
54339
|
+
writeFileSync4(temporary, contents, {
|
|
54340
|
+
encoding: "utf8",
|
|
54341
|
+
mode: 384,
|
|
54342
|
+
flag: "wx"
|
|
54343
|
+
});
|
|
54344
|
+
try {
|
|
54345
|
+
rename(temporary, path6);
|
|
54346
|
+
} catch (error) {
|
|
54347
|
+
const code = error?.code;
|
|
54348
|
+
if (code !== "EPERM" && code !== "EACCES" && code !== "EBUSY") throw error;
|
|
54349
|
+
writeFileSync4(path6, contents, { encoding: "utf8" });
|
|
54350
|
+
}
|
|
54351
|
+
} finally {
|
|
54352
|
+
rmSync5(temporary, { force: true });
|
|
54353
|
+
}
|
|
54354
|
+
}
|
|
54355
|
+
|
|
54331
54356
|
// ../baro-orchestrator/src/runtime/windows-path.ts
|
|
54332
54357
|
var MAX_PLAIN_PATH_CHARS = 247;
|
|
54333
54358
|
function plainWindowsPath(path6) {
|
|
@@ -54553,7 +54578,7 @@ async function main() {
|
|
|
54553
54578
|
`
|
|
54554
54579
|
);
|
|
54555
54580
|
});
|
|
54556
|
-
const billingRunId = process.env.BARO_RUN_ID ?? `architect-${
|
|
54581
|
+
const billingRunId = process.env.BARO_RUN_ID ?? `architect-${randomUUID5()}`;
|
|
54557
54582
|
let billing = null;
|
|
54558
54583
|
let result = "";
|
|
54559
54584
|
let outcomeTransport;
|
|
@@ -54869,7 +54894,7 @@ async function compileObligations(input) {
|
|
|
54869
54894
|
if (remainingMs < 1) {
|
|
54870
54895
|
throw architectDeadlineError(totalBudgetMs, "obligation compilation");
|
|
54871
54896
|
}
|
|
54872
|
-
const runtimeCwd = mkdtempSync4(
|
|
54897
|
+
const runtimeCwd = mkdtempSync4(join10(tmpdir5(), "baro-architect-obligations-"));
|
|
54873
54898
|
const controller = new AbortController();
|
|
54874
54899
|
const timeoutError = architectDeadlineError(
|
|
54875
54900
|
totalBudgetMs,
|
|
@@ -54958,7 +54983,7 @@ async function compileObligations(input) {
|
|
|
54958
54983
|
} finally {
|
|
54959
54984
|
deadline.close();
|
|
54960
54985
|
armedAwakeBudget = null;
|
|
54961
|
-
|
|
54986
|
+
rmSync6(runtimeCwd, { recursive: true, force: true });
|
|
54962
54987
|
}
|
|
54963
54988
|
}
|
|
54964
54989
|
function architectPhaseBudgetMs(args) {
|
|
@@ -55012,22 +55037,6 @@ function publishArchitectInvocation(runId, lane, callOrdinal, attempt, invocatio
|
|
|
55012
55037
|
)
|
|
55013
55038
|
});
|
|
55014
55039
|
}
|
|
55015
|
-
function writeFileAtomic(path6, contents) {
|
|
55016
|
-
const temporary = join9(
|
|
55017
|
-
dirname3(path6),
|
|
55018
|
-
`.${basename4(path6)}.${process.pid}.${randomUUID4()}.tmp`
|
|
55019
|
-
);
|
|
55020
|
-
try {
|
|
55021
|
-
writeFileSync4(temporary, contents, {
|
|
55022
|
-
encoding: "utf8",
|
|
55023
|
-
mode: 384,
|
|
55024
|
-
flag: "wx"
|
|
55025
|
-
});
|
|
55026
|
-
renameSync2(temporary, path6);
|
|
55027
|
-
} finally {
|
|
55028
|
-
rmSync5(temporary, { force: true });
|
|
55029
|
-
}
|
|
55030
|
-
}
|
|
55031
55040
|
main().catch((e2) => {
|
|
55032
55041
|
process.stderr.write(`[run-architect] crashed: ${safeErrorForStderr(e2, true)}
|
|
55033
55042
|
`);
|