@ordewell/core 0.4.21 → 0.4.22

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/index.mjs CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  resolveTaskMode,
14
14
  runnerModesFrom,
15
15
  validatePlanModification
16
- } from "./chunk-QJ63PD5K.mjs";
16
+ } from "./chunk-MKUTJDT2.mjs";
17
17
  import {
18
18
  CHECKPOINT_TRUNCATE_LENGTH,
19
19
  UPDATABLE_FIELDS,
@@ -11003,7 +11003,7 @@ function runnerAssignment(catalog, current) {
11003
11003
  changes.thinkingEffort = thinkingEffort;
11004
11004
  }
11005
11005
  if (catalog.modes.length > 0) {
11006
- changes.taskMode = catalog.modes.some((m) => m.id === current?.taskMode) ? current.taskMode : catalog.modes[0].id;
11006
+ changes.taskMode = catalog.modes.some((m) => m.id === current?.taskMode) ? current.taskMode : catalog.defaultMode ?? catalog.modes[0].id;
11007
11007
  }
11008
11008
  return changes;
11009
11009
  }
@@ -12389,9 +12389,11 @@ Execution is RUNNING${locked.length ? ` \u2014 these tasks are locked: ${locked.
12389
12389
  }
12390
12390
  /** What a runner offers, as {@link runnerAssignment} needs it. Spawns the runner's CLI to list models. */
12391
12391
  async catalogFor(runner) {
12392
+ const modes = this.runnerModesFor([runner])[runner];
12392
12393
  return {
12393
12394
  models: (await this.modelResolver.modelsForRunners([runner]))[runner] ?? [],
12394
- modes: this.runnerModesFor([runner])[runner]
12395
+ modes,
12396
+ defaultMode: resolveDefaultMode(modes, this.config.autonomousMode)
12395
12397
  };
12396
12398
  }
12397
12399
  /**