@oss-autopilot/core 3.10.0 → 3.12.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.
Files changed (52) hide show
  1. package/dist/cli-registry.d.ts +7 -0
  2. package/dist/cli-registry.js +58 -5
  3. package/dist/cli.bundle.cjs +165 -112
  4. package/dist/cli.js +11 -3
  5. package/dist/commands/comments.js +31 -15
  6. package/dist/commands/compliance-score.js +12 -4
  7. package/dist/commands/daily-render.d.ts +2 -1
  8. package/dist/commands/daily-render.js +8 -2
  9. package/dist/commands/daily.d.ts +3 -1
  10. package/dist/commands/daily.js +54 -4
  11. package/dist/commands/dashboard-data.d.ts +17 -0
  12. package/dist/commands/dashboard-data.js +62 -4
  13. package/dist/commands/dashboard-server.js +100 -26
  14. package/dist/commands/dismiss.d.ts +4 -0
  15. package/dist/commands/dismiss.js +4 -4
  16. package/dist/commands/guidelines.d.ts +19 -0
  17. package/dist/commands/guidelines.js +23 -4
  18. package/dist/commands/index.d.ts +5 -1
  19. package/dist/commands/index.js +4 -0
  20. package/dist/commands/list-move-tier.d.ts +11 -3
  21. package/dist/commands/list-move-tier.js +18 -7
  22. package/dist/commands/move.d.ts +2 -0
  23. package/dist/commands/move.js +12 -8
  24. package/dist/commands/repo-vet.js +30 -8
  25. package/dist/commands/search.js +17 -3
  26. package/dist/commands/shelve.d.ts +4 -0
  27. package/dist/commands/shelve.js +4 -4
  28. package/dist/commands/verify-issue.d.ts +20 -0
  29. package/dist/commands/verify-issue.js +32 -0
  30. package/dist/core/daily-logic.js +65 -52
  31. package/dist/core/gist-state-store.js +42 -7
  32. package/dist/core/index.d.ts +3 -1
  33. package/dist/core/index.js +3 -1
  34. package/dist/core/issue-conversation.js +15 -2
  35. package/dist/core/issue-verification.d.ts +91 -0
  36. package/dist/core/issue-verification.js +270 -0
  37. package/dist/core/paths.d.ts +12 -0
  38. package/dist/core/paths.js +16 -0
  39. package/dist/core/pr-attention.d.ts +52 -0
  40. package/dist/core/pr-attention.js +76 -0
  41. package/dist/core/pr-comments-fetcher.d.ts +10 -2
  42. package/dist/core/pr-comments-fetcher.js +22 -4
  43. package/dist/core/state-persistence.d.ts +31 -9
  44. package/dist/core/state-persistence.js +51 -16
  45. package/dist/core/state.d.ts +18 -1
  46. package/dist/core/state.js +35 -3
  47. package/dist/core/types.d.ts +7 -0
  48. package/dist/core/untrusted-content.d.ts +24 -3
  49. package/dist/core/untrusted-content.js +31 -3
  50. package/dist/formatters/json.d.ts +83 -2
  51. package/dist/formatters/json.js +55 -1
  52. package/package.json +7 -7
