@oss-autopilot/core 3.34.0 → 3.35.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.
@@ -6,9 +6,14 @@
6
6
  * re-exported through types.ts.
7
7
  *
8
8
  * Schemas are defined bottom-up (leaf types first, composites last).
9
- * Unknown keys are stripped by default (Zod 4 behavior).
9
+ * Unknown keys are stripped by default (Zod 4 behavior), EXCEPT on the schemas
10
+ * marked `.passthrough()` (#1831): see the note above AgentStateSchema.
10
11
  */
11
12
  import { z } from 'zod';
13
+ /** Drops the `[k: string]: unknown` index signature `.passthrough()` adds to an inferred type. */
14
+ type KnownKeys<T> = {
15
+ [K in keyof T as string extends K ? never : K]: T[K];
16
+ };
12
17
  import type { FetchedPR } from './types.js';
13
18
  export declare const IssueStatusSchema: z.ZodEnum<{
14
19
  candidate: "candidate";
@@ -59,7 +64,7 @@ export declare const RepoScoreSchema: z.ZodObject<{
59
64
  }, z.core.$strip>;
60
65
  stargazersCount: z.ZodOptional<z.ZodNumber>;
61
66
  language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
- }, z.core.$strip>;
67
+ }, z.core.$loose>;
63
68
  /**
64
69
  * What the tool predicted about an issue when it was vetted (#1824). Recorded
65
70
  * by `vet` / `vet-list` keyed by issue URL, then copied onto the outcome
@@ -71,13 +76,9 @@ export declare const PickSnapshotSchema: z.ZodObject<{
71
76
  grade: z.ZodNumber;
72
77
  recommendation: z.ZodString;
73
78
  stargazersCount: z.ZodOptional<z.ZodNumber>;
74
- source: z.ZodEnum<{
75
- vet: "vet";
76
- "vet-list": "vet-list";
77
- list: "list";
78
- }>;
79
+ source: z.ZodCustom<(string & {}) | "vet" | "vet-list" | "list", (string & {}) | "vet" | "vet-list" | "list">;
79
80
  capturedAt: z.ZodOptional<z.ZodString>;
80
- }, z.core.$strip>;
81
+ }, z.core.$loose>;
81
82
  export declare const StoredMergedPRSchema: z.ZodObject<{
82
83
  issueUrl: z.ZodOptional<z.ZodString>;
83
84
  pick: z.ZodOptional<z.ZodObject<{
@@ -85,13 +86,9 @@ export declare const StoredMergedPRSchema: z.ZodObject<{
85
86
  grade: z.ZodNumber;
86
87
  recommendation: z.ZodString;
87
88
  stargazersCount: z.ZodOptional<z.ZodNumber>;
88
- source: z.ZodEnum<{
89
- vet: "vet";
90
- "vet-list": "vet-list";
91
- list: "list";
92
- }>;
89
+ source: z.ZodCustom<(string & {}) | "vet" | "vet-list" | "list", (string & {}) | "vet" | "vet-list" | "list">;
93
90
  capturedAt: z.ZodOptional<z.ZodString>;
94
- }, z.core.$strip>>;
91
+ }, z.core.$loose>>;
95
92
  lastReviewDecision: z.ZodOptional<z.ZodString>;
96
93
  lastCiStatus: z.ZodOptional<z.ZodString>;
97
94
  backfilledAt: z.ZodOptional<z.ZodString>;
@@ -102,29 +99,19 @@ export declare const StoredMergedPRSchema: z.ZodObject<{
102
99
  firstMaintainerResponseAt: z.ZodOptional<z.ZodString>;
103
100
  commentsFetchedAt: z.ZodOptional<z.ZodString>;
104
101
  learningsExtractedAt: z.ZodOptional<z.ZodString>;
105
- }, z.core.$strip>;
102
+ }, z.core.$loose>;
106
103
  export declare const StoredClosedPRSchema: z.ZodObject<{
107
- closeReason: z.ZodOptional<z.ZodEnum<{
108
- unknown: "unknown";
109
- rejected: "rejected";
110
- "ai-policy": "ai-policy";
111
- superseded: "superseded";
112
- stale: "stale";
113
- "self-closed": "self-closed";
114
- }>>;
104
+ closeReason: z.ZodOptional<z.ZodCustom<"unknown" | "rejected" | (string & {}) | "ai-policy" | "superseded" | "stale" | "self-closed", "unknown" | "rejected" | (string & {}) | "ai-policy" | "superseded" | "stale" | "self-closed">>;
105
+ selfCloseReason: z.ZodOptional<z.ZodCustom<(string & {}) | "superseded" | "no-traction" | "after-feedback" | "no-response", (string & {}) | "superseded" | "no-traction" | "after-feedback" | "no-response">>;
115
106
  issueUrl: z.ZodOptional<z.ZodString>;
116
107
  pick: z.ZodOptional<z.ZodObject<{
117
108
  issueUrl: z.ZodString;
118
109
  grade: z.ZodNumber;
119
110
  recommendation: z.ZodString;
120
111
  stargazersCount: z.ZodOptional<z.ZodNumber>;
121
- source: z.ZodEnum<{
122
- vet: "vet";
123
- "vet-list": "vet-list";
124
- list: "list";
125
- }>;
112
+ source: z.ZodCustom<(string & {}) | "vet" | "vet-list" | "list", (string & {}) | "vet" | "vet-list" | "list">;
126
113
  capturedAt: z.ZodOptional<z.ZodString>;
127
- }, z.core.$strip>>;
114
+ }, z.core.$loose>>;
128
115
  lastReviewDecision: z.ZodOptional<z.ZodString>;
129
116
  lastCiStatus: z.ZodOptional<z.ZodString>;
130
117
  backfilledAt: z.ZodOptional<z.ZodString>;
@@ -135,7 +122,7 @@ export declare const StoredClosedPRSchema: z.ZodObject<{
135
122
  firstMaintainerResponseAt: z.ZodOptional<z.ZodString>;
136
123
  commentsFetchedAt: z.ZodOptional<z.ZodString>;
137
124
  learningsExtractedAt: z.ZodOptional<z.ZodString>;
138
- }, z.core.$strip>;
125
+ }, z.core.$loose>;
139
126
  export declare const AnalyzedIssueConversationSchema: z.ZodObject<{
140
127
  url: z.ZodString;
141
128
  repo: z.ZodString;
@@ -294,7 +281,7 @@ export declare const StatusOverrideSchema: z.ZodObject<{
294
281
  setAt: z.ZodString;
295
282
  lastActivityAt: z.ZodString;
296
283
  }, z.core.$strip>;
297
- export declare const AgentConfigSchema: z.ZodObject<{
284
+ export declare const AgentConfigSchema: z.ZodPipe<z.ZodObject<{
298
285
  setupComplete: z.ZodDefault<z.ZodBoolean>;
299
286
  setupCompletedAt: z.ZodOptional<z.ZodString>;
300
287
  persistence: z.ZodDefault<z.ZodEnum<{
@@ -363,7 +350,103 @@ export declare const AgentConfigSchema: z.ZodObject<{
363
350
  reviewMaxPasses: z.ZodOptional<z.ZodNumber>;
364
351
  slmTriageModel: z.ZodDefault<z.ZodString>;
365
352
  slmTriageHost: z.ZodDefault<z.ZodString>;
366
- }, z.core.$strip>;
353
+ }, z.core.$loose>, z.ZodTransform<{
354
+ [x: string]: unknown;
355
+ setupComplete: boolean;
356
+ persistence: "local" | "gist";
357
+ maxActivePRs: number;
358
+ dormantThresholdDays: number;
359
+ approachingDormantDays: number;
360
+ maxIssueAgeDays: number;
361
+ skipBroadWhenSufficientResults: number;
362
+ languages: string[];
363
+ labels: string[];
364
+ excludeRepos: string[];
365
+ untrackedOrgs: string[];
366
+ avoidRepos: string[];
367
+ boostIssueTypes: string[];
368
+ trustedProjects: string[];
369
+ githubUsername: string;
370
+ minRepoScoreThreshold: number;
371
+ starredRepos: string[];
372
+ squashByDefault: boolean | "ask";
373
+ minStars: number;
374
+ includeDocIssues: boolean;
375
+ aiPolicyBlocklist: string[];
376
+ shelvedPRUrls: string[];
377
+ dismissedIssues: Record<string, string>;
378
+ projectCategories: ("nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education")[];
379
+ preferredOrgs: string[];
380
+ diffTool: "inline" | "custom" | "sourcetree" | "vscode";
381
+ autoExtractLearnings: boolean;
382
+ autoFormatBeforePush: boolean;
383
+ trustOwnRepoWrites: boolean;
384
+ healthCheckFreshnessMinutes: number;
385
+ slmTriageModel: string;
386
+ slmTriageHost: string;
387
+ setupCompletedAt?: string | undefined;
388
+ scope?: ("advanced" | "beginner" | "intermediate")[] | undefined;
389
+ excludeOrgs?: string[] | undefined;
390
+ starredReposLastFetched?: string | undefined;
391
+ localRepoScanPaths?: string[] | undefined;
392
+ statusOverrides?: Record<string, {
393
+ status: "needs_addressing" | "waiting_on_maintainer";
394
+ setAt: string;
395
+ lastActivityAt: string;
396
+ }> | undefined;
397
+ issueListPath?: string | undefined;
398
+ skippedIssuesPath?: string | undefined;
399
+ diffToolCustomCommand?: string | undefined;
400
+ reviewMaxPasses?: number | undefined;
401
+ }, {
402
+ [x: string]: unknown;
403
+ setupComplete: boolean;
404
+ persistence: "local" | "gist";
405
+ maxActivePRs: number;
406
+ dormantThresholdDays: number;
407
+ approachingDormantDays: number;
408
+ maxIssueAgeDays: number;
409
+ skipBroadWhenSufficientResults: number;
410
+ languages: string[];
411
+ labels: string[];
412
+ excludeRepos: string[];
413
+ untrackedOrgs: string[];
414
+ avoidRepos: string[];
415
+ boostIssueTypes: string[];
416
+ trustedProjects: string[];
417
+ githubUsername: string;
418
+ minRepoScoreThreshold: number;
419
+ starredRepos: string[];
420
+ squashByDefault: boolean | "ask";
421
+ minStars: number;
422
+ includeDocIssues: boolean;
423
+ aiPolicyBlocklist: string[];
424
+ shelvedPRUrls: string[];
425
+ dismissedIssues: Record<string, string>;
426
+ projectCategories: ("nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education")[];
427
+ preferredOrgs: string[];
428
+ diffTool: "inline" | "custom" | "sourcetree" | "vscode";
429
+ autoExtractLearnings: boolean;
430
+ autoFormatBeforePush: boolean;
431
+ trustOwnRepoWrites: boolean;
432
+ healthCheckFreshnessMinutes: number;
433
+ slmTriageModel: string;
434
+ slmTriageHost: string;
435
+ setupCompletedAt?: string | undefined;
436
+ scope?: ("advanced" | "beginner" | "intermediate")[] | undefined;
437
+ excludeOrgs?: string[] | undefined;
438
+ starredReposLastFetched?: string | undefined;
439
+ localRepoScanPaths?: string[] | undefined;
440
+ statusOverrides?: Record<string, {
441
+ status: "needs_addressing" | "waiting_on_maintainer";
442
+ setAt: string;
443
+ lastActivityAt: string;
444
+ }> | undefined;
445
+ issueListPath?: string | undefined;
446
+ skippedIssuesPath?: string | undefined;
447
+ diffToolCustomCommand?: string | undefined;
448
+ reviewMaxPasses?: number | undefined;
449
+ }>>;
367
450
  export declare const LocalRepoCacheSchema: z.ZodObject<{
368
451
  repos: z.ZodRecord<z.ZodString, z.ZodObject<{
369
452
  path: z.ZodString;
@@ -498,7 +581,7 @@ export declare const OvernightPreparedSchema: z.ZodObject<{
498
581
  pushedAt: z.ZodOptional<z.ZodString>;
499
582
  compareUrl: z.ZodOptional<z.ZodString>;
500
583
  pushProblem: z.ZodOptional<z.ZodString>;
501
- }, z.core.$strip>;
584
+ }, z.core.$loose>;
502
585
  /** The latest overnight run (#1574); `startup` surfaces its freshness. */
