@oss-autopilot/core 3.4.1 → 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 +99 -0
- package/dist/cli.bundle.cjs +112 -105
- package/dist/commands/compliance-score.d.ts +21 -0
- package/dist/commands/compliance-score.js +156 -0
- package/dist/commands/daily.d.ts +8 -0
- package/dist/commands/daily.js +21 -0
- package/dist/commands/index.d.ts +6 -0
- package/dist/commands/index.js +6 -0
- package/dist/commands/list-mark-done.d.ts +48 -0
- package/dist/commands/list-mark-done.js +213 -0
- package/dist/commands/parse-list.js +86 -9
- package/dist/commands/repo-vet.d.ts +21 -0
- package/dist/commands/repo-vet.js +215 -0
- package/dist/commands/startup.js +41 -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/ci-enforced-tools.d.ts +35 -0
- package/dist/core/ci-enforced-tools.js +109 -0
- package/dist/core/comment-decision.d.ts +72 -0
- package/dist/core/comment-decision.js +74 -0
- package/dist/core/compliance-score.d.ts +127 -0
- package/dist/core/compliance-score.js +277 -0
- package/dist/core/config-registry.js +12 -0
- package/dist/core/contributing.d.ts +52 -0
- package/dist/core/contributing.js +139 -0
- package/dist/core/errors.d.ts +19 -0
- package/dist/core/errors.js +54 -0
- package/dist/core/extraction-categories.d.ts +55 -0
- package/dist/core/extraction-categories.js +108 -0
- package/dist/core/follow-up-history.d.ts +41 -0
- package/dist/core/follow-up-history.js +71 -0
- package/dist/core/gist-state-store.d.ts +30 -7
- package/dist/core/gist-state-store.js +87 -11
- package/dist/core/issue-conversation.js +1 -0
- package/dist/core/issue-effort.d.ts +29 -0
- package/dist/core/issue-effort.js +41 -0
- package/dist/core/maintainer-hints.d.ts +23 -0
- package/dist/core/maintainer-hints.js +36 -0
- package/dist/core/pr-monitor.d.ts +1 -1
- package/dist/core/pr-monitor.js +31 -11
- package/dist/core/pr-quality-rubric.d.ts +70 -0
- package/dist/core/pr-quality-rubric.js +121 -0
- package/dist/core/repo-vet.d.ts +90 -0
- package/dist/core/repo-vet.js +178 -0
- package/dist/core/state-schema.d.ts +77 -0
- package/dist/core/state-schema.js +84 -0
- package/dist/core/state.d.ts +7 -0
- package/dist/core/state.js +10 -0
- package/dist/core/strategy.d.ts +95 -0
- package/dist/core/strategy.js +270 -0
- package/dist/core/types.d.ts +51 -0
- package/dist/core/workflow-state.d.ts +56 -0
- package/dist/core/workflow-state.js +101 -0
- package/dist/formatters/json.d.ts +252 -0
- package/dist/formatters/json.js +153 -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',
|
|
@@ -429,6 +478,28 @@ export const commands = [
|
|
|
429
478
|
// The v1→v2 `untrack` and `read` stubs were removed in v4 (#1133). Use
|
|
430
479
|
// `shelve`/`unshelve` to hide PRs from the daily digest. Scripts that hard-
|
|
431
480
|
// coded these commands now get an "unknown command" error from commander.
|
|
481
|
+
// ── Compliance Score ───────────────────────────────────────────────────
|
|
482
|
+
{
|
|
483
|
+
name: 'compliance-score',
|
|
484
|
+
register(program) {
|
|
485
|
+
program
|
|
486
|
+
.command('compliance-score <pr-url>')
|
|
487
|
+
.description('Score a PR against opensource.guide best practices (#1245)')
|
|
488
|
+
.option('--json', 'Output as JSON')
|
|
489
|
+
.action(async (prUrl, options) => {
|
|
490
|
+
const { ComplianceScoreOutputSchema } = await import('./formatters/json.js');
|
|
491
|
+
await executeAction(options, async () => (await import('./commands/compliance-score.js')).runComplianceScore({ prUrl }), (data) => {
|
|
492
|
+
console.log(`\n${data.emoji} PR ${data.pr.repo}#${data.pr.number}: ${data.pr.title}`);
|
|
493
|
+
console.log(`Score: ${data.score}/100 — ${data.rating.replace(/_/g, ' ')}\n`);
|
|
494
|
+
console.log('Checks:');
|
|
495
|
+
for (const [name, check] of Object.entries(data.checks)) {
|
|
496
|
+
const icon = check.status === 'pass' ? 'OK ' : check.status === 'warn' ? 'WARN' : 'FAIL';
|
|
497
|
+
console.log(` [${icon}] ${name} (${check.weight}%) — ${check.detail}`);
|
|
498
|
+
}
|
|
499
|
+
}, ComplianceScoreOutputSchema);
|
|
500
|
+
});
|
|
501
|
+
},
|
|
502
|
+
},
|
|
432
503
|
// ── Comments ───────────────────────────────────────────────────────────
|
|
433
504
|
{
|
|
434
505
|
name: 'comments',
|
|
@@ -1026,6 +1097,34 @@ export const commands = [
|
|
|
1026
1097
|
});
|
|
1027
1098
|
},
|
|
1028
1099
|
},
|
|
1100
|
+
// ── Repo Vet (#1271) ────────────────────────────────────────────────
|
|
1101
|
+
{
|
|
1102
|
+
name: 'repo-vet',
|
|
1103
|
+
register(program) {
|
|
1104
|
+
program
|
|
1105
|
+
.command('repo-vet <repo>')
|
|
1106
|
+
.description('Compute repo health rubric (1–10 score + verdict) for `owner/repo`')
|
|
1107
|
+
.option('--json', 'Output as JSON')
|
|
1108
|
+
.action(async (repo, options) => {
|
|
1109
|
+
const { RepoVetOutputSchema } = await import('./formatters/json.js');
|
|
1110
|
+
await executeAction(options, async () => (await import('./commands/repo-vet.js')).runRepoVet({ repo }), (data) => {
|
|
1111
|
+
const verdictEmoji = data.rubricVerdict === 'recommended'
|
|
1112
|
+
? '✅'
|
|
1113
|
+
: data.rubricVerdict === 'proceed_with_caution'
|
|
1114
|
+
? '⚠️'
|
|
1115
|
+
: '❌';
|
|
1116
|
+
console.log(`\n${verdictEmoji} ${data.repoSlug}: ${data.rubricScore.toFixed(1)}/10 — ${data.rubricVerdict}`);
|
|
1117
|
+
console.log(` Stars: ${data.repoMeta.stars} Last push: ${data.repoMeta.lastPushed}`);
|
|
1118
|
+
if (data.prMergeTime.medianDays !== null) {
|
|
1119
|
+
console.log(` Median merge time (90d): ${data.prMergeTime.medianDays.toFixed(1)} days (${data.prMergeTime.sampleSize} samples)`);
|
|
1120
|
+
}
|
|
1121
|
+
if (data.mergeRate.percent !== null) {
|
|
1122
|
+
console.log(` Merge rate (90d): ${data.mergeRate.percent.toFixed(0)}% (${data.mergeRate.merged}/${data.mergeRate.opened})`);
|
|
1123
|
+
}
|
|
1124
|
+
}, RepoVetOutputSchema);
|
|
1125
|
+
});
|
|
1126
|
+
},
|
|
1127
|
+
},
|
|
1029
1128
|
// ── Detect Formatters ────────────────────────────────────────────────
|
|
1030
1129
|
{
|
|
1031
1130
|
name: 'detect-formatters',
|