@@ -26,6 +26,7 @@ export function toCompactDailyOutput(output) {
26
26
  capacity: output.capacity,
27
27
  briefSummary: output.briefSummary,
28
28
  actionableIssues: output.actionableIssues,
29
+ attention: output.attention,
29
30
  actionMenu: output.actionMenu,
30
31
  commentedIssues: output.commentedIssues,
31
32
  failureCount: output.failures.length,
@@ -87,6 +88,7 @@ const DailyWarningPhaseSchema = z.enum([
87
88
  'dismiss-filter',
88
89
  'gist-checkpoint',
89
90
  'gist-staleness',
91
+ 'state-load',
90
92
  ]);
91
93
  const DailyWarningSchema = z.object({
92
94
  phase: DailyWarningPhaseSchema,
@@ -270,12 +272,19 @@ export const StrategyOutputSchema = z.object({
270
272
  strategy: StrategyResultSchema.nullable(),
271
273
  message: z.string().optional(),
272
274
  });
275
+ export const AttentionSummarySchema = z.object({
276
+ needsAttention: z.number().int().nonnegative(),
277
+ stuckCI: z.number().int().nonnegative(),
278
+ dormantFollowup: z.number().int().nonnegative(),
279
+ waiting: z.number().int().nonnegative(),
280
+ });
273
281
  export const DailyOutputSchema = z.object({
274
282
  digest: DailyDigestCompactSchema,
275
283
  capacity: CapacityAssessmentSchema,
276
284
  summary: z.string(),
277
285
  briefSummary: z.string(),
278
286
  actionableIssues: z.array(CompactActionableIssueSchema),
287
+ attention: AttentionSummarySchema,
279
288
  actionMenu: ActionMenuSchema,
280
289
  commentedIssues: z.array(CommentedIssuePassthroughSchema),
281
290
  repoGroups: z.array(CompactRepoGroupSchema),
@@ -288,6 +297,7 @@ export const CompactDailyOutputSchema = z.object({
288
297
  capacity: CapacityAssessmentSchema,
289
298
  briefSummary: z.string(),
290
299
  actionableIssues: z.array(CompactActionableIssueSchema),
300
+ attention: AttentionSummarySchema,
291
301
  actionMenu: ActionMenuSchema,
292
302
  commentedIssues: z.array(CommentedIssuePassthroughSchema),
293
303
  failureCount: z.number().int().nonnegative(),
@@ -348,6 +358,7 @@ export const SearchOutputSchema = z.object({
348
358
  candidates: z.array(SearchCandidateSchema),
349
359
  excludedRepos: z.array(z.string()),
350
360
  aiPolicyBlocklist: z.array(z.string()),
361
+ hiddenOwnPRCount: z.number().int().nonnegative(),
351
362
  rateLimitWarning: z.string().optional(),
352
363
  });
353
364
  // ── Features output schema (scout 0.9.0 #97/#98/#99) ─────────────────
@@ -395,7 +406,10 @@ export const ListMoveTierOutputSchema = z.object({
395
406
  toTier: z.enum(['pursue', 'maybe', 'skip']),
396
407
  fromTier: z.string().optional(),
397
408
  count: z.number().int().nonnegative(),
398
- reason: z.string().optional(),
409
+ // #1355: not-found now throws before reaching the success envelope, so the
410
+ // only reachable no-op reason is the idempotent one. Pinned so a new quiet
411
+ // no-op path trips the #1105 runtime validator instead of shipping silently.
412
+ reason: z.literal('already in target tier').optional(),
399
413
  });
400
414
  // list-mark-done (#1299): mirrors {@link MarkDoneOutput} from the command
401
415
  // module. Strict shape — additional keys must be added here AND in the
@@ -409,6 +423,35 @@ export const ListMarkDoneOutputSchema = z.object({
409
423
  remainingUnderRepo: z.number().int().nonnegative(),
410
424
  reason: z.string().optional(),
411
425
  });
426
+ // verify-issue (#1353, #1354): mirrors {@link IssueVerification} from
427
+ // core/issue-verification.ts. Strict shape — additional keys must be added
428
+ // here AND in the module output, otherwise the validator rejects the
429
+ // response before it reaches consumers.
430
+ export const VerifyIssueOutputSchema = z.object({
431
+ url: z.string(),
432
+ owner: z.string(),
433
+ repo: z.string(),
434
+ number: z.number().int().positive(),
435
+ title: z.string(),
436
+ state: z.enum(['open', 'closed']),
437
+ stateReason: z.enum(['completed', 'not_planned', 'reopened', 'duplicate']).nullable(),
438
+ closedAt: z.string().nullable(),
439
+ assignees: z.array(z.string()),
440
+ linkedPRs: z.array(z.object({
441
+ number: z.number().int().positive(),
442
+ url: z.string(),
443
+ title: z.string(),
444
+ state: z.enum(['open', 'closed', 'merged']),
445
+ isDraft: z.boolean(),
446
+ author: z.string().nullable(),
447
+ isOwn: z.boolean(),
448
+ linkType: z.enum(['closing', 'cross-referenced']),
449
+ updatedAt: z.string().nullable(),
450
+ })),
451
+ verdict: z.enum(['closed', 'own-open-pr', 'taken', 'at-risk', 'available']),
452
+ verdictReason: z.string(),
453
+ userLogin: z.string(),
454
+ });
412
455
  // ── #1155: Zod coverage for remaining CLI commands ───────────────────
413
456
  export const PostOutputSchema = z.object({
414
457
  commentUrl: z.string(),
@@ -417,6 +460,8 @@ export const PostOutputSchema = z.object({
417
460
  export const ClaimOutputSchema = z.object({
418
461
  commentUrl: z.string(),
419
462
  issueUrl: z.string(),
463
+ // Post-mutation Gist checkpoint failure (#1370). Optional: absent on clean runs.
464
+ gistSyncWarning: z.string().optional(),
420
465
  });
421
466
  export const InitOutputSchema = z.object({
422
467
  username: z.string(),
@@ -492,6 +537,8 @@ export const MoveOutputSchema = z.object({
492
537
  url: z.string(),
493
538
  target: z.enum(['attention', 'waiting', 'shelved', 'auto']),
494
539
  description: z.string(),
540
+ // Post-mutation Gist checkpoint failure (#1370). Optional: absent on clean runs.
541
+ gistSyncWarning: z.string().optional(),
495
542
  });
496
543
  export const PRTemplateOutputSchema = z.object({
497
544
  template: z.string().nullable(),
@@ -535,6 +582,13 @@ export const RepoVetOutputSchema = z.object({
535
582
  lastCommitISO: z.string().nullable(),
536
583
  contributorsLast90d: z.number().int().nonnegative(),
537
584
  lastReleaseISO: z.string().nullable(),
585
+ /**
586
+ * True when the release listing failed for a non-404 reason (5xx,
587
+ * network), so a `null` lastReleaseISO means "could not determine"
588
+ * rather than "confirmed no releases". The release-list analogue of
589
+ * `communityHealth.incomplete` (#1373).
590
+ */
591
+ releasesIncomplete: z.boolean().optional(),
538
592
  }),
539
593
  communityHealth: z.object({
540
594
  contributing: z.boolean(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oss-autopilot/core",
3
- "version": "3.10.0",
3
+ "version": "3.12.0",
4
4
  "description": "CLI and core library for managing open source contributions",
5
5
  "type": "module",
6
6
  "bin": {
@@ -54,18 +54,18 @@
54
54
  "dependencies": {
55
55
  "@octokit/plugin-throttling": "^11.0.3",
56
56
  "@octokit/rest": "^22.0.1",
57
- "@oss-scout/core": "^0.10.0",
58
- "commander": "^14.0.3",
57
+ "@oss-scout/core": "^0.11.0",
58
+ "commander": "^15.0.0",
59
59
  "zod": "^4.4.3"
60
60
  },
61
61
  "devDependencies": {
62
- "@types/node": "^25.7.0",
63
- "@vitest/coverage-v8": "^4.1.6",
62
+ "@types/node": "^25.9.3",
63
+ "@vitest/coverage-v8": "^4.1.8",
64
64
  "esbuild": "^0.28.0",
65
- "tsx": "^4.21.0",
65
+ "tsx": "^4.22.4",
66
66
  "typedoc": "^0.28.19",
67
67
  "typescript": "^5.9.3",
68
- "vitest": "^4.1.6"
68
+ "vitest": "^4.1.8"
69
69
  },
70
70
  "scripts": {
71
71
  "build": "tsc",