@oss-autopilot/core 3.16.0 → 3.16.1

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.
@@ -15,6 +15,13 @@ function parsePositiveInt(value, settingName) {
15
15
  }
16
16
  return parsed;
17
17
  }
18
+ function parseNonNegativeInt(value, settingName) {
19
+ const parsed = Number(value);
20
+ if (!Number.isInteger(parsed) || parsed < 0) {
21
+ throw new ValidationError(`Invalid value for ${settingName}: "${value}". Must be a non-negative integer.`);
22
+ }
23
+ return parsed;
24
+ }
18
25
  /**
19
26
  * Interactive setup wizard or direct setting application.
20
27
  *
@@ -308,6 +315,26 @@ export async function runSetup(options) {
308
315
  results[key] = value || '(cleared)';
309
316
  break;
310
317
  }
318
+ case 'skipBroadWhenSufficientResults': {
319
+ // 0 is valid and meaningful ("always run the broad phase"), so this
320
+ // key allows zero unlike the positive-int keys above.
321
+ const threshold = parseNonNegativeInt(value, 'skipBroadWhenSufficientResults');
322
+ stateManager.updateConfig({ skipBroadWhenSufficientResults: threshold });
323
+ results[key] = String(threshold);
324
+ break;
325
+ }
326
+ case 'healthCheckFreshnessMinutes': {
327
+ const minutes = parsePositiveInt(value, 'healthCheckFreshnessMinutes');
328
+ stateManager.updateConfig({ healthCheckFreshnessMinutes: minutes });
329
+ results[key] = String(minutes);
330
+ break;
331
+ }
332
+ case 'reviewMaxPasses': {
333
+ const passes = parsePositiveInt(value, 'reviewMaxPasses');
334
+ stateManager.updateConfig({ reviewMaxPasses: passes });
335
+ results[key] = String(passes);
336
+ break;
337
+ }
311
338
  case 'complete': {
312
339
  if (value === 'true') {
313
340
  stateManager.markSetupComplete();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oss-autopilot/core",
3
- "version": "3.16.0",
3
+ "version": "3.16.1",
4
4
  "description": "CLI and core library for managing open source contributions",
5
5
  "type": "module",
6
6
  "bin": {