503
586
  /**
504
587
  * One list issue the overnight run tried to implement (#1715). Kept across
@@ -513,7 +596,7 @@ export declare const OvernightImplementAttemptSchema: z.ZodObject<{
513
596
  prepared: "prepared";
514
597
  }>;
515
598
  note: z.ZodOptional<z.ZodString>;
516
- }, z.core.$strip>;
599
+ }, z.core.$loose>;
517
600
  export declare const OvernightRecordSchema: z.ZodObject<{
518
601
  runAt: z.ZodString;
519
602
  reportPath: z.ZodString;
@@ -529,7 +612,7 @@ export declare const OvernightRecordSchema: z.ZodObject<{
529
612
  pushedAt: z.ZodOptional<z.ZodString>;
530
613
  compareUrl: z.ZodOptional<z.ZodString>;
531
614
  pushProblem: z.ZodOptional<z.ZodString>;
532
- }, z.core.$strip>>>;
615
+ }, z.core.$loose>>>;
533
616
  implementUrl: z.ZodOptional<z.ZodString>;
534
617
  implementAttempts: z.ZodOptional<z.ZodArray<z.ZodObject<{
535
618
  url: z.ZodString;
@@ -539,14 +622,14 @@ export declare const OvernightRecordSchema: z.ZodObject<{
539
622
  prepared: "prepared";
540
623
  }>;
541
624
  note: z.ZodOptional<z.ZodString>;
542
- }, z.core.$strip>>>;
543
- }, z.core.$strip>;
625
+ }, z.core.$loose>>>;
626
+ }, z.core.$loose>;
544
627
  /**
545
628
  * Mirrors oss-scout's `searchRotation`: the broad-phase language cursor, the
546
629
  * repo-window cursors of the capped phases, and the round-robin strategy
547
- * cursor (oss-scout 1.7.0). Every field must be listed: z.object strips
548
- * unknown keys, so a cursor missing here would be dropped on every load and
549
- * scout's rotation would restart from 0 each search.
630
+ * cursor (oss-scout 1.7.0). List every cursor so it gets its default;
631
+ * passthrough (#1831) keeps a cursor added by a newer bundled scout instead of
632
+ * resetting it to 0 on this release's next save.
550
633
  */
