@oss-autopilot/core 3.21.1 → 3.22.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.
@@ -104,10 +104,10 @@ function printRepos(repos) {
104
104
  }
105
105
  export const commands = [
106
106
  // ── Manifest (#1190) ───────────────────────────────────────────────────
107
- // Lets the plugin's session-start hook verify CLI/plugin contract drift —
108
- // it diffs the registered commands against `.claude-plugin/expected-cli-contract.json`
109
- // and warns when the markdown layer references commands the CLI no longer
110
- // exposes. Local-only: no GitHub access needed.
107
+ // Exposes the registered commands for CLI/plugin contract checks —
108
+ // cli-registry.docs.test.ts diffs them against `.claude-plugin/expected-cli-contract.json`
109
+ // at CI time and fails when the markdown layer references commands the CLI no
110
+ // longer exposes. Local-only: no GitHub access needed.
111
111
  {
112
112
  name: 'manifest',
113
113
  localOnly: true,
@@ -1330,6 +1330,75 @@ export const commands = [
1330
1330
  });
1331
1331
  },
1332
1332
  },
1333
+ // ── Overnight (#1574) ─────────────────────────────────────────────────
1334
+ {
1335
+ name: 'overnight',
1336
+ register(program) {
1337
+ const group = program
1338
+ .command('overnight')
1339
+ .description('Overnight prepare-and-queue run: daily check, morning report, no external side effects (#1574)');
1340
+ group
1341
+ .command('run', { isDefault: true })
1342
+ .description('Run the check, bucket items into prepare vs judgment, write the morning report')
1343
+ .option('--json', 'Output as JSON')
1344
+ .action(async (options) => {
1345
+ await executeAction(options, async () => (await import('./commands/overnight.js')).runOvernight(), (data) => {
1346
+ console.log(`Overnight report: ${data.reportPath}`);
1347
+ console.log(` ${data.prepare.length} to prepare, ${data.judgment.length} need your judgment`);
1348
+ if (data.carriedPrepared > 0)
1349
+ console.log(` ${data.carriedPrepared} branch(es) carried over from an earlier run today`);
1350
+ if (data.failures.length > 0)
1351
+ console.log(` ${data.failures.length} PR(s) could not be fetched (listed in the report)`);
1352
+ if (data.gistSyncWarning)
1353
+ console.log(` Warning: ${data.gistSyncWarning}`);
1354
+ });
1355
+ });
1356
+ group
1357
+ .command('record')
1358
+ .description('Record a branch an agent prepared for the latest overnight run')
1359
+ .requiredOption('--url <url>', 'PR or issue URL the branch is for')
1360
+ .requiredOption('--branch <name>', 'Local branch name')
1361
+ .option('--worktree <path>', 'Worktree path holding the branch')
1362
+ .option('--note <text>', 'One-line summary of what was prepared')
1363
+ .option('--json', 'Output as JSON')
1364
+ .action(async (options) => {
1365
+ await executeAction(options, async () => (await import('./commands/overnight.js')).runOvernightRecord({
1366
+ url: options.url,
1367
+ branch: options.branch,
1368
+ worktree: options.worktree,
1369
+ note: options.note,
1370
+ }), (data) => {
1371
+ console.log(`Recorded (${data.preparedCount} prepared): ${data.reportPath}`);
1372
+ if (data.reportRecreated)
1373
+ console.log(' Report file was missing and has been recreated with only the prepared section');
1374
+ if (data.gistSyncWarning)
1375
+ console.log(` Warning: ${data.gistSyncWarning}`);
1376
+ });
1377
+ });
1378
+ group
1379
+ .command('schedule')
1380
+ .description('Render (or with --install, write) the launchd plist that runs /oss-overnight nightly')
1381
+ .option('--hour <n>', 'Local hour to run, 0-23', '2')
1382
+ .option('--claude-path <path>', 'Path to the claude binary', 'claude')
1383
+ .option('--install', 'Write the plist to ~/Library/LaunchAgents (does not load it)')
1384
+ .option('--json', 'Output as JSON')
1385
+ .action(async (options) => {
1386
+ await executeAction(options, async () => (await import('./commands/overnight.js')).runOvernightSchedule({
1387
+ hour: Number(options.hour),
1388
+ claudePath: options.claudePath,
1389
+ install: Boolean(options.install),
1390
+ }), (data) => {
1391
+ if (data.installed)
1392
+ console.log(`Wrote ${data.plistPath}`);
1393
+ else
1394
+ console.log(data.plist);
1395
+ console.log(`
1396
+ Load it with:
1397
+ ${data.loadCommand}`);
1398
+ });
1399
+ });
1400
+ },
1401
+ },
1333
1402
  // ── Stats ─────────────────────────────────────────────────────────────
1334
1403
  {
1335
1404
  name: 'stats',