@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.cjs CHANGED
@@ -1831,6 +1831,12 @@ var FileDatabase = class _FileDatabase {
1831
1831
  getCurrentVersion() {
1832
1832
  return this.currentVersion;
1833
1833
  }
1834
+ /**
1835
+ * Max retained version folders (used by harvest_sync.loaded_versions cap, etc.).
1836
+ */
1837
+ getMaxVersions() {
1838
+ return this.maxVersions;
1839
+ }
1834
1840
  /**
1835
1841
  * Get current metadata
1836
1842
  */
@@ -2843,8 +2849,18 @@ var LOGGER_RUNTIME_KEYS = [
2843
2849
  "progressThrottleMs"
2844
2850
  ];
2845
2851
  var CONTROL_LANE_TASK_NAMES = ["stopRunner", "stop", "setRuntimeParam", "setRunnerParam"];
2846
- function controlLaneTaskNames() {
2847
- return [...CONTROL_LANE_TASK_NAMES];
2852
+ function controlLaneTaskNames(extra) {
2853
+ const names = [...CONTROL_LANE_TASK_NAMES];
2854
+ if (extra == null || extra === "") return names;
2855
+ const more = Array.isArray(extra) ? extra : String(extra).split(",");
2856
+ const seen = new Set(names);
2857
+ for (const raw of more) {
2858
+ const n = String(raw ?? "").trim();
2859
+ if (!n || seen.has(n)) continue;
2860
+ seen.add(n);
2861
+ names.push(n);
2862
+ }
2863
+ return names;
2848
2864
  }
2849
2865
  function asPositiveInt(value, key, { min = 1 } = {}) {
2850
2866
  const n = Number(value);
@@ -3651,6 +3667,7 @@ async function runTasksLoop(context, options) {
3651
3667
  const queueName = options.queueName ?? "tasks";
3652
3668
  const target = options.target;
3653
3669
  const allowedTasks = normalizeAllowedTasks(options.allowedTasks);
3670
+ const controlLaneNames = controlLaneTaskNames(options.controlLaneTasks);
3654
3671
  const registry = normalizeRegistry(options.registry);
3655
3672
  const { tasksTable, historyTable } = queueToTableNames(queueName);
3656
3673
  if (!target) throw new Error("runTasksLoop: target is required");
@@ -3721,7 +3738,7 @@ async function runTasksLoop(context, options) {
3721
3738
  target,
3722
3739
  registry,
3723
3740
  10,
3724
- controlLaneTaskNames(),
3741
+ controlLaneNames,
3725
3742
  runnerIdentity
3726
3743
  );
3727
3744
  if (claimedControlTask) {