551
634
  export declare const SearchRotationSchema: z.ZodObject<{
552
635
  languageOffset: z.ZodDefault<z.ZodNumber>;
@@ -555,7 +638,18 @@ export declare const SearchRotationSchema: z.ZodObject<{
555
638
  maintainedOffset: z.ZodDefault<z.ZodNumber>;
556
639
  strategyOffset: z.ZodDefault<z.ZodNumber>;
557
640
  lastRotatedAt: z.ZodOptional<z.ZodString>;
558
- }, z.core.$strip>;
641
+ }, z.core.$loose>;
642
+ /**
643
+ * Forward compatibility (#1831). The state Gist is shared by clients on
644
+ * different releases, and a strict parse let an older client drop a newer
645
+ * release's fields on its next save. Schemas for data that is written once and
646
+ * kept (root, config, repoScores, the outcome ledger and pick snapshots,
647
+ * lastOvernight, searchRotation) are `.passthrough()`; schemas regenerated on
648
+ * every run (lastDigest) or rarely extended still strip. Persisted enums that
649
+ * grow (closeReason, pick source) accept unknown strings via {@link openEnum}.
650
+ * Inferred types drop the passthrough index signature ({@link KnownKeys}) so a
651
+ * misspelled key still fails to compile.
652
+ */
559
653
  export declare const AgentStateSchema: z.ZodObject<{
560
654
  version: z.ZodLiteral<4>;
561
655
  gistId: z.ZodOptional<z.ZodString>;
@@ -574,8 +668,8 @@ export declare const AgentStateSchema: z.ZodObject<{
574
668
  }, z.core.$strip>;
575
669
  stargazersCount: z.ZodOptional<z.ZodNumber>;
576
670
  language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
577
- }, z.core.$strip>>>;
578
- config: z.ZodDefault<z.ZodObject<{
671
+ }, z.core.$loose>>>;
672
+ config: z.ZodDefault<z.ZodPipe<z.ZodObject<{
579
673
  setupComplete: z.ZodDefault<z.ZodBoolean>;
580
674
  setupCompletedAt: z.ZodOptional<z.ZodString>;
581
675
  persistence: z.ZodDefault<z.ZodEnum<{
@@ -644,7 +738,103 @@ export declare const AgentStateSchema: z.ZodObject<{
644
738
  reviewMaxPasses: z.ZodOptional<z.ZodNumber>;
645
739
  slmTriageModel: z.ZodDefault<z.ZodString>;
646
740
  slmTriageHost: z.ZodDefault<z.ZodString>;
647
- }, z.core.$strip>>;
741
+ }, z.core.$loose>, z.ZodTransform<{
742
+ [x: string]: unknown;
743
+ setupComplete: boolean;
744
+ persistence: "local" | "gist";
745
+ maxActivePRs: number;
746
+ dormantThresholdDays: number;
747
+ approachingDormantDays: number;
748
+ maxIssueAgeDays: number;
749
+ skipBroadWhenSufficientResults: number;
750
+ languages: string[];
751
+ labels: string[];
752
+ excludeRepos: string[];
753
+ untrackedOrgs: string[];
754
+ avoidRepos: string[];
755
+ boostIssueTypes: string[];
756
+ trustedProjects: string[];
757
+ githubUsername: string;
758
+ minRepoScoreThreshold: number;
759
+ starredRepos: string[];
760
+ squashByDefault: boolean | "ask";
761
+ minStars: number;
762
+ includeDocIssues: boolean;
763
+ aiPolicyBlocklist: string[];
764
+ shelvedPRUrls: string[];
765
+ dismissedIssues: Record<string, string>;
766
+ projectCategories: ("nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education")[];
767
+ preferredOrgs: string[];
768
+ diffTool: "inline" | "custom" | "sourcetree" | "vscode";
769
+ autoExtractLearnings: boolean;
770
+ autoFormatBeforePush: boolean;
771
+ trustOwnRepoWrites: boolean;
772
+ healthCheckFreshnessMinutes: number;
773
+ slmTriageModel: string;
774
+ slmTriageHost: string;
775
+ setupCompletedAt?: string | undefined;
776
+ scope?: ("advanced" | "beginner" | "intermediate")[] | undefined;
777
+ excludeOrgs?: string[] | undefined;
778
+ starredReposLastFetched?: string | undefined;
779
+ localRepoScanPaths?: string[] | undefined;
780
+ statusOverrides?: Record<string, {
781
+ status: "needs_addressing" | "waiting_on_maintainer";
782
+ setAt: string;
783
+ lastActivityAt: string;
784
+ }> | undefined;
785
+ issueListPath?: string | undefined;
786
+ skippedIssuesPath?: string | undefined;
787
+ diffToolCustomCommand?: string | undefined;
788
+ reviewMaxPasses?: number | undefined;
789
+ }, {
790
+ [x: string]: unknown;
791
+ setupComplete: boolean;
792
+ persistence: "local" | "gist";
793
+ maxActivePRs: number;
794
+ dormantThresholdDays: number;
795
+ approachingDormantDays: number;
796
+ maxIssueAgeDays: number;
797
+ skipBroadWhenSufficientResults: number;
798
+ languages: string[];
799
+ labels: string[];
800
+ excludeRepos: string[];
801
+ untrackedOrgs: string[];
802
+ avoidRepos: string[];
803
+ boostIssueTypes: string[];
804
+ trustedProjects: string[];
805
+ githubUsername: string;
806
+ minRepoScoreThreshold: number;
807
+ starredRepos: string[];
808
+ squashByDefault: boolean | "ask";
809
+ minStars: number;
810
+ includeDocIssues: boolean;
811
+ aiPolicyBlocklist: string[];
812
+ shelvedPRUrls: string[];
813
+ dismissedIssues: Record<string, string>;
814
+ projectCategories: ("nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education")[];
815
+ preferredOrgs: string[];
816
+ diffTool: "inline" | "custom" | "sourcetree" | "vscode";
817
+ autoExtractLearnings: boolean;
818
+ autoFormatBeforePush: boolean;
819
+ trustOwnRepoWrites: boolean;
820
+ healthCheckFreshnessMinutes: number;
821
+ slmTriageModel: string;
822
+ slmTriageHost: string;
823
+ setupCompletedAt?: string | undefined;
824
+ scope?: ("advanced" | "beginner" | "intermediate")[] | undefined;
825
+ excludeOrgs?: string[] | undefined;
826
+ starredReposLastFetched?: string | undefined;
827
+ localRepoScanPaths?: string[] | undefined;
828
+ statusOverrides?: Record<string, {
829
+ status: "needs_addressing" | "waiting_on_maintainer";
830
+ setAt: string;
831
+ lastActivityAt: string;
832
+ }> | undefined;
833
+ issueListPath?: string | undefined;
834
+ skippedIssuesPath?: string | undefined;
835
+ diffToolCustomCommand?: string | undefined;
836
+ reviewMaxPasses?: number | undefined;
837
+ }>>>;
648
838
  lastRunAt: z.ZodDefault<z.ZodString>;
649
839
  lastDigestAt: z.ZodOptional<z.ZodString>;
650
840
  lastStrategyAt: z.ZodOptional<z.ZodString>;
@@ -720,13 +910,9 @@ export declare const AgentStateSchema: z.ZodObject<{
720
910
  grade: z.ZodNumber;
721
911
  recommendation: z.ZodString;
722
912
  stargazersCount: z.ZodOptional<z.ZodNumber>;
723
- source: z.ZodEnum<{
724
- vet: "vet";
725
- "vet-list": "vet-list";
726
- list: "list";
727
- }>;
913
+ source: z.ZodCustom<(string & {}) | "vet" | "vet-list" | "list", (string & {}) | "vet" | "vet-list" | "list">;
728
914
  capturedAt: z.ZodOptional<z.ZodString>;
729
- }, z.core.$strip>>;
915
+ }, z.core.$loose>>;
730
916
  lastReviewDecision: z.ZodOptional<z.ZodString>;
