@oss-autopilot/core 1.16.1 → 1.17.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.
Files changed (58) hide show
  1. package/dist/cli-registry.js +53 -11
  2. package/dist/cli.bundle.cjs +82 -69
  3. package/dist/cli.js +22 -10
  4. package/dist/commands/comments.js +38 -20
  5. package/dist/commands/config.d.ts +9 -2
  6. package/dist/commands/config.js +12 -3
  7. package/dist/commands/daily.d.ts +3 -1
  8. package/dist/commands/daily.js +126 -37
  9. package/dist/commands/dashboard-data.d.ts +26 -2
  10. package/dist/commands/dashboard-data.js +45 -19
  11. package/dist/commands/dashboard-server.d.ts +1 -1
  12. package/dist/commands/dashboard-server.js +109 -20
  13. package/dist/commands/dismiss.js +4 -1
  14. package/dist/commands/doctor.d.ts +49 -0
  15. package/dist/commands/doctor.js +358 -0
  16. package/dist/commands/index.d.ts +2 -0
  17. package/dist/commands/index.js +2 -0
  18. package/dist/commands/move.d.ts +1 -2
  19. package/dist/commands/move.js +8 -4
  20. package/dist/commands/read.js +2 -1
  21. package/dist/commands/search.d.ts +0 -18
  22. package/dist/commands/search.js +38 -1
  23. package/dist/commands/setup.js +42 -2
  24. package/dist/commands/shelve.js +4 -1
  25. package/dist/commands/skip-add.js +1 -1
  26. package/dist/commands/startup.js +7 -3
  27. package/dist/commands/track.js +2 -1
  28. package/dist/commands/vet-list.d.ts +23 -2
  29. package/dist/commands/vet-list.js +57 -10
  30. package/dist/core/anti-llm-policy.d.ts +5 -0
  31. package/dist/core/anti-llm-policy.js +5 -0
  32. package/dist/core/ci-analysis.js +6 -1
  33. package/dist/core/config-registry.d.ts +44 -0
  34. package/dist/core/config-registry.js +286 -0
  35. package/dist/core/dashboard-data-schema.d.ts +78 -0
  36. package/dist/core/dashboard-data-schema.js +80 -0
  37. package/dist/core/errors.d.ts +14 -0
  38. package/dist/core/errors.js +22 -0
  39. package/dist/core/http-cache.d.ts +8 -1
  40. package/dist/core/http-cache.js +59 -1
  41. package/dist/core/index.d.ts +3 -1
  42. package/dist/core/index.js +3 -1
  43. package/dist/core/maintainer-analysis.js +9 -3
  44. package/dist/core/pr-monitor.d.ts +7 -0
  45. package/dist/core/pr-monitor.js +16 -3
  46. package/dist/core/repo-score-manager.d.ts +17 -3
  47. package/dist/core/repo-score-manager.js +48 -19
  48. package/dist/core/state-persistence.d.ts +14 -1
  49. package/dist/core/state-persistence.js +24 -2
  50. package/dist/core/state-schema.d.ts +2 -0
  51. package/dist/core/state-schema.js +5 -0
  52. package/dist/core/state.d.ts +26 -2
  53. package/dist/core/state.js +50 -5
  54. package/dist/core/status-determination.d.ts +16 -0
  55. package/dist/core/status-determination.js +44 -11
  56. package/dist/formatters/json.d.ts +40 -2
  57. package/dist/formatters/json.js +1 -0
  58. package/package.json +1 -1
