@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.
- package/dist/cli-registry.js +73 -4
- package/dist/cli.bundle.cjs +195 -195
- package/dist/commands/index.d.ts +2 -0
- package/dist/commands/index.js +2 -0
- package/dist/commands/overnight.d.ts +120 -0
- package/dist/commands/overnight.js +359 -0
- package/dist/commands/parse-list.js +4 -2
- package/dist/commands/scout-bridge.js +6 -9
- package/dist/commands/search.js +12 -1
- package/dist/commands/startup.js +4 -0
- package/dist/core/config-registry.js +3 -3
- package/dist/core/paths.d.ts +2 -0
- package/dist/core/paths.js +8 -0
- package/dist/core/state-schema.d.ts +47 -0
- package/dist/core/state-schema.js +36 -13
- package/dist/core/state.d.ts +9 -1
- package/dist/core/state.js +18 -0
- package/dist/core/types.d.ts +1 -1
- package/dist/formatters/json.d.ts +13 -4
- package/dist/formatters/json.js +2 -2
- package/package.json +8 -8
package/dist/cli-registry.js
CHANGED
|
@@ -104,10 +104,10 @@ function printRepos(repos) {
|
|
|
104
104
|
}
|
|
105
105
|
export const commands = [
|
|
106
106
|
// ── Manifest (#1190) ───────────────────────────────────────────────────
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
// and
|
|
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',
|