731
917
  lastCiStatus: z.ZodOptional<z.ZodString>;
732
918
  backfilledAt: z.ZodOptional<z.ZodString>;
@@ -737,29 +923,19 @@ export declare const AgentStateSchema: z.ZodObject<{
737
923
  firstMaintainerResponseAt: z.ZodOptional<z.ZodString>;
738
924
  commentsFetchedAt: z.ZodOptional<z.ZodString>;
739
925
  learningsExtractedAt: z.ZodOptional<z.ZodString>;
740
- }, z.core.$strip>>>;
926
+ }, z.core.$loose>>>;
741
927
  closedPRs: z.ZodOptional<z.ZodArray<z.ZodObject<{
742
- closeReason: z.ZodOptional<z.ZodEnum<{
743
- unknown: "unknown";
744
- rejected: "rejected";
745
- "ai-policy": "ai-policy";
746
- superseded: "superseded";
747
- stale: "stale";
748
- "self-closed": "self-closed";
749
- }>>;
928
+ closeReason: z.ZodOptional<z.ZodCustom<"unknown" | "rejected" | (string & {}) | "ai-policy" | "superseded" | "stale" | "self-closed", "unknown" | "rejected" | (string & {}) | "ai-policy" | "superseded" | "stale" | "self-closed">>;
929
+ selfCloseReason: z.ZodOptional<z.ZodCustom<(string & {}) | "superseded" | "no-traction" | "after-feedback" | "no-response", (string & {}) | "superseded" | "no-traction" | "after-feedback" | "no-response">>;
750
930
  issueUrl: z.ZodOptional<z.ZodString>;
751
931
  pick: z.ZodOptional<z.ZodObject<{
752
932
  issueUrl: z.ZodString;
753
933
  grade: z.ZodNumber;
754
934
  recommendation: z.ZodString;
755
935
  stargazersCount: z.ZodOptional<z.ZodNumber>;
756
- source: z.ZodEnum<{
757
- vet: "vet";
758
- "vet-list": "vet-list";
759
- list: "list";
760
- }>;
936
+ source: z.ZodCustom<(string & {}) | "vet" | "vet-list" | "list", (string & {}) | "vet" | "vet-list" | "list">;
761
937
  capturedAt: z.ZodOptional<z.ZodString>;
762
- }, z.core.$strip>>;
938
+ }, z.core.$loose>>;
763
939
  lastReviewDecision: z.ZodOptional<z.ZodString>;