@@ -97,7 +97,7 @@ export const commands = [
97
97
  .command('status')
98
98
  .description('Show current status and stats')
99
99
  .option('--json', 'Output as JSON')
100
- .option('--offline', 'Use cached data only (no GitHub API calls)')
100
+ .option('--offline', 'Show cache-freshness metadata (lastUpdated). Status always reads local state — no GitHub API calls are made either way.')
101
101
  .action((options) => executeAction(options, async () => {
102
102
  const { runStatus } = await import('./commands/status.js');
103
103
  return runStatus({ offline: options.offline });
@@ -109,7 +109,7 @@ export const commands = [
109
109
  console.log(`Needs Response: ${data.stats.needsResponse}`);
110
110
  if (data.offline) {
111
111
  console.log(`\nLast Updated: ${data.lastUpdated || 'Never'}`);
112
- console.log('(Offline mode: showing cached data)');
112
+ console.log('(Status reads from local state — no GitHub API calls)');
113
113
  }
114
114
  else {
115
115
  console.log(`\nLast Run: ${data.lastRunAt || 'Never'}`);
@@ -460,8 +460,22 @@ export const commands = [
460
460
  .command('config [key] [value]')
461
461
  .description('Show or update configuration')
462
462
  .option('--json', 'Output as JSON')
463
- .action((key, value, options) => executeAction(options, async () => (await import('./commands/config.js')).runConfig({ key, value }), (data) => {
464
- if ('config' in data) {
463
+ .option('--list-keys', 'List every known config key with descriptions')
464
+ .action((key, value, options) => executeAction(options, async () => (await import('./commands/config.js')).runConfig({
465
+ key,
466
+ value,
467
+ listKeys: options.listKeys,
468
+ }), (data) => {
469
+ if ('keys' in data) {
470
+ console.log('\nConfig keys\n');
471
+ for (const def of data.keys) {
472
+ const flag = def.settableVia === 'auto' ? '(auto)' : `[${def.settableVia}]`;
473
+ console.log(` ${def.key.padEnd(28)} ${flag.padEnd(10)} ${def.description}`);
474
+ console.log(` ${''.padEnd(28)} ${''.padEnd(10)} value: ${def.valueHint}`);
475
+ }
476
+ console.log('');
477
+ }
478
+ else if ('config' in data) {
465
479
  console.log('\n\u2699\ufe0f Current Configuration:\n');
466
480
  console.log(JSON.stringify(data.config, null, 2));
467
481
  }
@@ -626,12 +640,13 @@ export const commands = [
626
640
  },
627
641
  // ── Check Integration ──────────────────────────────────────────────────
628
642
  {
629
- name: 'check-integration',
643
+ name: 'orphan-files',
630
644
  localOnly: true,
631
645
  register(program) {
632
646
  program
633
- .command('check-integration')
634
- .description('Detect new files not referenced by the codebase')
647
+ .command('orphan-files')
648
+ .alias('check-integration')
649
+ .description('Detect new files on this branch that no other file references')
635
650
  .option('--base <branch>', 'Base branch to compare against', 'main')
636
651
  .option('--json', 'Output as JSON')
637
652
  .action((options) => executeAction(options, async () => (await import('./commands/check-integration.js')).runCheckIntegration({ base: options.base }), (data) => {
@@ -657,6 +672,28 @@ export const commands = [
657
672
  }));
658
673
  },
659
674
  },
675
+ // ── Doctor ─────────────────────────────────────────────────────────────
676
+ {
677
+ name: 'doctor',
678
+ localOnly: true,
679
+ register(program) {
680
+ program
681
+ .command('doctor')
682
+ .description('Run a system-health diagnostic (token, bundle, state, scout, rate limit)')
683
+ .option('--json', 'Output as JSON')
684
+ .action((options) => executeAction(options, async () => (await import('./commands/doctor.js')).runDoctor(), (data) => {
685
+ console.log('\nSystem health\n');
686
+ for (const check of data.checks) {
687
+ const icon = check.status === 'ok' ? '[OK] ' : check.status === 'warning' ? '[WARN] ' : '[ERR] ';
688
+ console.log(`${icon}${check.name}: ${check.message}`);
689
+ if (check.remediation) {
690
+ console.log(` ↳ ${check.remediation}`);
691
+ }
692
+ }
693
+ console.log(`\n${data.summary.ok} ok / ${data.summary.warnings} warning / ${data.summary.errors} error\n`);
694
+ }));
695
+ },
696
+ },
660
697
  // ── Local Repos ────────────────────────────────────────────────────────
661
698
  {
662
699
  name: 'local-repos',
@@ -726,6 +763,11 @@ export const commands = [
726
763
  },
727
764
  },
728
765
  // ── Shelve ─────────────────────────────────────────────────────────────
766
+ // Delegates to runShelve so the CLI emits the same `ShelveOutput`
767
+ // ({shelved, url}) as the library export + MCP tool. Previously it called
768
+ // runMove and emitted `MoveOutput` ({url, target, description}), which
769
+ // drifted from the pinned contract test and broke plugin consumers
770
+ // reading `data.shelved`. See issue #1037.
729
771
  {
730
772
  name: 'shelve',
731
773
  localOnly: true,
@@ -734,8 +776,8 @@ export const commands = [
734
776
  .command('shelve <pr-url>')
735
777
  .description('Shelve a PR (exclude from capacity and actionable issues)')
736
778
  .option('--json', 'Output as JSON')
737
- .action((prUrl, options) => executeAction(options, async () => (await import('./commands/move.js')).runMove({ prUrl, target: 'shelved' }), (data) => {
738
- console.log(data.description);
779
+ .action((prUrl, options) => executeAction(options, async () => (await import('./commands/shelve.js')).runShelve({ prUrl }), (data) => {
780
+ console.log(data.shelved ? `Shelved ${data.url}` : `Already shelved: ${data.url}`);
739
781
  }));
740
782
  },
741
783
  },
@@ -748,8 +790,8 @@ export const commands = [
748
790
  .command('unshelve <pr-url>')
749
791
  .description('Unshelve a PR (include in capacity and actionable issues again)')
750
792
  .option('--json', 'Output as JSON')
751
- .action((prUrl, options) => executeAction(options, async () => (await import('./commands/move.js')).runMove({ prUrl, target: 'auto' }), (data) => {
752
- console.log(data.description);
793
+ .action((prUrl, options) => executeAction(options, async () => (await import('./commands/shelve.js')).runUnshelve({ prUrl }), (data) => {
794
+ console.log(data.unshelved ? `Unshelved ${data.url}` : `Not currently shelved: ${data.url}`);
753
795
  }));
754
796
  },
755
797
  },