@oss-autopilot/core 3.5.0 → 3.6.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/cli-registry.js +49 -0
- package/dist/cli.bundle.cjs +111 -107
- package/dist/commands/daily.d.ts +8 -0
- package/dist/commands/daily.js +21 -0
- package/dist/commands/index.d.ts +2 -0
- package/dist/commands/index.js +2 -0
- package/dist/commands/startup.js +23 -1
- package/dist/core/anti-llm-policy.d.ts +42 -13
- package/dist/core/anti-llm-policy.js +102 -13
- package/dist/core/ci-analysis.d.ts +32 -1
- package/dist/core/ci-analysis.js +92 -0
- package/dist/core/errors.d.ts +19 -0
- package/dist/core/errors.js +54 -0
- package/dist/core/pr-monitor.d.ts +1 -1
- package/dist/core/pr-monitor.js +31 -11
- package/dist/core/state-schema.d.ts +1 -0
- package/dist/core/state-schema.js +9 -0
- package/dist/core/state.d.ts +7 -0
- package/dist/core/state.js +10 -0
- package/dist/core/strategy.d.ts +21 -1
- package/dist/core/strategy.js +44 -0
- package/dist/core/types.d.ts +49 -0
- package/dist/formatters/json.d.ts +105 -0
- package/dist/formatters/json.js +74 -0
- package/package.json +1 -1
package/dist/cli-registry.js
CHANGED
|
@@ -411,6 +411,55 @@ export const commands = [
|
|
|
411
411
|
});
|
|
412
412
|
},
|
|
413
413
|
},
|
|
414
|
+
// ── List Mark Done ─────────────────────────────────────────────────────
|
|
415
|
+
{
|
|
416
|
+
name: 'list-mark-done',
|
|
417
|
+
localOnly: true,
|
|
418
|
+
register(program) {
|
|
419
|
+
program
|
|
420
|
+
.command('list-mark-done <issue-url>')
|
|
421
|
+
.description('Mark an issue line in a curated list as done with strikethrough + Done sub-bullet (#1299)')
|
|
422
|
+
.requiredOption('--pr-url <url>', 'PR URL to record on the Done sub-bullet')
|
|
423
|
+
.requiredOption('--pr-status <text>', 'Trailing status, e.g. "merged" or "CI passing"')
|
|
424
|
+
.requiredOption('--list-path <file>', 'Path to the markdown issue list')
|
|
425
|
+
.option('--json', 'Output as JSON')
|
|
426
|
+
.action(async (issueUrl, options) => {
|
|
427
|
+
const { ListMarkDoneOutputSchema } = await import('./formatters/json.js');
|
|
428
|
+
await executeAction(options, async () => {
|
|
429
|
+
const result = await (await import('./commands/list-mark-done.js')).runMarkIssueListItemDone({
|
|
430
|
+
issueUrl,
|
|
431
|
+
prUrl: options.prUrl,
|
|
432
|
+
prStatus: options.prStatus,
|
|
433
|
+
listPath: options.listPath,
|
|
434
|
+
});
|
|
435
|
+
// Convert "URL not in list" into a real CLI error so the JSON
|
|
436
|
+
// envelope reports `success: false` and the process exits non-zero.
|
|
437
|
+
// The pure transform's success-shaped not-found return is fine for
|
|
438
|
+
// library consumers, but as a CLI command "I asked you to mark X
|
|
439
|
+
// and you couldn't find X" is a failure the caller must see.
|
|
440
|
+
// The "already marked done" case stays as a success-shape return
|
|
441
|
+
// (it's idempotent — the caller's intent was achieved).
|
|
442
|
+
if (!result.marked && result.reason === 'issue URL not found in the list') {
|
|
443
|
+
throw new Error(`Issue URL not found in ${result.filePath}: ${result.url}. ` +
|
|
444
|
+
`Verify --list-path and the issue URL.`);
|
|
445
|
+
}
|
|
446
|
+
return result;
|
|
447
|
+
}, (data) => {
|
|
448
|
+
if (data.marked) {
|
|
449
|
+
const headingNote = data.repoHeadingStruck ? ' (repo heading also struck)' : '';
|
|
450
|
+
console.log(`Marked ${data.url} done${headingNote}`);
|
|
451
|
+
console.log(` File: ${data.filePath}`);
|
|
452
|
+
console.log(` Remaining under repo: ${data.remainingUnderRepo}`);
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
// Reach here only on the idempotent "already marked done" path.
|
|
456
|
+
console.log(`No mark: ${data.url} — ${data.reason ?? 'unchanged'}`);
|
|
457
|
+
console.log(` File: ${data.filePath}`);
|
|
458
|
+
}
|
|
459
|
+
}, ListMarkDoneOutputSchema);
|
|
460
|
+
});
|
|
461
|
+
},
|
|
462
|
+
},
|
|
414
463
|
// ── Track ──────────────────────────────────────────────────────────────
|
|
415
464
|
{
|
|
416
465
|
name: 'track',
|