@oss-autopilot/core 3.22.3 → 3.23.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.
@@ -419,13 +419,21 @@ export declare const SearchSeenEntrySchema: z.ZodObject<{
419
419
  url: z.ZodString;
420
420
  lastSeenAt: z.ZodString;
421
421
  }, z.core.$strip>;
422
- /** One branch an overnight agent prepared locally (#1574). Never pushed by the run. */
422
+ /**
423
+ * One branch an overnight agent prepared locally (#1574). Never pushed by the
424
+ * run; `overnight push-prep` (#1698) may later stage it under `prep/*` on the
425
+ * user's fork and fills in `pushedRef`, `pushedAt` and `compareUrl`.
426
+ */
423
427
  export declare const OvernightPreparedSchema: z.ZodObject<{
424
428
  url: z.ZodString;
425
429
  branch: z.ZodString;
426
430
  worktree: z.ZodOptional<z.ZodString>;
427
431
  note: z.ZodOptional<z.ZodString>;
428
432
  recordedAt: z.ZodString;
433
+ pushedRef: z.ZodOptional<z.ZodString>;
434
+ pushedAt: z.ZodOptional<z.ZodString>;
435
+ compareUrl: z.ZodOptional<z.ZodString>;
436
+ pushProblem: z.ZodOptional<z.ZodString>;
429
437
  }, z.core.$strip>;
430
438
  /** The latest overnight run (#1574); `startup` surfaces its freshness. */
431
439
  export declare const OvernightRecordSchema: z.ZodObject<{
@@ -439,11 +447,25 @@ export declare const OvernightRecordSchema: z.ZodObject<{
439
447
  worktree: z.ZodOptional<z.ZodString>;
440
448
  note: z.ZodOptional<z.ZodString>;
441
449
  recordedAt: z.ZodString;
450
+ pushedRef: z.ZodOptional<z.ZodString>;
451
+ pushedAt: z.ZodOptional<z.ZodString>;
452
+ compareUrl: z.ZodOptional<z.ZodString>;
453
+ pushProblem: z.ZodOptional<z.ZodString>;
442
454
  }, z.core.$strip>>>;
443
455
  }, z.core.$strip>;
444
- /** Mirrors oss-scout's `searchRotation` (broad-phase language cursor). */
456
+ /**
457
+ * Mirrors oss-scout's `searchRotation`: the broad-phase language cursor, the
458
+ * repo-window cursors of the capped phases, and the round-robin strategy
459
+ * cursor (oss-scout 1.7.0). Every field must be listed: z.object strips
460
+ * unknown keys, so a cursor missing here would be dropped on every load and
461
+ * scout's rotation would restart from 0 each search.
462
+ */
445
463
  export declare const SearchRotationSchema: z.ZodObject<{
446
464
  languageOffset: z.ZodDefault<z.ZodNumber>;
465
+ phase0Offset: z.ZodDefault<z.ZodNumber>;
466
+ starredOffset: z.ZodDefault<z.ZodNumber>;
467
+ maintainedOffset: z.ZodDefault<z.ZodNumber>;
468
+ strategyOffset: z.ZodDefault<z.ZodNumber>;
447
469
  lastRotatedAt: z.ZodOptional<z.ZodString>;
448
470
  }, z.core.$strip>;
449
471
  export declare const AgentStateSchema: z.ZodObject<{
@@ -706,10 +728,18 @@ export declare const AgentStateSchema: z.ZodObject<{
706
728
  worktree: z.ZodOptional<z.ZodString>;
707
729
  note: z.ZodOptional<z.ZodString>;
708
730
  recordedAt: z.ZodString;
731
+ pushedRef: z.ZodOptional<z.ZodString>;
732
+ pushedAt: z.ZodOptional<z.ZodString>;
733
+ compareUrl: z.ZodOptional<z.ZodString>;
734
+ pushProblem: z.ZodOptional<z.ZodString>;
709
735
  }, z.core.$strip>>>;
710
736
  }, z.core.$strip>>;