764
940
  lastCiStatus: z.ZodOptional<z.ZodString>;
765
941
  backfilledAt: z.ZodOptional<z.ZodString>;
@@ -770,7 +946,7 @@ export declare const AgentStateSchema: z.ZodObject<{
770
946
  firstMaintainerResponseAt: z.ZodOptional<z.ZodString>;
771
947
  commentsFetchedAt: z.ZodOptional<z.ZodString>;
772
948
  learningsExtractedAt: z.ZodOptional<z.ZodString>;
773
- }, z.core.$strip>>>;
949
+ }, z.core.$loose>>>;
774
950
  analyzedIssueConversations: z.ZodOptional<z.ZodArray<z.ZodObject<{
775
951
  url: z.ZodString;
776
952
  repo: z.ZodString;
@@ -854,13 +1030,9 @@ export declare const AgentStateSchema: z.ZodObject<{
854
1030
  grade: z.ZodNumber;
855
1031
  recommendation: z.ZodString;
856
1032
  stargazersCount: z.ZodOptional<z.ZodNumber>;
857
- source: z.ZodEnum<{
858
- vet: "vet";
859
- "vet-list": "vet-list";
860
- list: "list";
861
- }>;
1033
+ source: z.ZodCustom<(string & {}) | "vet" | "vet-list" | "list", (string & {}) | "vet" | "vet-list" | "list">;
862
1034
  capturedAt: z.ZodOptional<z.ZodString>;
863
- }, z.core.$strip>>>;
1035
+ }, z.core.$loose>>>;
864
1036
  lastOvernight: z.ZodOptional<z.ZodObject<{
865
1037
  runAt: z.ZodString;
866
1038
  reportPath: z.ZodString;
@@ -876,7 +1048,7 @@ export declare const AgentStateSchema: z.ZodObject<{
876
1048
  pushedAt: z.ZodOptional<z.ZodString>;
877
1049
  compareUrl: z.ZodOptional<z.ZodString>;
878
1050
  pushProblem: z.ZodOptional<z.ZodString>;
879
- }, z.core.$strip>>>;
1051
+ }, z.core.$loose>>>;
880
1052
  implementUrl: z.ZodOptional<z.ZodString>;
