baro-ai 0.81.4 → 0.81.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/run-architect.mjs +12 -5
- package/dist/run-architect.mjs.map +1 -1
- package/package.json +1 -1
package/dist/run-architect.mjs
CHANGED
|
@@ -48023,6 +48023,7 @@ async function compileArchitectObligationSegments(options) {
|
|
|
48023
48023
|
}
|
|
48024
48024
|
async function compileBatch(input) {
|
|
48025
48025
|
let repairReason;
|
|
48026
|
+
let requestedMaxObligations = input.maxObligations;
|
|
48026
48027
|
for (const attempt of [1, 2]) {
|
|
48027
48028
|
throwIfAborted(input.options.signal);
|
|
48028
48029
|
emitProgress(input, {
|
|
@@ -48032,7 +48033,7 @@ async function compileBatch(input) {
|
|
|
48032
48033
|
let raw;
|
|
48033
48034
|
try {
|
|
48034
48035
|
raw = await input.options.respond(
|
|
48035
|
-
buildRequest(input, attempt, repairReason),
|
|
48036
|
+
buildRequest(input, attempt, repairReason, requestedMaxObligations),
|
|
48036
48037
|
input.options.signal
|
|
48037
48038
|
);
|
|
48038
48039
|
} catch (error) {
|
|
@@ -48055,8 +48056,14 @@ async function compileBatch(input) {
|
|
|
48055
48056
|
});
|
|
48056
48057
|
return drafts;
|
|
48057
48058
|
} catch (error) {
|
|
48058
|
-
if (isOutputLimitError(error, input.options.isOutputLimitError)
|
|
48059
|
-
|
|
48059
|
+
if (isOutputLimitError(error, input.options.isOutputLimitError)) {
|
|
48060
|
+
if (input.targets.length >= 2) {
|
|
48061
|
+
return await bisectOutputLimitedBatch(input, error);
|
|
48062
|
+
}
|
|
48063
|
+
requestedMaxObligations = Math.max(
|
|
48064
|
+
1,
|
|
48065
|
+
Math.min(3, Math.floor(requestedMaxObligations / 2))
|
|
48066
|
+
);
|
|
48060
48067
|
}
|
|
48061
48068
|
if (attempt === 2) {
|
|
48062
48069
|
throw new ArchitectObligationSegmentError(
|
|
@@ -48119,7 +48126,7 @@ function emitProgress(input, event) {
|
|
|
48119
48126
|
invariantIds: Object.freeze(input.targets.map(({ id }) => id))
|
|
48120
48127
|
}));
|
|
48121
48128
|
}
|
|
48122
|
-
function buildRequest(input, attempt, repairReason) {
|
|
48129
|
+
function buildRequest(input, attempt, repairReason, requestedMaxObligations) {
|
|
48123
48130
|
const invariantIds = Object.freeze(input.targets.map(({ id }) => id));
|
|
48124
48131
|
const payload = {
|
|
48125
48132
|
objective: input.goal.objective,
|
|
@@ -48131,7 +48138,7 @@ function buildRequest(input, attempt, repairReason) {
|
|
|
48131
48138
|
})),
|
|
48132
48139
|
targetInvariantIds: invariantIds,
|
|
48133
48140
|
architectureDecisionIds: input.decisionIds,
|
|
48134
|
-
maxObligations: input.maxObligations,
|
|
48141
|
+
maxObligations: requestedMaxObligations ?? input.maxObligations,
|
|
48135
48142
|
decisionDocument: input.options.decisionDocument,
|
|
48136
48143
|
...repairReason ? {
|
|
48137
48144
|
repair: `Regenerate the complete batch. Previous output was rejected: ${repairReason}`
|