711
737
  searchRotation: z.ZodOptional<z.ZodObject<{
712
738
  languageOffset: z.ZodDefault<z.ZodNumber>;
739
+ phase0Offset: z.ZodDefault<z.ZodNumber>;
740
+ starredOffset: z.ZodDefault<z.ZodNumber>;
741
+ maintainedOffset: z.ZodDefault<z.ZodNumber>;
742
+ strategyOffset: z.ZodDefault<z.ZodNumber>;
713
743
  lastRotatedAt: z.ZodOptional<z.ZodString>;
714
744
  }, z.core.$strip>>;
715
745
  }, z.core.$strip>;
@@ -374,13 +374,24 @@ export const SearchSeenEntrySchema = z.object({
374
374
  url: z.string(),
375
375
  lastSeenAt: z.string(),
376
376
  });
377
- /** One branch an overnight agent prepared locally (#1574). Never pushed by the run. */
377
+ /**
378
+ * One branch an overnight agent prepared locally (#1574). Never pushed by the
379
+ * run; `overnight push-prep` (#1698) may later stage it under `prep/*` on the
380
+ * user's fork and fills in `pushedRef`, `pushedAt` and `compareUrl`.
381
+ */
378
382
  export const OvernightPreparedSchema = z.object({
379
383
  url: z.string(),
380
384
  branch: z.string(),
381
385
  worktree: z.string().optional(),
382
386
  note: z.string().optional(),
383
387
  recordedAt: z.string(),
388
+ /** Branch name on the fork (`prep/<branch>`), set by `overnight push-prep`. */
389
+ pushedRef: z.string().optional(),
390
+ pushedAt: z.string().optional(),
391
+ /** `<fork>/compare/<pr-head>...prep/<branch>`; absent when the PR head could not be read. */
392
+ compareUrl: z.string().optional(),
393
+ /** Why the last `overnight push-prep` did not push this branch; cleared once it is pushed. */
394
+ pushProblem: z.string().optional(),
384
395
  });
385
396
  /** The latest overnight run (#1574); `startup` surfaces its freshness. */