881
1053
  implementAttempts: z.ZodOptional<z.ZodArray<z.ZodObject<{
882
1054
  url: z.ZodString;
@@ -886,8 +1058,8 @@ export declare const AgentStateSchema: z.ZodObject<{
886
1058
  prepared: "prepared";
887
1059
  }>;
888
1060
  note: z.ZodOptional<z.ZodString>;
889
- }, z.core.$strip>>>;
890
- }, z.core.$strip>>;
1061
+ }, z.core.$loose>>>;
1062
+ }, z.core.$loose>>;
891
1063
  searchRotation: z.ZodOptional<z.ZodObject<{
892
1064
  languageOffset: z.ZodDefault<z.ZodNumber>;
893
1065
  phase0Offset: z.ZodDefault<z.ZodNumber>;
@@ -895,33 +1067,47 @@ export declare const AgentStateSchema: z.ZodObject<{
895
1067
  maintainedOffset: z.ZodDefault<z.ZodNumber>;
896
1068
  strategyOffset: z.ZodDefault<z.ZodNumber>;
897
1069
  lastRotatedAt: z.ZodOptional<z.ZodString>;
898
- }, z.core.$strip>>;
899
- }, z.core.$strip>;
1070
+ }, z.core.$loose>>;
1071
+ }, z.core.$loose>;
900
1072
  export type IssueStatus = z.infer<typeof IssueStatusSchema>;
