@nmakarov/cli-toolkit 0.65.0 → 0.67.0

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/tasks.js CHANGED
@@ -1745,6 +1745,12 @@ var FileDatabase = class _FileDatabase {
1745
1745
  getCurrentVersion() {
1746
1746
  return this.currentVersion;
1747
1747
  }
1748
+ /**
1749
+ * Max retained version folders (used by harvest_sync.loaded_versions cap, etc.).
1750
+ */
1751
+ getMaxVersions() {
1752
+ return this.maxVersions;
1753
+ }
1748
1754
  /**
1749
1755
  * Get current metadata
1750
1756
  */
@@ -2757,8 +2763,18 @@ var LOGGER_RUNTIME_KEYS = [
2757
2763
  "progressThrottleMs"
2758
2764
  ];
2759
2765
  var CONTROL_LANE_TASK_NAMES = ["stopRunner", "stop", "setRuntimeParam", "setRunnerParam"];
2760
- function controlLaneTaskNames() {
2761
- return [...CONTROL_LANE_TASK_NAMES];
2766
+ function controlLaneTaskNames(extra) {
2767
+ const names = [...CONTROL_LANE_TASK_NAMES];
2768
+ if (extra == null || extra === "") return names;
2769
+ const more = Array.isArray(extra) ? extra : String(extra).split(",");
2770
+ const seen = new Set(names);
2771
+ for (const raw of more) {
2772
+ const n = String(raw ?? "").trim();
2773
+ if (!n || seen.has(n)) continue;
2774
+ seen.add(n);
2775
+ names.push(n);
2776
+ }
2777
+ return names;
2762
2778
  }
2763
2779
  function asPositiveInt(value, key, { min = 1 } = {}) {
2764
2780
  const n = Number(value);
@@ -3565,6 +3581,7 @@ async function runTasksLoop(context, options) {
3565
3581
  const queueName = options.queueName ?? "tasks";
3566
3582
  const target = options.target;
3567
3583
  const allowedTasks = normalizeAllowedTasks(options.allowedTasks);
3584
+ const controlLaneNames = controlLaneTaskNames(options.controlLaneTasks);
3568
3585
  const registry = normalizeRegistry(options.registry);
3569
3586
  const { tasksTable, historyTable } = queueToTableNames(queueName);
3570
3587
  if (!target) throw new Error("runTasksLoop: target is required");
@@ -3635,7 +3652,7 @@ async function runTasksLoop(context, options) {
3635
3652
  target,
3636
3653
  registry,
3637
3654
  10,
3638
- controlLaneTaskNames(),
3655
+ controlLaneNames,
3639
3656
  runnerIdentity
3640
3657
  );
3641
3658
  if (claimedControlTask) {