@drisp/cli 0.7.9 → 0.7.10
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.
|
@@ -13086,6 +13086,15 @@ function classOfCap(declaredCap) {
|
|
|
13086
13086
|
function forecastOfCap(declaredCap) {
|
|
13087
13087
|
return SIZE_CLASS_FORECASTS[classOfCap(declaredCap)];
|
|
13088
13088
|
}
|
|
13089
|
+
var classCalibrationSchema = external_exports.strictObject({
|
|
13090
|
+
S: external_exports.strictObject({ forecast: external_exports.number(), runs: external_exports.number() }).optional(),
|
|
13091
|
+
M: external_exports.strictObject({ forecast: external_exports.number(), runs: external_exports.number() }).optional(),
|
|
13092
|
+
L: external_exports.strictObject({ forecast: external_exports.number(), runs: external_exports.number() }).optional()
|
|
13093
|
+
});
|
|
13094
|
+
var calibrationSchema = external_exports.record(external_exports.string(), classCalibrationSchema);
|
|
13095
|
+
function forecastOfClass(sizeClass, calibration) {
|
|
13096
|
+
return calibration?.[sizeClass]?.forecast ?? SIZE_CLASS_FORECASTS[sizeClass];
|
|
13097
|
+
}
|
|
13089
13098
|
|
|
13090
13099
|
// ../../packages/protocol/src/v2.ts
|
|
13091
13100
|
var protocolVersion = { major: 2, minor: 3 };
|
|
@@ -14915,7 +14924,7 @@ async function restoreCheckpoint(store, input) {
|
|
|
14915
14924
|
|
|
14916
14925
|
// ../../modules/runtime/src/software-version.ts
|
|
14917
14926
|
import "fs";
|
|
14918
|
-
var runnerSoftwareVersion = true ? "0.7.
|
|
14927
|
+
var runnerSoftwareVersion = true ? "0.7.10" : JSON.parse(readFileSync2(new URL("../../../apps/cli/package.json", import.meta.url), "utf8")).version;
|
|
14919
14928
|
|
|
14920
14929
|
// ../../modules/runtime/src/connection.ts
|
|
14921
14930
|
var runnerCapabilities = [
|
|
@@ -20314,6 +20323,7 @@ var SKIP_REASONS = [
|
|
|
20314
20323
|
"not-ready-for-agent"
|
|
20315
20324
|
];
|
|
20316
20325
|
var count = external_exports.number().int().nonnegative();
|
|
20326
|
+
var calibratedClass = external_exports.strictObject({ forecast: count, runs: count });
|
|
20317
20327
|
var issueEntrySchema = external_exports.strictObject({
|
|
20318
20328
|
id: external_exports.string(),
|
|
20319
20329
|
identifier: external_exports.string(),
|
|
@@ -20349,7 +20359,13 @@ var buildPlanSchema = external_exports.strictObject({
|
|
|
20349
20359
|
external_exports.strictObject({
|
|
20350
20360
|
tokenBudget: count,
|
|
20351
20361
|
orchestratorCap: count,
|
|
20352
|
-
forecast: count
|
|
20362
|
+
forecast: count,
|
|
20363
|
+
/** The classes whose forecast the Hub measured from finished Runs (DRI-244); absent when none was. */
|
|
20364
|
+
calibrated: external_exports.strictObject({
|
|
20365
|
+
S: calibratedClass.optional(),
|
|
20366
|
+
M: calibratedClass.optional(),
|
|
20367
|
+
L: calibratedClass.optional()
|
|
20368
|
+
}).optional()
|
|
20353
20369
|
}),
|
|
20354
20370
|
external_exports.strictObject({
|
|
20355
20371
|
tokenBudget: count,
|
|
@@ -20761,7 +20777,16 @@ function planBuild(context) {
|
|
|
20761
20777
|
});
|
|
20762
20778
|
}
|
|
20763
20779
|
const groups = layers.map((issues, index) => ({ index: index + 1, issues }));
|
|
20764
|
-
const forecast = groups.flatMap((group2) => group2.issues).reduce(
|
|
20780
|
+
const forecast = groups.flatMap((group2) => group2.issues).reduce(
|
|
20781
|
+
(sum, entry) => sum + forecastOfClass(entry.sizeClass, context.calibration),
|
|
20782
|
+
0
|
|
20783
|
+
);
|
|
20784
|
+
const inPlan = new Set(groups.flatMap((g) => g.issues.map((e) => e.sizeClass)));
|
|
20785
|
+
const calibrated = Object.fromEntries(
|
|
20786
|
+
["S", "M", "L"].filter(
|
|
20787
|
+
(sizeClass) => inPlan.has(sizeClass) && context.calibration?.[sizeClass]
|
|
20788
|
+
).map((sizeClass) => [sizeClass, context.calibration[sizeClass]])
|
|
20789
|
+
);
|
|
20765
20790
|
return {
|
|
20766
20791
|
status: "planned",
|
|
20767
20792
|
workflows,
|
|
@@ -20777,7 +20802,8 @@ function planBuild(context) {
|
|
|
20777
20802
|
budget: {
|
|
20778
20803
|
tokenBudget: defaultBudget(forecast),
|
|
20779
20804
|
orchestratorCap: ORCHESTRATOR_LOOP.maxRunTokens,
|
|
20780
|
-
forecast
|
|
20805
|
+
forecast,
|
|
20806
|
+
...Object.keys(calibrated).length > 0 ? { calibrated } : {}
|
|
20781
20807
|
},
|
|
20782
20808
|
groups,
|
|
20783
20809
|
skipped,
|
|
@@ -22146,6 +22172,7 @@ export {
|
|
|
22146
22172
|
localAnswerDecision,
|
|
22147
22173
|
runExec,
|
|
22148
22174
|
forecastOfCap,
|
|
22175
|
+
calibrationSchema,
|
|
22149
22176
|
repositoryBindingSchema,
|
|
22150
22177
|
commandSchema,
|
|
22151
22178
|
historyRecordSchema,
|
|
@@ -22204,4 +22231,4 @@ export {
|
|
|
22204
22231
|
runMachineRunners,
|
|
22205
22232
|
writeIdentityOnce
|
|
22206
22233
|
};
|
|
22207
|
-
//# sourceMappingURL=chunk-
|
|
22234
|
+
//# sourceMappingURL=chunk-ISH6VEYL.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runMachineRunners
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ISH6VEYL.js";
|
|
4
4
|
|
|
5
5
|
// src/app/entry/runnerDaemon.ts
|
|
6
6
|
if (process.argv.includes("--help")) {
|
|
@@ -13,4 +13,4 @@ if (process.argv.includes("--help")) {
|
|
|
13
13
|
process.exitCode = 1;
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-OORYDPD6.js.map
|
package/dist/cli.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
buildPlanSchema,
|
|
18
18
|
buildPostByToolUseId,
|
|
19
19
|
buildProbeConfigs,
|
|
20
|
+
calibrationSchema,
|
|
20
21
|
centerAnsi,
|
|
21
22
|
childWorktreePath,
|
|
22
23
|
classifyFailure,
|
|
@@ -142,7 +143,7 @@ import {
|
|
|
142
143
|
visualPositionToOffset,
|
|
143
144
|
wrapText,
|
|
144
145
|
writeIdentityOnce
|
|
145
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-ISH6VEYL.js";
|
|
146
147
|
import {
|
|
147
148
|
generateId as generateId2
|
|
148
149
|
} from "./chunk-PQIB66SG.js";
|
|
@@ -13775,7 +13776,8 @@ function runBuildPlan(deps) {
|
|
|
13775
13776
|
folder: deps.folder,
|
|
13776
13777
|
runnerId,
|
|
13777
13778
|
templateVersion,
|
|
13778
|
-
layout
|
|
13779
|
+
layout,
|
|
13780
|
+
...deps.calibration ? { calibration: deps.calibration } : {}
|
|
13779
13781
|
});
|
|
13780
13782
|
if (result.status === "failed") return fail(result.reason);
|
|
13781
13783
|
if (result.status === "needs_fills")
|
|
@@ -13901,6 +13903,10 @@ var DrispClient = class _DrispClient {
|
|
|
13901
13903
|
await this.request(`/runs/${encodeURIComponent(runId)}/artifacts/${encodeURIComponent(name)}`)
|
|
13902
13904
|
);
|
|
13903
13905
|
}
|
|
13906
|
+
/** The measured size-class forecasts per harness (root ADR-0011): only classes with enough finished Runs appear. */
|
|
13907
|
+
async calibration() {
|
|
13908
|
+
return calibrationSchema.parse(await this.request("/calibration"));
|
|
13909
|
+
}
|
|
13904
13910
|
async run(runId) {
|
|
13905
13911
|
return runViewSchema.parse(await this.request(`/runs/${encodeURIComponent(runId)}`));
|
|
13906
13912
|
}
|
|
@@ -15172,6 +15178,20 @@ function runBuildChecks(cwd, deps) {
|
|
|
15172
15178
|
}));
|
|
15173
15179
|
return evaluateRemoteChecks(withJobs);
|
|
15174
15180
|
}
|
|
15181
|
+
async function measuredForecasts(env2) {
|
|
15182
|
+
const token = env2["DRISP_RUN_TOKEN"];
|
|
15183
|
+
const hubUrl = env2["DRISP_HUB_URL"];
|
|
15184
|
+
if (!token || !hubUrl) return void 0;
|
|
15185
|
+
try {
|
|
15186
|
+
const calibration = await DrispClient.delegated(
|
|
15187
|
+
hubUrl,
|
|
15188
|
+
token
|
|
15189
|
+
).calibration();
|
|
15190
|
+
return calibration["claude-code"];
|
|
15191
|
+
} catch {
|
|
15192
|
+
return void 0;
|
|
15193
|
+
}
|
|
15194
|
+
}
|
|
15175
15195
|
async function runBuildCommand(input) {
|
|
15176
15196
|
const stdout = input.stdout ?? process.stdout;
|
|
15177
15197
|
const stderr = input.stderr ?? process.stderr;
|
|
@@ -15179,7 +15199,8 @@ async function runBuildCommand(input) {
|
|
|
15179
15199
|
try {
|
|
15180
15200
|
let output;
|
|
15181
15201
|
switch (input.subcommand) {
|
|
15182
|
-
case "plan":
|
|
15202
|
+
case "plan": {
|
|
15203
|
+
const calibration = input.dependencies?.calibration ?? await measuredForecasts(env2);
|
|
15183
15204
|
output = runBuildPlan({
|
|
15184
15205
|
env: env2,
|
|
15185
15206
|
folder: input.cwd,
|
|
@@ -15187,9 +15208,11 @@ async function runBuildCommand(input) {
|
|
|
15187
15208
|
worktreesRoot: defaultWorktreesRoot(),
|
|
15188
15209
|
hostCapabilities: () => hostCapabilities(input.cwd),
|
|
15189
15210
|
pullRequests: githubPullRequests,
|
|
15211
|
+
...calibration ? { calibration } : {},
|
|
15190
15212
|
...input.dependencies
|
|
15191
15213
|
});
|
|
15192
15214
|
break;
|
|
15215
|
+
}
|
|
15193
15216
|
case "tick": {
|
|
15194
15217
|
requireEnv(env2, "DRISP_RUN_ID");
|
|
15195
15218
|
requireEnv(env2, "DRISP_RUNNER_ID");
|
package/dist/dashboard-daemon.js
CHANGED
package/dist/runner.js
CHANGED