901
1073
  export type FetchedPRStatus = z.infer<typeof FetchedPRStatusSchema>;
902
1074
  export type ProjectCategory = z.infer<typeof ProjectCategorySchema>;
903
1075
  export type IssueScope = z.infer<typeof IssueScopeSchema>;
904
1076
  export type DiffTool = z.infer<typeof DiffToolSchema>;
905
1077
  export type SearchSeenEntry = z.infer<typeof SearchSeenEntrySchema>;
906
- export type PickSnapshot = z.infer<typeof PickSnapshotSchema>;
907
- export type OvernightPrepared = z.infer<typeof OvernightPreparedSchema>;
908
- export type OvernightRecord = z.infer<typeof OvernightRecordSchema>;
909
- export type OvernightImplementAttempt = z.infer<typeof OvernightImplementAttemptSchema>;
910
- export type SearchRotation = z.infer<typeof SearchRotationSchema>;
1078
+ export type PickSnapshot = KnownKeys<z.infer<typeof PickSnapshotSchema>>;
1079
+ export type OvernightPrepared = KnownKeys<z.infer<typeof OvernightPreparedSchema>>;
1080
+ export type OvernightRecord = KnownKeys<z.infer<typeof OvernightRecordSchema>>;
1081
+ export type OvernightImplementAttempt = KnownKeys<z.infer<typeof OvernightImplementAttemptSchema>>;
1082
+ export type SearchRotation = KnownKeys<z.infer<typeof SearchRotationSchema>>;
911
1083
  export type RepoSignals = z.infer<typeof RepoSignalsSchema>;
