@drisp/cli 0.7.9 → 0.7.11

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.
@@ -8,7 +8,7 @@ import {
8
8
  installWorkflowPlugins,
9
9
  resolveWorkflow,
10
10
  writeGlobalConfig
11
- } from "./chunk-FYXEDUQ6.js";
11
+ } from "./chunk-XITT6UQX.js";
12
12
  import "./chunk-G3PMV62Z.js";
13
13
 
14
14
  // src/setup/steps/WorkflowInstallWizard.tsx
@@ -93,4 +93,4 @@ function WorkflowInstallWizard({ source, onDone }) {
93
93
  export {
94
94
  WorkflowInstallWizard as default
95
95
  };
96
- //# sourceMappingURL=WorkflowInstallWizard-FKASDA6N.js.map
96
+ //# sourceMappingURL=WorkflowInstallWizard-UVNJCK72.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runMachineRunners
3
- } from "./chunk-TWOJJ2JD.js";
3
+ } from "./chunk-YHXTTSJE.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-Z5KVWWZU.js.map
16
+ //# sourceMappingURL=chunk-RSJVWETP.js.map
@@ -21223,7 +21223,10 @@ import path6 from "path";
21223
21223
  // src/core/build/strings.ts
21224
21224
  var BUILD_STRINGS = {
21225
21225
  approvalQuestion: "Start building these issues?",
21226
- budgetPark: "This Build used its token budget. Stop it, then Build again to continue with a new budget.",
21226
+ /** How a token park opens; the app tells the park by it (root ADR-0011). */
21227
+ tokenParkLead: "This Build used its token budget.",
21228
+ /** How a tick-allowance park opens: more budget will not help, so the app offers Stop only. */
21229
+ tickParkLead: "This Build used its tick allowance.",
21227
21230
  templatePark: "Drisp was updated during this Build. Build again to re-plan.",
21228
21231
  notStarted: "Not started",
21229
21232
  waiting: "Waiting for child Runs.",
@@ -21241,8 +21244,23 @@ var BUILD_STRINGS = {
21241
21244
  workflowUnavailable: (identifier) => `The Runner has not listed the Workflow for ${identifier} yet.`,
21242
21245
  completedUnmerged: "The Run completed but its pull request is not merged and the issue is not Done in Linear.",
21243
21246
  hubUnreachable: (identifier) => `Drisp could not reach the Hub to start ${identifier}.`,
21244
- startRefused: (code) => `The Hub refused to start this issue's Run (${code}).`
21247
+ startRefused: (code) => `The Hub refused to start this issue's Run (${code}).`,
21248
+ /** The token park: what the Build used of its budget and what the next issue needs. */
21249
+ tokenPark: (park) => `${BUILD_STRINGS.tokenParkLead} Used ${tokens(park.used)} of ${tokens(park.tokenBudget)}, and the next issue, ${park.identifier}, is forecast at ${tokens(park.forecast)}.`,
21250
+ /** The token park when the Hub refused a start this CLI's own check allowed: the Hub counted more than it did. */
21251
+ tokenParkRefused: (identifier, forecast) => `${BUILD_STRINGS.tokenParkLead} The Hub refused to start the next issue, ${identifier}, forecast at ${tokens(forecast)}.`,
21252
+ /** The tick-allowance park: more budget will not help, so the app offers Stop only. */
21253
+ tickPark: (allowance) => `${BUILD_STRINGS.tickParkLead} The Orchestrator ran ${allowance} ticks. More budget will not help. Stop it, then Build again.`
21245
21254
  };
21255
+ function tokens(count) {
21256
+ const compact = (value, unit) => {
21257
+ const tenths = Math.round(value * 10) / 10;
21258
+ return `${Number.isInteger(tenths) ? tenths : tenths.toFixed(1)}${unit}`;
21259
+ };
21260
+ if (count >= 1e6) return compact(count / 1e6, "M");
21261
+ if (count >= 1e3) return compact(count / 1e3, "K");
21262
+ return String(count);
21263
+ }
21246
21264
  var GATES = [
21247
21265
  {
21248
21266
  title: "Explore",
@@ -22450,7 +22468,7 @@ function budgetTokens(memory) {
22450
22468
  function runUsage(memory) {
22451
22469
  const counted = budgetTokens(memory);
22452
22470
  if (counted === null) return null;
22453
- const whole = (tokens) => Number.isFinite(tokens) ? Math.min(Math.max(0, Math.round(tokens)), Number.MAX_SAFE_INTEGER) : 0;
22471
+ const whole = (tokens2) => Number.isFinite(tokens2) ? Math.min(Math.max(0, Math.round(tokens2)), Number.MAX_SAFE_INTEGER) : 0;
22454
22472
  return {
22455
22473
  counted: whole(counted),
22456
22474
  cacheRead: whole(memory.usage?.cacheRead ?? 0)
@@ -22523,8 +22541,8 @@ function readRestartContract(content, limit = DEFAULT_RESTART_TOKENS, expectedRu
22523
22541
  return null;
22524
22542
  if (expectedRunId && !text.split("\n").some((line) => line.trim() === `Run: ${expectedRunId}`))
22525
22543
  return null;
22526
- const tokens = estimateTokenCount(text);
22527
- return tokens <= limit ? { text, tokens } : null;
22544
+ const tokens2 = estimateTokenCount(text);
22545
+ return tokens2 <= limit ? { text, tokens: tokens2 } : null;
22528
22546
  }
22529
22547
  function restartInstructions(journalPath, runId, limit = DEFAULT_RESTART_TOKENS) {
22530
22548
  return `Maintain one ## Restart section in the Journal at ${journalPath} during this Workflow Run. Include Run: ${runId}, followed by these nonempty fields: ${fields.join(", ")}. Use none where appropriate. Update it after orientation and each meaningful work checkpoint, before large reads or risky operations; keep it within ${limit} estimated tokens. Preserve essential constraints and reference supporting evidence. Write changes atomically so interruption cannot leave a partial checkpoint. The Runner may replace your Agent Session at its context bound using only this section. Do not stop to request a Handover; continue working and declare the normal terminal marker when done.`;
@@ -24384,4 +24402,4 @@ export {
24384
24402
  compileWorkflowPlan,
24385
24403
  collectMcpServersWithOptions
24386
24404
  };
24387
- //# sourceMappingURL=chunk-FYXEDUQ6.js.map
24405
+ //# sourceMappingURL=chunk-XITT6UQX.js.map
@@ -56,7 +56,7 @@ import {
56
56
  verifyRendered,
57
57
  wakesFreshAfterHandover,
58
58
  workflowRegistryDir
59
- } from "./chunk-FYXEDUQ6.js";
59
+ } from "./chunk-XITT6UQX.js";
60
60
  import {
61
61
  __commonJS,
62
62
  __toESM
@@ -13086,6 +13086,28 @@ function classOfCap(declaredCap) {
13086
13086
  function forecastOfCap(declaredCap) {
13087
13087
  return SIZE_CLASS_FORECASTS[classOfCap(declaredCap)];
13088
13088
  }
13089
+ function attemptForecast(declaredCap) {
13090
+ const forecast = forecastOfCap(declaredCap);
13091
+ return declaredCap > 0 ? Math.min(declaredCap, forecast) : forecast;
13092
+ }
13093
+ function attemptCost(attempt) {
13094
+ const forecast = attemptForecast(attempt.tokenCap);
13095
+ if (attempt.closed) return attempt.spent ?? forecast;
13096
+ return Math.max(forecast, attempt.spent ?? 0);
13097
+ }
13098
+ function budgetCheck(input) {
13099
+ const used = input.attempts.reduce((sum, attempt) => sum + attemptCost(attempt), 0);
13100
+ return { used, fits: used + input.next <= input.tokenBudget };
13101
+ }
13102
+ var classCalibrationSchema = external_exports.strictObject({
13103
+ S: external_exports.strictObject({ forecast: external_exports.number(), runs: external_exports.number() }).optional(),
13104
+ M: external_exports.strictObject({ forecast: external_exports.number(), runs: external_exports.number() }).optional(),
13105
+ L: external_exports.strictObject({ forecast: external_exports.number(), runs: external_exports.number() }).optional()
13106
+ });
13107
+ var calibrationSchema = external_exports.record(external_exports.string(), classCalibrationSchema);
13108
+ function forecastOfClass(sizeClass, calibration) {
13109
+ return calibration?.[sizeClass]?.forecast ?? SIZE_CLASS_FORECASTS[sizeClass];
13110
+ }
13089
13111
 
13090
13112
  // ../../packages/protocol/src/v2.ts
13091
13113
  var protocolVersion = { major: 2, minor: 3 };
@@ -13323,6 +13345,16 @@ var commandSchema = external_exports.strictObject({
13323
13345
  kind: external_exports.literal("resume"),
13324
13346
  interruptionId: id,
13325
13347
  guidance: external_exports.string().max(131072).optional()
13348
+ }),
13349
+ /**
13350
+ * A member rewrites an Orchestrator's `delegation.tokenBudget` (root ADR-0011), never below what its children
13351
+ * used. With `resume`, a parked Orchestrator with no live child is resumed when the value is strictly greater.
13352
+ * Hub-only: never delivered to a Runner.
13353
+ */
13354
+ external_exports.strictObject({
13355
+ kind: external_exports.literal("setBudget"),
13356
+ tokenBudget: delegationSchema.shape.tokenBudget,
13357
+ resume: external_exports.boolean().optional()
13326
13358
  })
13327
13359
  ])
13328
13360
  });
@@ -14915,7 +14947,7 @@ async function restoreCheckpoint(store, input) {
14915
14947
 
14916
14948
  // ../../modules/runtime/src/software-version.ts
14917
14949
  import "fs";
14918
- var runnerSoftwareVersion = true ? "0.7.9" : JSON.parse(readFileSync2(new URL("../../../apps/cli/package.json", import.meta.url), "utf8")).version;
14950
+ var runnerSoftwareVersion = true ? "0.7.11" : JSON.parse(readFileSync2(new URL("../../../apps/cli/package.json", import.meta.url), "utf8")).version;
14919
14951
 
14920
14952
  // ../../modules/runtime/src/connection.ts
14921
14953
  var runnerCapabilities = [
@@ -20314,6 +20346,7 @@ var SKIP_REASONS = [
20314
20346
  "not-ready-for-agent"
20315
20347
  ];
20316
20348
  var count = external_exports.number().int().nonnegative();
20349
+ var calibratedClass = external_exports.strictObject({ forecast: count, runs: count });
20317
20350
  var issueEntrySchema = external_exports.strictObject({
20318
20351
  id: external_exports.string(),
20319
20352
  identifier: external_exports.string(),
@@ -20349,7 +20382,13 @@ var buildPlanSchema = external_exports.strictObject({
20349
20382
  external_exports.strictObject({
20350
20383
  tokenBudget: count,
20351
20384
  orchestratorCap: count,
20352
- forecast: count
20385
+ forecast: count,
20386
+ /** The classes whose forecast the Hub measured from finished Runs (DRI-244); absent when none was. */
20387
+ calibrated: external_exports.strictObject({
20388
+ S: calibratedClass.optional(),
20389
+ M: calibratedClass.optional(),
20390
+ L: calibratedClass.optional()
20391
+ }).optional()
20353
20392
  }),
20354
20393
  external_exports.strictObject({
20355
20394
  tokenBudget: count,
@@ -20761,7 +20800,16 @@ function planBuild(context) {
20761
20800
  });
20762
20801
  }
20763
20802
  const groups = layers.map((issues, index) => ({ index: index + 1, issues }));
20764
- const forecast = groups.flatMap((group2) => group2.issues).reduce((sum, entry) => sum + SIZE_CLASS_FORECASTS[entry.sizeClass], 0);
20803
+ const forecast = groups.flatMap((group2) => group2.issues).reduce(
20804
+ (sum, entry) => sum + forecastOfClass(entry.sizeClass, context.calibration),
20805
+ 0
20806
+ );
20807
+ const inPlan = new Set(groups.flatMap((g) => g.issues.map((e) => e.sizeClass)));
20808
+ const calibrated = Object.fromEntries(
20809
+ ["S", "M", "L"].filter(
20810
+ (sizeClass) => inPlan.has(sizeClass) && context.calibration?.[sizeClass]
20811
+ ).map((sizeClass) => [sizeClass, context.calibration[sizeClass]])
20812
+ );
20765
20813
  return {
20766
20814
  status: "planned",
20767
20815
  workflows,
@@ -20777,7 +20825,8 @@ function planBuild(context) {
20777
20825
  budget: {
20778
20826
  tokenBudget: defaultBudget(forecast),
20779
20827
  orchestratorCap: ORCHESTRATOR_LOOP.maxRunTokens,
20780
- forecast
20828
+ forecast,
20829
+ ...Object.keys(calibrated).length > 0 ? { calibrated } : {}
20781
20830
  },
20782
20831
  groups,
20783
20832
  skipped,
@@ -22145,7 +22194,9 @@ export {
22145
22194
  RUN_EXIT_CODE,
22146
22195
  localAnswerDecision,
22147
22196
  runExec,
22148
- forecastOfCap,
22197
+ attemptForecast,
22198
+ budgetCheck,
22199
+ calibrationSchema,
22149
22200
  repositoryBindingSchema,
22150
22201
  commandSchema,
22151
22202
  historyRecordSchema,
@@ -22204,4 +22255,4 @@ export {
22204
22255
  runMachineRunners,
22205
22256
  writeIdentityOnce
22206
22257
  };
22207
- //# sourceMappingURL=chunk-TWOJJ2JD.js.map
22258
+ //# sourceMappingURL=chunk-YHXTTSJE.js.map
package/dist/cli.js CHANGED
@@ -10,13 +10,16 @@ import {
10
10
  ServiceNotEnabledError,
11
11
  approvalAnswer,
12
12
  attachRuntimeEventLoop,
13
+ attemptForecast,
13
14
  behindMain,
14
15
  bootstrapRuntimeConfig,
16
+ budgetCheck,
15
17
  buildApiKeyHelperSettings,
16
18
  buildPhaseFeedEvent,
17
19
  buildPlanSchema,
18
20
  buildPostByToolUseId,
19
21
  buildProbeConfigs,
22
+ calibrationSchema,
20
23
  centerAnsi,
21
24
  childWorktreePath,
22
25
  classifyFailure,
@@ -48,7 +51,6 @@ import {
48
51
  finalizePlan,
49
52
  fit,
50
53
  fitAnsi,
51
- forecastOfCap,
52
54
  forgetRunner,
53
55
  formatClock,
54
56
  formatProbeCommand,
@@ -142,7 +144,7 @@ import {
142
144
  visualPositionToOffset,
143
145
  wrapText,
144
146
  writeIdentityOnce
145
- } from "./chunk-TWOJJ2JD.js";
147
+ } from "./chunk-YHXTTSJE.js";
146
148
  import {
147
149
  generateId as generateId2
148
150
  } from "./chunk-PQIB66SG.js";
@@ -201,7 +203,7 @@ import {
201
203
  workflowRegistryDir,
202
204
  writeGlobalConfig,
203
205
  writeProjectConfig
204
- } from "./chunk-FYXEDUQ6.js";
206
+ } from "./chunk-XITT6UQX.js";
205
207
  import {
206
208
  __toESM
207
209
  } from "./chunk-G3PMV62Z.js";
@@ -13775,7 +13777,8 @@ function runBuildPlan(deps) {
13775
13777
  folder: deps.folder,
13776
13778
  runnerId,
13777
13779
  templateVersion,
13778
- layout
13780
+ layout,
13781
+ ...deps.calibration ? { calibration: deps.calibration } : {}
13779
13782
  });
13780
13783
  if (result.status === "failed") return fail(result.reason);
13781
13784
  if (result.status === "needs_fills")
@@ -13901,6 +13904,10 @@ var DrispClient = class _DrispClient {
13901
13904
  await this.request(`/runs/${encodeURIComponent(runId)}/artifacts/${encodeURIComponent(name)}`)
13902
13905
  );
13903
13906
  }
13907
+ /** The measured size-class forecasts per harness (root ADR-0011): only classes with enough finished Runs appear. */
13908
+ async calibration() {
13909
+ return calibrationSchema.parse(await this.request("/calibration"));
13910
+ }
13904
13911
  async run(runId) {
13905
13912
  return runViewSchema.parse(await this.request(`/runs/${encodeURIComponent(runId)}`));
13906
13913
  }
@@ -14263,7 +14270,7 @@ function buildLimits(own, delegation) {
14263
14270
  return {
14264
14271
  ...own,
14265
14272
  maxChildren: Math.min(own.maxChildren, delegation.maxChildren),
14266
- tokenBudget: Math.min(own.tokenBudget, delegation.tokenBudget)
14273
+ tokenBudget: delegation.tokenBudget
14267
14274
  };
14268
14275
  }
14269
14276
  function occupies(view) {
@@ -14308,8 +14315,8 @@ function assessTick(facts) {
14308
14315
  ].sort((a, b) => a.n - b.n);
14309
14316
  }
14310
14317
  }
14311
- for (const attempts of Object.values(state.attempts))
14312
- for (const attempt of attempts) {
14318
+ for (const attempts2 of Object.values(state.attempts))
14319
+ for (const attempt of attempts2) {
14313
14320
  const view = views.get(attempt.runId);
14314
14321
  if (view?.closed && !attempt.outcome) attempt.outcome = outcomeOf(view);
14315
14322
  }
@@ -14335,8 +14342,8 @@ function assessTick(facts) {
14335
14342
  const repair = [];
14336
14343
  const repaired = new Set(state.repaired ?? []);
14337
14344
  for (const entry of entries) {
14338
- const attempts = attemptsOf(entry.id);
14339
- const newest = attempts.at(-1);
14345
+ const attempts2 = attemptsOf(entry.id);
14346
+ const newest = attempts2.at(-1);
14340
14347
  const view = newest && views.get(newest.runId);
14341
14348
  const linear = issues.get(entry.id)?.state.type;
14342
14349
  const statusOf = () => {
@@ -14368,7 +14375,7 @@ function assessTick(facts) {
14368
14375
  if (newest?.outcome === "template_mismatch") return "replan";
14369
14376
  if (newest?.outcome === "completed")
14370
14377
  state.needsPerson[entry.id] ??= entry.profile === "investigation" ? "The investigation ended without marking its accepted findings Done in Linear. Review its evidence." : BUILD_STRINGS.completedUnmerged;
14371
- if (state.needsPerson[entry.id] || newest && !mayRetry(attempts))
14378
+ if (state.needsPerson[entry.id] || newest && !mayRetry(attempts2))
14372
14379
  return "needs_person";
14373
14380
  const blockers = [
14374
14381
  .../* @__PURE__ */ new Set([
@@ -14393,22 +14400,43 @@ function assessTick(facts) {
14393
14400
  delete state.needsPerson[entry.id];
14394
14401
  }
14395
14402
  if (repaired.size > 0) state.repaired = [...repaired];
14396
- let parkReason = facts.templateVersion !== state.templateVersion ? "template" : state.tickCount >= facts.limits.tickAllowance ? "budget" : void 0;
14403
+ const tokenBudget = facts.limits.tokenBudget;
14404
+ const attempts = [
14405
+ ...facts.children.map((view) => ({
14406
+ tokenCap: view.parent?.tokenCap ?? Number.NaN,
14407
+ closed: view.closed
14408
+ })),
14409
+ ...Object.values(state.attempts).flat().filter((attempt) => !views.has(attempt.runId)).map((attempt) => ({ tokenCap: attempt.tokenCap, closed: false }))
14410
+ ];
14411
+ let park = facts.templateVersion !== state.templateVersion ? { reason: "template", message: BUILD_STRINGS.templatePark } : state.tickCount >= facts.limits.tickAllowance ? {
14412
+ reason: "ticks",
14413
+ message: BUILD_STRINGS.tickPark(facts.limits.tickAllowance)
14414
+ } : void 0;
14397
14415
  const occupying = entries.filter((entry) => {
14398
14416
  const newest = attemptsOf(entry.id).at(-1);
14399
14417
  return newest !== void 0 && occupies(views.get(newest.runId));
14400
14418
  }).length;
14401
14419
  const queue = [];
14402
- if (!parkReason) {
14403
- let committed = Object.values(state.attempts).flat().reduce((sum, attempt) => sum + forecastOfCap(attempt.tokenCap), 0);
14420
+ if (!park) {
14421
+ const admitted = [...attempts];
14404
14422
  for (const entry of entries) {
14405
14423
  if (status.get(entry.id) !== "ready") continue;
14406
- if (committed + forecastOfCap(entry.tokenCap) > facts.limits.tokenBudget) {
14407
- parkReason = "budget";
14424
+ const next = attemptForecast(entry.tokenCap);
14425
+ const check = budgetCheck({ tokenBudget, attempts: admitted, next });
14426
+ if (!check.fits) {
14427
+ park = {
14428
+ reason: "tokens",
14429
+ message: BUILD_STRINGS.tokenPark({
14430
+ used: check.used,
14431
+ tokenBudget,
14432
+ identifier: entry.identifier,
14433
+ forecast: next
14434
+ })
14435
+ };
14408
14436
  break;
14409
14437
  }
14410
14438
  queue.push(entry);
14411
- committed += forecastOfCap(entry.tokenCap);
14439
+ admitted.push({ tokenCap: entry.tokenCap, closed: false });
14412
14440
  }
14413
14441
  }
14414
14442
  return {
@@ -14417,7 +14445,7 @@ function assessTick(facts) {
14417
14445
  repair,
14418
14446
  queue,
14419
14447
  slots: Math.max(0, facts.limits.maxChildren - occupying),
14420
- ...parkReason ? { parkReason } : {}
14448
+ ...park ? { park } : {}
14421
14449
  };
14422
14450
  }
14423
14451
  function tickAction(input) {
@@ -14427,12 +14455,7 @@ function tickAction(input) {
14427
14455
  const remaining = input.entries.some(
14428
14456
  (entry) => ["ready", "pending"].includes(input.status.get(entry.id))
14429
14457
  );
14430
- if (input.parkReason && remaining)
14431
- return {
14432
- action: "park",
14433
- reason: input.parkReason,
14434
- message: input.parkReason === "budget" ? BUILD_STRINGS.budgetPark : BUILD_STRINGS.templatePark
14435
- };
14458
+ if (input.park && remaining) return { action: "park", ...input.park };
14436
14459
  if (live.length > 0) return { action: "wait" };
14437
14460
  const done = input.entries.filter(
14438
14461
  (entry) => input.status.get(entry.id) === "done"
@@ -14574,7 +14597,7 @@ async function runBuildTick(deps) {
14574
14597
  state: stored,
14575
14598
  children: children.runs,
14576
14599
  templateVersion,
14577
- // The approved plan's budget (the member's, once it is editable) narrowed by what the Hub enforces.
14600
+ // The Hub Run's budget, read each tick (a member may change it); the plan's binds only a Run without delegation.
14578
14601
  limits: buildLimits(
14579
14602
  { ...ORCHESTRATOR_LIMITS, tokenBudget: plan.budget.tokenBudget },
14580
14603
  parent.delegation
@@ -14585,7 +14608,7 @@ async function runBuildTick(deps) {
14585
14608
  now: deps.now().toISOString()
14586
14609
  });
14587
14610
  const { state, status } = assessment;
14588
- let parkReason = assessment.parkReason;
14611
+ let park = assessment.park;
14589
14612
  const record = () => {
14590
14613
  writeFile(statePath, json(state));
14591
14614
  const files = [path7.join(relativePlanDir, "build-state.json")];
@@ -14683,7 +14706,13 @@ async function runBuildTick(deps) {
14683
14706
  reason: BUILD_STRINGS.hubUnreachable(entry.identifier)
14684
14707
  });
14685
14708
  else if (result.kind === "budget") {
14686
- parkReason = "budget";
14709
+ park = {
14710
+ reason: "tokens",
14711
+ message: BUILD_STRINGS.tokenParkRefused(
14712
+ entry.identifier,
14713
+ attemptForecast(entry.tokenCap)
14714
+ )
14715
+ };
14687
14716
  break;
14688
14717
  } else {
14689
14718
  state.needsPerson[entry.id] = BUILD_STRINGS.startRefused(result.code);
@@ -14722,7 +14751,7 @@ async function runBuildTick(deps) {
14722
14751
  status,
14723
14752
  children: children.runs,
14724
14753
  started,
14725
- ...parkReason ? { parkReason } : {}
14754
+ ...park ? { park } : {}
14726
14755
  });
14727
14756
  }
14728
14757
  function locate(deps, entry, branchName) {
@@ -15172,6 +15201,20 @@ function runBuildChecks(cwd, deps) {
15172
15201
  }));
15173
15202
  return evaluateRemoteChecks(withJobs);
15174
15203
  }
15204
+ async function measuredForecasts(env2) {
15205
+ const token = env2["DRISP_RUN_TOKEN"];
15206
+ const hubUrl = env2["DRISP_HUB_URL"];
15207
+ if (!token || !hubUrl) return void 0;
15208
+ try {
15209
+ const calibration = await DrispClient.delegated(
15210
+ hubUrl,
15211
+ token
15212
+ ).calibration();
15213
+ return calibration["claude-code"];
15214
+ } catch {
15215
+ return void 0;
15216
+ }
15217
+ }
15175
15218
  async function runBuildCommand(input) {
15176
15219
  const stdout = input.stdout ?? process.stdout;
15177
15220
  const stderr = input.stderr ?? process.stderr;
@@ -15179,7 +15222,8 @@ async function runBuildCommand(input) {
15179
15222
  try {
15180
15223
  let output;
15181
15224
  switch (input.subcommand) {
15182
- case "plan":
15225
+ case "plan": {
15226
+ const calibration = input.dependencies?.calibration ?? await measuredForecasts(env2);
15183
15227
  output = runBuildPlan({
15184
15228
  env: env2,
15185
15229
  folder: input.cwd,
@@ -15187,9 +15231,11 @@ async function runBuildCommand(input) {
15187
15231
  worktreesRoot: defaultWorktreesRoot(),
15188
15232
  hostCapabilities: () => hostCapabilities(input.cwd),
15189
15233
  pullRequests: githubPullRequests,
15234
+ ...calibration ? { calibration } : {},
15190
15235
  ...input.dependencies
15191
15236
  });
15192
15237
  break;
15238
+ }
15193
15239
  case "tick": {
15194
15240
  requireEnv(env2, "DRISP_RUN_ID");
15195
15241
  requireEnv(env2, "DRISP_RUNNER_ID");
@@ -16323,7 +16369,7 @@ Available commands: ${[...KNOWN_COMMANDS].join(", ")}`
16323
16369
  await exitWith(1);
16324
16370
  return;
16325
16371
  }
16326
- const { default: WorkflowInstallWizard } = await import("./WorkflowInstallWizard-FKASDA6N.js");
16372
+ const { default: WorkflowInstallWizard } = await import("./WorkflowInstallWizard-UVNJCK72.js");
16327
16373
  const { waitUntilExit } = render(
16328
16374
  /* @__PURE__ */ jsx24(
16329
16375
  WorkflowInstallWizard,
@@ -1,6 +1,6 @@
1
- import "./chunk-Z5KVWWZU.js";
2
- import "./chunk-TWOJJ2JD.js";
1
+ import "./chunk-RSJVWETP.js";
2
+ import "./chunk-YHXTTSJE.js";
3
3
  import "./chunk-PQIB66SG.js";
4
- import "./chunk-FYXEDUQ6.js";
4
+ import "./chunk-XITT6UQX.js";
5
5
  import "./chunk-G3PMV62Z.js";
6
6
  //# sourceMappingURL=dashboard-daemon.js.map
package/dist/runner.js CHANGED
@@ -1,6 +1,6 @@
1
- import "./chunk-Z5KVWWZU.js";
2
- import "./chunk-TWOJJ2JD.js";
1
+ import "./chunk-RSJVWETP.js";
2
+ import "./chunk-YHXTTSJE.js";
3
3
  import "./chunk-PQIB66SG.js";
4
- import "./chunk-FYXEDUQ6.js";
4
+ import "./chunk-XITT6UQX.js";
5
5
  import "./chunk-G3PMV62Z.js";
6
6
  //# sourceMappingURL=runner.js.map
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "hooks",
18
18
  "dashboard"
19
19
  ],
20
- "version": "0.7.9",
20
+ "version": "0.7.11",
21
21
  "license": "MIT",
22
22
  "bin": {
23
23
  "athena": "dist/cli.js",