386
397
  export const OvernightRecordSchema = z.object({
@@ -390,9 +401,19 @@ export const OvernightRecordSchema = z.object({
390
401
  judgmentCount: z.number().int().nonnegative(),
391
402
  prepared: z.array(OvernightPreparedSchema).default([]),
392
403
  });
393
- /** Mirrors oss-scout's `searchRotation` (broad-phase language cursor). */
404
+ /**
405
+ * Mirrors oss-scout's `searchRotation`: the broad-phase language cursor, the
406
+ * repo-window cursors of the capped phases, and the round-robin strategy
407
+ * cursor (oss-scout 1.7.0). Every field must be listed: z.object strips
408
+ * unknown keys, so a cursor missing here would be dropped on every load and
409
+ * scout's rotation would restart from 0 each search.
410
+ */
394
411
  export const SearchRotationSchema = z.object({
395
412
  languageOffset: z.number().int().nonnegative().default(0),
413
+ phase0Offset: z.number().int().nonnegative().default(0),
414
+ starredOffset: z.number().int().nonnegative().default(0),
415
+ maintainedOffset: z.number().int().nonnegative().default(0),
416
+ strategyOffset: z.number().int().nonnegative().default(0),
396
417
  lastRotatedAt: z.string().optional(),
397
418
  });
398
419
  export const AgentStateSchema = z.object({
@@ -1205,6 +1205,33 @@ export declare const LocalReposOutputSchema: z.ZodObject<{
1205
1205
  cachedAt: z.ZodString;
1206
1206
  fromCache: z.ZodBoolean;
1207
1207
  }, z.core.$strip>;
1208
+ export declare const OvernightPushPrepOutputSchema: z.ZodObject<{
1209
+ dryRun: z.ZodBoolean;
1210
+ login: z.ZodString;
1211
+ reportPath: z.ZodString;
1212
+ results: z.ZodArray<z.ZodObject<{
1213
+ url: z.ZodString;
1214
+ branch: z.ZodString;
1215
+ status: z.ZodEnum<{
1216
+ skipped: "skipped";
1217
+ failed: "failed";
1218
+ pushed: "pushed";
1219
+ planned: "planned";
1220
+ }>;
1221
+ remote: z.ZodOptional<z.ZodString>;
1222
+ repo: z.ZodOptional<z.ZodString>;
1223
+ ref: z.ZodOptional<z.ZodString>;
1224
+ compareUrl: z.ZodOptional<z.ZodString>;
1225
+ reason: z.ZodOptional<z.ZodString>;
1226
+ }, z.core.$strip>>;
1227
+ pushed: z.ZodNumber;
1228
+ planned: z.ZodNumber;
1229
+ skipped: z.ZodNumber;
1230
+ failed: z.ZodNumber;
1231
+ reportRecreated: z.ZodOptional<z.ZodLiteral<true>>;
1232
+ reportWarning: z.ZodOptional<z.ZodString>;
1233
+ gistSyncWarning: z.ZodOptional<z.ZodString>;
1234
+ }, z.core.$strip>;
1208
1235
  /**
1209
1236
  * Compact summary of an issue's first linked PR, surfaced on candidate
1210
1237
  * outputs (#97 / scout 0.9.0). `isStalled` is `true` when the PR is open
@@ -753,6 +753,35 @@ export const LocalReposOutputSchema = z.object({
753
753
  cachedAt: z.string(),
754
754
  fromCache: z.boolean(),
755
755
  });
756
+ /** One prepared branch as `overnight push-prep` (#1698) handled it. */
757
+ const PushPrepResultSchema = z.object({
758
+ url: z.string(),
759
+ branch: z.string(),
760
+ /** `skipped`: a gate said no (nothing to fix tonight). `failed`: the push itself broke. */
761
+ status: z.enum(['pushed', 'planned', 'skipped', 'failed']),
762
+ remote: z.string().optional(),
763
+ repo: z.string().optional(),
764
+ /** Always under `refs/heads/prep/`. */
765
+ ref: z.string().startsWith('refs/heads/prep/').optional(),
766
+ compareUrl: z.string().optional(),
767
+ reason: z.string().optional(),
768
+ });
769
+ export const OvernightPushPrepOutputSchema = z.object({
770
+ dryRun: z.boolean(),
771
+ login: z.string(),
772
+ reportPath: z.string(),
773
+ results: z.array(PushPrepResultSchema),
774
+ pushed: z.number().int().nonnegative(),
775
+ planned: z.number().int().nonnegative(),
776
+ skipped: z.number().int().nonnegative(),
777
+ /** Any failed push makes the CLI exit 1, so a scheduler sees it. */
778
+ failed: z.number().int().nonnegative(),
779
+ /** The report file was missing and has been recreated with only the prepared section. */
780
+ reportRecreated: z.literal(true).optional(),
781
+ /** The pushes and state are recorded, but the report file could not be rewritten. */
782
+ reportWarning: z.string().optional(),
783
+ gistSyncWarning: z.string().optional(),
784
+ });
756
785
  /**
757
786
  * Convert a full StartupOutput to the compact format (#763).
758
787
  * Uses destructuring to auto-forward any new fields added to StartupOutput.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oss-autopilot/core",
3
- "version": "3.22.3",
3
+ "version": "3.23.0",
4
4
  "description": "CLI and core library for managing open source contributions",
5
5
  "type": "module",
6
6
  "bin": {
@@ -55,7 +55,7 @@
55
55
  "@octokit/plugin-retry": "^8.1.1",
56
56
  "@octokit/plugin-throttling": "^11.0.5",
57
57
  "@octokit/rest": "^22.0.1",
58
- "@oss-scout/core": "^1.6.0",
58
+ "@oss-scout/core": "^1.7.0",
59
59
  "commander": "^15.0.0",
60
60
  "zod": "^4.5.4"
61
61
  },