@oss-autopilot/core 3.13.3 → 3.14.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/README.md +3 -3
- package/dist/cli-registry.js +50 -83
- package/dist/cli.bundle.cjs +110 -107
- package/dist/cli.js +17 -3
- package/dist/commands/comments.js +44 -10
- package/dist/commands/config.d.ts +2 -0
- package/dist/commands/config.js +50 -2
- package/dist/commands/curated-list.d.ts +17 -0
- package/dist/commands/curated-list.js +25 -0
- package/dist/commands/daily.d.ts +7 -1
- package/dist/commands/daily.js +136 -57
- package/dist/commands/dashboard-cache.d.ts +69 -0
- package/dist/commands/dashboard-cache.js +219 -0
- package/dist/commands/dashboard-data.d.ts +18 -10
- package/dist/commands/dashboard-data.js +35 -7
- package/dist/commands/dashboard-gist-sync.d.ts +93 -0
- package/dist/commands/dashboard-gist-sync.js +237 -0
- package/dist/commands/dashboard-server.d.ts +6 -10
- package/dist/commands/dashboard-server.js +155 -222
- package/dist/commands/features.js +6 -0
- package/dist/commands/guidelines.d.ts +6 -0
- package/dist/commands/guidelines.js +7 -0
- package/dist/commands/index.d.ts +2 -5
- package/dist/commands/index.js +2 -4
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.js +7 -1
- package/dist/commands/list-mark-done.js +6 -21
- package/dist/commands/list-move-tier.js +3 -5
- package/dist/commands/locate-issue-list.d.ts +25 -0
- package/dist/commands/locate-issue-list.js +67 -0
- package/dist/commands/merge-loop.d.ts +63 -0
- package/dist/commands/merge-loop.js +157 -0
- package/dist/commands/repo-vet.js +40 -1
- package/dist/commands/scout-bridge.d.ts +35 -2
- package/dist/commands/scout-bridge.js +65 -13
- package/dist/commands/search.d.ts +4 -6
- package/dist/commands/search.js +58 -11
- package/dist/commands/setup.d.ts +2 -0
- package/dist/commands/setup.js +56 -2
- package/dist/commands/skip-file-parser.d.ts +23 -0
- package/dist/commands/skip-file-parser.js +23 -10
- package/dist/commands/startup.d.ts +1 -6
- package/dist/commands/startup.js +25 -59
- package/dist/commands/track.d.ts +2 -2
- package/dist/commands/track.js +2 -2
- package/dist/commands/vet-list.js +4 -0
- package/dist/core/config-registry.js +36 -0
- package/dist/core/daily-logic.d.ts +25 -2
- package/dist/core/daily-logic.js +58 -3
- package/dist/core/gist-health.d.ts +81 -0
- package/dist/core/gist-health.js +39 -0
- package/dist/core/gist-state-store.d.ts +3 -1
- package/dist/core/gist-state-store.js +7 -2
- package/dist/core/github-stats.d.ts +2 -2
- package/dist/core/github-stats.js +20 -4
- package/dist/core/index.d.ts +4 -3
- package/dist/core/index.js +4 -3
- package/dist/core/issue-conversation.js +8 -2
- package/dist/core/issue-grading.d.ts +9 -0
- package/dist/core/issue-grading.js +9 -0
- package/dist/core/pagination.d.ts +27 -0
- package/dist/core/pagination.js +23 -5
- package/dist/core/pr-comments-fetcher.d.ts +7 -0
- package/dist/core/pr-comments-fetcher.js +19 -8
- package/dist/core/pr-monitor.d.ts +2 -0
- package/dist/core/pr-monitor.js +26 -9
- package/dist/core/repo-score-manager.d.ts +2 -2
- package/dist/core/repo-score-manager.js +3 -3
- package/dist/core/repo-vet.d.ts +2 -2
- package/dist/core/repo-vet.js +1 -1
- package/dist/core/review-analysis.d.ts +19 -0
- package/dist/core/review-analysis.js +28 -0
- package/dist/core/state-schema.d.ts +43 -6
- package/dist/core/state-schema.js +81 -4
- package/dist/core/state.d.ts +36 -5
- package/dist/core/state.js +177 -28
- package/dist/core/strategy.js +6 -5
- package/dist/core/types.d.ts +8 -0
- package/dist/core/untrusted-content.d.ts +45 -0
- package/dist/core/untrusted-content.js +54 -0
- package/dist/formatters/json.d.ts +89 -6
- package/dist/formatters/json.js +65 -1
- package/package.json +2 -2
- package/dist/commands/shelve.d.ts +0 -45
- package/dist/commands/shelve.js +0 -54
package/README.md
CHANGED
|
@@ -30,10 +30,10 @@ oss-autopilot daily --json
|
|
|
30
30
|
# Check PR status
|
|
31
31
|
oss-autopilot status --json
|
|
32
32
|
|
|
33
|
-
# Search for contributable issues
|
|
34
|
-
oss-autopilot search
|
|
33
|
+
# Search for contributable issues (positional arg = max result count)
|
|
34
|
+
oss-autopilot search 10 --json
|
|
35
35
|
|
|
36
|
-
#
|
|
36
|
+
# Inspect a PR (read-only metadata lookup — nothing persists)
|
|
37
37
|
oss-autopilot track https://github.com/owner/repo/pull/123
|
|
38
38
|
|
|
39
39
|
# View help
|
package/dist/cli-registry.js
CHANGED
|
@@ -34,6 +34,35 @@ export function handleCommandError(err, json) {
|
|
|
34
34
|
* duplicated in every command action. Commands with non-standard output
|
|
35
35
|
* modes (e.g. `--compact`, `--markdown`, `--badge`) inline their own
|
|
36
36
|
* branching rather than squeezing through this helper.
|
|
37
|
+
*
|
|
38
|
+
* ── `--json` output validation tiers (#1453) ──────────────────────────────
|
|
39
|
+
*
|
|
40
|
+
* Two tiers gate the shape of `--json` output. When adding a command, pick
|
|
41
|
+
* a tier consciously:
|
|
42
|
+
*
|
|
43
|
+
* 1. **Runtime-validated**: the registration passes an exported Zod schema
|
|
44
|
+
* (from `formatters/json.ts`) as `executeAction`'s 4th argument — or
|
|
45
|
+
* calls `outputJsonValidated` directly — so a drifted shape throws at
|
|
46
|
+
* the `--json` boundary instead of silently shipping (#1105).
|
|
47
|
+
* Commands: manifest, daily, status, strategy, search, features,
|
|
48
|
+
* verify-issue, skip-add, list-move-tier, list-mark-done,
|
|
49
|
+
* compliance-score, post, claim, config, init, setup, checkSetup,
|
|
50
|
+
* parse-issue-list, orphan-files, doctor, local-repos, move,
|
|
51
|
+
* pr-template, repo-vet, detect-formatters.
|
|
52
|
+
*
|
|
53
|
+
* 2. **Goldens-only**: no Zod schema exists; the command returns a TS
|
|
54
|
+
* interface and its `*.contract.test.ts` golden snapshot is the only
|
|
55
|
+
* shape gate. Nothing fires at runtime if the producer drifts after
|
|
56
|
+
* the goldens were last updated.
|
|
57
|
+
* Commands: state (show/sync/unlink), vet, vet-list, track, comments,
|
|
58
|
+
* startup, dismiss, undismiss, stats, and the five
|
|
59
|
+
* guidelines subcommands (list/view/store/reset/fetch-corpus).
|
|
60
|
+
*
|
|
61
|
+
* (`dashboard serve` is exempt: it has no `--json` mode.)
|
|
62
|
+
*
|
|
63
|
+
* To promote a command to tier 1: export a Zod schema from
|
|
64
|
+
* `formatters/json.ts`, assert it in the command's contract test alongside
|
|
65
|
+
* the goldens, and pass it to `executeAction` here.
|
|
37
66
|
*/
|
|
38
67
|
async function executeAction(options, run, display,
|
|
39
68
|
/** Optional Zod schema. When provided, the JSON output is validated against
|
|
@@ -643,7 +672,7 @@ export const commands = [
|
|
|
643
672
|
register(program) {
|
|
644
673
|
program
|
|
645
674
|
.command('track <pr-url>')
|
|
646
|
-
.description('
|
|
675
|
+
.description('Inspect a PR (read-only metadata lookup — nothing is persisted; v2 has no local tracking list)')
|
|
647
676
|
.option('--json', 'Output as JSON')
|
|
648
677
|
.action((prUrl, options) => executeAction(options, async () => (await import('./commands/track.js')).runTrack({ prUrl }), (data) => {
|
|
649
678
|
console.log(`\nPR: ${data.pr.repo}#${data.pr.number} - ${data.pr.title}`);
|
|
@@ -653,8 +682,9 @@ export const commands = [
|
|
|
653
682
|
},
|
|
654
683
|
},
|
|
655
684
|
// The v1→v2 `untrack` and `read` stubs were removed in v4 (#1133). Use
|
|
656
|
-
// `
|
|
657
|
-
// coded these commands now get an "unknown command"
|
|
685
|
+
// `move <pr-url> shelved|auto` to hide/restore PRs in the daily digest.
|
|
686
|
+
// Scripts that hard-coded these commands now get an "unknown command"
|
|
687
|
+
// error from commander.
|
|
658
688
|
// ── Compliance Score ───────────────────────────────────────────────────
|
|
659
689
|
{
|
|
660
690
|
name: 'compliance-score',
|
|
@@ -1122,39 +1152,8 @@ export const commands = [
|
|
|
1122
1152
|
});
|
|
1123
1153
|
},
|
|
1124
1154
|
},
|
|
1125
|
-
//
|
|
1126
|
-
//
|
|
1127
|
-
// ({shelved, url}) as the library export + MCP tool. Previously it called
|
|
1128
|
-
// runMove and emitted `MoveOutput` ({url, target, description}), which
|
|
1129
|
-
// drifted from the pinned contract test and broke plugin consumers
|
|
1130
|
-
// reading `data.shelved`. See issue #1037.
|
|
1131
|
-
{
|
|
1132
|
-
name: 'shelve',
|
|
1133
|
-
localOnly: true,
|
|
1134
|
-
register(program) {
|
|
1135
|
-
program
|
|
1136
|
-
.command('shelve <pr-url>')
|
|
1137
|
-
.description('Shelve a PR (exclude from capacity and actionable issues)')
|
|
1138
|
-
.option('--json', 'Output as JSON')
|
|
1139
|
-
.action((prUrl, options) => executeAction(options, async () => (await import('./commands/shelve.js')).runShelve({ prUrl }), (data) => {
|
|
1140
|
-
console.log(data.shelved ? `Shelved ${data.url}` : `Already shelved: ${data.url}`);
|
|
1141
|
-
}));
|
|
1142
|
-
},
|
|
1143
|
-
},
|
|
1144
|
-
// ── Unshelve ───────────────────────────────────────────────────────────
|
|
1145
|
-
{
|
|
1146
|
-
name: 'unshelve',
|
|
1147
|
-
localOnly: true,
|
|
1148
|
-
register(program) {
|
|
1149
|
-
program
|
|
1150
|
-
.command('unshelve <pr-url>')
|
|
1151
|
-
.description('Unshelve a PR (include in capacity and actionable issues again)')
|
|
1152
|
-
.option('--json', 'Output as JSON')
|
|
1153
|
-
.action((prUrl, options) => executeAction(options, async () => (await import('./commands/shelve.js')).runUnshelve({ prUrl }), (data) => {
|
|
1154
|
-
console.log(data.unshelved ? `Unshelved ${data.url}` : `Not currently shelved: ${data.url}`);
|
|
1155
|
-
}));
|
|
1156
|
-
},
|
|
1157
|
-
},
|
|
1155
|
+
// The `shelve`/`unshelve` command aliases were retired in #1466 — they
|
|
1156
|
+
// duplicated `move <pr-url> shelved|auto`. Use `move` directly.
|
|
1158
1157
|
// ── Move ───────────────────────────────────────────────────────────
|
|
1159
1158
|
{
|
|
1160
1159
|
name: 'move',
|
|
@@ -1164,9 +1163,12 @@ export const commands = [
|
|
|
1164
1163
|
.command('move <pr-url> <target>')
|
|
1165
1164
|
.description('Move a PR between states: attention, waiting, shelved, or auto (reset to computed)')
|
|
1166
1165
|
.option('--json', 'Output as JSON')
|
|
1167
|
-
.action(
|
|
1168
|
-
|
|
1169
|
-
|
|
1166
|
+
.action(async (prUrl, target, options) => {
|
|
1167
|
+
const { MoveOutputSchema } = await import('./formatters/json.js');
|
|
1168
|
+
await executeAction(options, async () => (await import('./commands/move.js')).runMove({ prUrl, target }), (data) => {
|
|
1169
|
+
console.log(data.description);
|
|
1170
|
+
}, MoveOutputSchema);
|
|
1171
|
+
});
|
|
1170
1172
|
},
|
|
1171
1173
|
},
|
|
1172
1174
|
// ── Dismiss ────────────────────────────────────────────────────────────
|
|
@@ -1210,48 +1212,8 @@ export const commands = [
|
|
|
1210
1212
|
}));
|
|
1211
1213
|
},
|
|
1212
1214
|
},
|
|
1213
|
-
//
|
|
1214
|
-
|
|
1215
|
-
name: 'override',
|
|
1216
|
-
localOnly: true,
|
|
1217
|
-
register(program) {
|
|
1218
|
-
program
|
|
1219
|
-
.command('override <pr-url> <status>')
|
|
1220
|
-
.description('Manually override PR status (needs_addressing or waiting_on_maintainer)')
|
|
1221
|
-
.option('--json', 'Output as JSON')
|
|
1222
|
-
.action(async (prUrl, status, options) => {
|
|
1223
|
-
const { MoveOutputSchema } = await import('./formatters/json.js');
|
|
1224
|
-
await executeAction(options, async () => {
|
|
1225
|
-
const validStatuses = ['needs_addressing', 'waiting_on_maintainer'];
|
|
1226
|
-
if (!validStatuses.includes(status)) {
|
|
1227
|
-
throw new Error(`Invalid status "${status}". Must be one of: ${validStatuses.join(', ')}`);
|
|
1228
|
-
}
|
|
1229
|
-
const target = status === 'needs_addressing' ? 'attention' : 'waiting';
|
|
1230
|
-
const { runMove } = await import('./commands/move.js');
|
|
1231
|
-
return runMove({ prUrl, target });
|
|
1232
|
-
}, (data) => {
|
|
1233
|
-
console.log(data.description);
|
|
1234
|
-
}, MoveOutputSchema);
|
|
1235
|
-
});
|
|
1236
|
-
},
|
|
1237
|
-
},
|
|
1238
|
-
// ── Clear Override ────────────────────────────────────────────────────
|
|
1239
|
-
{
|
|
1240
|
-
name: 'clear-override',
|
|
1241
|
-
localOnly: true,
|
|
1242
|
-
register(program) {
|
|
1243
|
-
program
|
|
1244
|
-
.command('clear-override <pr-url>')
|
|
1245
|
-
.description('Clear a manual status override for a PR')
|
|
1246
|
-
.option('--json', 'Output as JSON')
|
|
1247
|
-
.action(async (prUrl, options) => {
|
|
1248
|
-
const { MoveOutputSchema } = await import('./formatters/json.js');
|
|
1249
|
-
await executeAction(options, async () => (await import('./commands/move.js')).runMove({ prUrl, target: 'auto' }), (data) => {
|
|
1250
|
-
console.log(data.description);
|
|
1251
|
-
}, MoveOutputSchema);
|
|
1252
|
-
});
|
|
1253
|
-
},
|
|
1254
|
-
},
|
|
1215
|
+
// The `override`/`clear-override` command aliases were retired in #1466 —
|
|
1216
|
+
// they wrapped `move <pr-url> attention|waiting|auto`. Use `move` directly.
|
|
1255
1217
|
// ── PR Template ──────────────────────────────────────────────────────
|
|
1256
1218
|
{
|
|
1257
1219
|
name: 'pr-template',
|
|
@@ -1283,7 +1245,7 @@ export const commands = [
|
|
|
1283
1245
|
register(program) {
|
|
1284
1246
|
program
|
|
1285
1247
|
.command('repo-vet <repo>')
|
|
1286
|
-
.description('Compute repo health rubric (1–10 score + verdict) for `owner/repo
|
|
1248
|
+
.description('Compute the fresh repo health rubric (1–10 score + verdict) for `owner/repo`; includes the cached history score when one exists')
|
|
1287
1249
|
.option('--json', 'Output as JSON')
|
|
1288
1250
|
.action(async (repo, options) => {
|
|
1289
1251
|
const { RepoVetOutputSchema } = await import('./formatters/json.js');
|
|
@@ -1293,7 +1255,12 @@ export const commands = [
|
|
|
1293
1255
|
: data.rubricVerdict === 'proceed_with_caution'
|
|
1294
1256
|
? '⚠️'
|
|
1295
1257
|
: '❌';
|
|
1296
|
-
console.log(`\n${verdictEmoji} ${data.repoSlug}: ${data.rubricScore.toFixed(1)}/10 — ${data.rubricVerdict}`);
|
|
1258
|
+
console.log(`\n${verdictEmoji} ${data.repoSlug}: health ${data.rubricScore.toFixed(1)}/10 — ${data.rubricVerdict}`);
|
|
1259
|
+
if (data.historyScore !== undefined) {
|
|
1260
|
+
// Two different 1–10 scores (#1465) — label both so neither
|
|
1261
|
+
// reads as "the" repo score. See docs/repo-scores.md.
|
|
1262
|
+
console.log(` History score (your past PRs here): ${data.historyScore}/10 — cached, distinct from the fresh health score above`);
|
|
1263
|
+
}
|
|
1297
1264
|
console.log(` Stars: ${data.repoMeta.stars} Last push: ${data.repoMeta.lastPushed}`);
|
|
1298
1265
|
if (data.prMergeTime.medianDays !== null) {
|
|
1299
1266
|
console.log(` Median merge time (90d): ${data.prMergeTime.medianDays.toFixed(1)} days (${data.prMergeTime.sampleSize} samples)`);
|