912
- export type RepoScore = z.infer<typeof RepoScoreSchema>;
913
- export type StoredMergedPR = z.infer<typeof StoredMergedPRSchema>;
914
- export type StoredClosedPR = z.infer<typeof StoredClosedPRSchema>;
1084
+ export type RepoScore = KnownKeys<z.infer<typeof RepoScoreSchema>>;
1085
+ export type StoredMergedPR = KnownKeys<z.infer<typeof StoredMergedPRSchema>>;
1086
+ export type StoredClosedPR = KnownKeys<z.infer<typeof StoredClosedPRSchema>>;
915
1087
  export type AnalyzedIssueConversation = z.infer<typeof AnalyzedIssueConversationSchema>;
916
1088
  export type ContributionGuidelines = z.infer<typeof ContributionGuidelinesSchema>;
917
1089
  export type IssueVettingResult = z.infer<typeof IssueVettingResultSchema>;
918
1090
  export type TrackedIssue = z.infer<typeof TrackedIssueSchema>;
919
1091
  export type ShelvedPRRef = z.infer<typeof ShelvedPRRefSchema>;
920
1092
  export type StatusOverride = z.infer<typeof StatusOverrideSchema>;
921
- export type AgentConfig = z.infer<typeof AgentConfigSchema>;
1093
+ export type AgentConfig = KnownKeys<z.infer<typeof AgentConfigSchema>>;
922
1094
  export type LocalRepoCache = z.infer<typeof LocalRepoCacheSchema>;
923
1095
  export type ClosedPR = z.infer<typeof ClosedPRSchema>;
924
1096
  export type MergedPR = z.infer<typeof MergedPRSchema>;
925
1097
  export type DailyDigestSummary = z.infer<typeof DailyDigestSummarySchema>;
926
1098
  export type DailyDigest = z.infer<typeof DailyDigestSchema>;
927
- export type AgentState = z.infer<typeof AgentStateSchema>;
1099
+ type RawAgentState = z.infer<typeof AgentStateSchema>;
1100
+ export type AgentState = Omit<KnownKeys<RawAgentState>, 'config' | 'repoScores' | 'mergedPRs' | 'closedPRs' | 'pickSnapshots' | 'lastOvernight' | 'searchRotation'> & {
1101
+ config: AgentConfig;
1102
+ repoScores: Record<string, RepoScore>;
1103
+ mergedPRs?: StoredMergedPR[];
1104
+ closedPRs?: StoredClosedPR[];
1105
+ pickSnapshots: PickSnapshot[];
1106
+ lastOvernight?: OvernightRecord;
1107
+ searchRotation?: SearchRotation;
1108
+ };
1109
+ /** Top-level state keys this release does not know, i.e. written by another (usually newer) release (#1831). */
1110
+ export declare function unknownStateKeys(raw: unknown): string[];
1111
+ /** Warning tail for state written by a newer release (#1831), shared by the Gist and local loaders. */
1112
+ export declare const NEWER_WRITER_HINT: string;
1113
+ export {};