@oss-autopilot/core 3.42.5 → 3.44.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 (192) hide show
  1. package/dist/cli-pre-action.js +8 -3
  2. package/dist/cli-registry.js +428 -27
  3. package/dist/cli.bundle.cjs +212 -156
  4. package/dist/commands/check-integration.js +5 -1
  5. package/dist/commands/cleanup.d.ts +80 -0
  6. package/dist/commands/cleanup.js +334 -0
  7. package/dist/commands/comments.d.ts +14 -1
  8. package/dist/commands/comments.js +17 -5
  9. package/dist/commands/config.d.ts +2 -0
  10. package/dist/commands/config.js +63 -6
  11. package/dist/commands/daily-dismiss-filter.d.ts +7 -0
  12. package/dist/commands/daily-dismiss-filter.js +17 -1
  13. package/dist/commands/daily-ledger.d.ts +150 -0
  14. package/dist/commands/daily-ledger.js +248 -0
  15. package/dist/commands/daily-recent-prs.d.ts +26 -0
  16. package/dist/commands/daily-recent-prs.js +55 -0
  17. package/dist/commands/daily-render.d.ts +2 -1
  18. package/dist/commands/daily-render.js +4 -1
  19. package/dist/commands/daily.d.ts +5 -1
  20. package/dist/commands/daily.js +83 -93
  21. package/dist/commands/dashboard-cache.d.ts +2 -0
  22. package/dist/commands/dashboard-cache.js +33 -8
  23. package/dist/commands/dashboard-data.js +113 -69
  24. package/dist/commands/dashboard-gist-sync.js +3 -1
  25. package/dist/commands/dashboard-lifecycle.d.ts +36 -8
  26. package/dist/commands/dashboard-lifecycle.js +132 -39
  27. package/dist/commands/dashboard-process.d.ts +49 -1
  28. package/dist/commands/dashboard-process.js +111 -12
  29. package/dist/commands/dashboard-server.js +89 -23
  30. package/dist/commands/detect-formatters.js +1 -0
  31. package/dist/commands/dismiss.js +11 -7
  32. package/dist/commands/doctor.d.ts +15 -1
  33. package/dist/commands/doctor.js +66 -5
  34. package/dist/commands/draft.d.ts +77 -0
  35. package/dist/commands/draft.js +218 -0
  36. package/dist/commands/eval.js +1 -0
  37. package/dist/commands/fork-prune.d.ts +58 -0
  38. package/dist/commands/fork-prune.js +247 -0
  39. package/dist/commands/guidelines.d.ts +69 -2
  40. package/dist/commands/guidelines.js +158 -14
  41. package/dist/commands/index.d.ts +29 -4
  42. package/dist/commands/index.js +20 -3
  43. package/dist/commands/issue-thread.d.ts +46 -0
  44. package/dist/commands/issue-thread.js +123 -0
  45. package/dist/commands/ledger-backfill.d.ts +9 -0
  46. package/dist/commands/ledger-backfill.js +44 -1
  47. package/dist/commands/list-mark-done.d.ts +2 -1
  48. package/dist/commands/list-mark-done.js +3 -1
  49. package/dist/commands/list-move-tier.d.ts +2 -1
  50. package/dist/commands/list-move-tier.js +3 -1
  51. package/dist/commands/local-repos.js +10 -5
  52. package/dist/commands/locate-issue-list.d.ts +40 -17
  53. package/dist/commands/locate-issue-list.js +148 -88
  54. package/dist/commands/move.js +7 -1
  55. package/dist/commands/overnight-handoff.d.ts +17 -7
  56. package/dist/commands/overnight-handoff.js +36 -14
  57. package/dist/commands/overnight-push-prep.d.ts +14 -8
  58. package/dist/commands/overnight-push-prep.js +107 -35
  59. package/dist/commands/overnight-tool-rules.d.ts +54 -0
  60. package/dist/commands/overnight-tool-rules.js +217 -0
  61. package/dist/commands/overnight.d.ts +5 -6
  62. package/dist/commands/overnight.js +61 -140
  63. package/dist/commands/parse-list.js +7 -1
  64. package/dist/commands/policy.d.ts +90 -0
  65. package/dist/commands/policy.js +276 -0
  66. package/dist/commands/pr-create.d.ts +48 -0
  67. package/dist/commands/pr-create.js +200 -0
  68. package/dist/commands/pr-preflight.d.ts +69 -0
  69. package/dist/commands/pr-preflight.js +348 -0
  70. package/dist/commands/repo-vet.d.ts +9 -0
  71. package/dist/commands/repo-vet.js +36 -11
  72. package/dist/commands/scout-bridge.js +18 -8
  73. package/dist/commands/search.js +7 -0
  74. package/dist/commands/setup.d.ts +3 -3
  75. package/dist/commands/setup.js +160 -48
  76. package/dist/commands/skip-add.js +10 -1
  77. package/dist/commands/startup.d.ts +12 -3
  78. package/dist/commands/startup.js +82 -49
  79. package/dist/commands/state-cmd.d.ts +2 -0
  80. package/dist/commands/state-cmd.js +5 -1
  81. package/dist/commands/stats.js +1 -0
  82. package/dist/commands/status.js +6 -0
  83. package/dist/commands/strategy.js +1 -0
  84. package/dist/commands/validation.d.ts +5 -0
  85. package/dist/commands/validation.js +5 -0
  86. package/dist/commands/vet-list.d.ts +6 -0
  87. package/dist/commands/vet-list.js +26 -1
  88. package/dist/commands/vet.d.ts +20 -0
  89. package/dist/commands/vet.js +133 -2
  90. package/dist/commands/work.d.ts +4 -0
  91. package/dist/commands/work.js +34 -11
  92. package/dist/core/__fixtures__/prompt-injection-payloads.js +31 -0
  93. package/dist/core/anti-llm-policy.d.ts +3 -0
  94. package/dist/core/anti-llm-policy.js +3 -0
  95. package/dist/core/auth.js +2 -0
  96. package/dist/core/ci-analysis.d.ts +7 -2
  97. package/dist/core/ci-analysis.js +76 -21
  98. package/dist/core/commit-date.d.ts +45 -0
  99. package/dist/core/commit-date.js +45 -0
  100. package/dist/core/compliance-score.d.ts +3 -0
  101. package/dist/core/compliance-score.js +13 -9
  102. package/dist/core/config-registry.d.ts +27 -2
  103. package/dist/core/config-registry.js +94 -7
  104. package/dist/core/contributing.d.ts +2 -3
  105. package/dist/core/contributing.js +2 -3
  106. package/dist/core/daily-logic.d.ts +30 -5
  107. package/dist/core/daily-logic.js +68 -19
  108. package/dist/core/errors.d.ts +37 -3
  109. package/dist/core/errors.js +54 -5
  110. package/dist/core/fork-prune.d.ts +149 -0
  111. package/dist/core/fork-prune.js +333 -0
  112. package/dist/core/gist-health.d.ts +15 -3
  113. package/dist/core/gist-health.js +8 -0
  114. package/dist/core/gist-state-store.d.ts +24 -4
  115. package/dist/core/gist-state-store.js +98 -51
  116. package/dist/core/github-stats.d.ts +110 -16
  117. package/dist/core/github-stats.js +295 -110
  118. package/dist/core/http-cache.d.ts +0 -10
  119. package/dist/core/http-cache.js +0 -19
  120. package/dist/core/index.d.ts +13 -6
  121. package/dist/core/index.js +16 -6
  122. package/dist/core/issue-conversation.d.ts +8 -2
  123. package/dist/core/issue-conversation.js +31 -12
  124. package/dist/core/local-config.d.ts +95 -0
  125. package/dist/core/local-config.js +270 -0
  126. package/dist/core/merged-pr-notes.d.ts +2 -2
  127. package/dist/core/pacing.d.ts +41 -0
  128. package/dist/core/pacing.js +115 -0
  129. package/dist/core/pagination.d.ts +55 -0
  130. package/dist/core/pagination.js +59 -0
  131. package/dist/core/paths.d.ts +7 -0
  132. package/dist/core/paths.js +9 -0
  133. package/dist/core/pr-assembly.d.ts +2 -0
  134. package/dist/core/pr-assembly.js +6 -2
  135. package/dist/core/pr-graphql.d.ts +53 -4
  136. package/dist/core/pr-graphql.js +87 -14
  137. package/dist/core/pr-monitor.d.ts +35 -12
  138. package/dist/core/pr-monitor.js +110 -26
  139. package/dist/core/pr-preflight.d.ts +154 -0
  140. package/dist/core/pr-preflight.js +753 -0
  141. package/dist/core/pr-quality-rubric.d.ts +0 -6
  142. package/dist/core/pr-quality-rubric.js +0 -8
  143. package/dist/core/pr-template.d.ts +2 -0
  144. package/dist/core/pr-template.js +5 -1
  145. package/dist/core/prose-script.d.ts +72 -0
  146. package/dist/core/prose-script.js +223 -0
  147. package/dist/core/repo-policy.d.ts +111 -0
  148. package/dist/core/repo-policy.js +428 -0
  149. package/dist/core/repo-score-manager.d.ts +66 -0
  150. package/dist/core/repo-score-manager.js +140 -1
  151. package/dist/core/review-analysis.d.ts +49 -21
  152. package/dist/core/review-analysis.js +89 -15
  153. package/dist/core/reviewed-prs-fetch.js +11 -29
  154. package/dist/core/reviewed-prs.js +8 -15
  155. package/dist/core/stale-data.d.ts +78 -0
  156. package/dist/core/stale-data.js +153 -0
  157. package/dist/core/state-persistence.d.ts +62 -27
  158. package/dist/core/state-persistence.js +338 -119
  159. package/dist/core/state-schema.d.ts +152 -210
  160. package/dist/core/state-schema.js +232 -80
  161. package/dist/core/state.d.ts +81 -8
  162. package/dist/core/state.js +239 -46
  163. package/dist/core/status-determination.js +32 -12
  164. package/dist/core/strategy.js +3 -1
  165. package/dist/core/types.d.ts +22 -1
  166. package/dist/core/types.js +1 -0
  167. package/dist/core/untrusted-content.d.ts +30 -11
  168. package/dist/core/untrusted-content.js +95 -42
  169. package/dist/core/urls.d.ts +33 -0
  170. package/dist/core/urls.js +94 -0
  171. package/dist/dashboard/assets/chart-panel-B-nLVgzQ.js +3 -0
  172. package/dist/dashboard/assets/index-5IvMGokL.js +55 -0
  173. package/dist/dashboard/index.html +1 -1
  174. package/dist/formatters/json.d.ts +432 -10
  175. package/dist/formatters/json.js +156 -1
  176. package/package.json +6 -6
  177. package/dist/core/ci-enforced-tools.d.ts +0 -35
  178. package/dist/core/ci-enforced-tools.js +0 -109
  179. package/dist/core/comment-decision.d.ts +0 -79
  180. package/dist/core/comment-decision.js +0 -82
  181. package/dist/core/extraction-categories.d.ts +0 -55
  182. package/dist/core/extraction-categories.js +0 -108
  183. package/dist/core/follow-up-history.d.ts +0 -40
  184. package/dist/core/follow-up-history.js +0 -71
  185. package/dist/core/issue-effort.d.ts +0 -29
  186. package/dist/core/issue-effort.js +0 -47
  187. package/dist/core/maintainer-hints.d.ts +0 -23
  188. package/dist/core/maintainer-hints.js +0 -36
  189. package/dist/core/workflow-state.d.ts +0 -56
  190. package/dist/core/workflow-state.js +0 -101
  191. package/dist/dashboard/assets/chart-panel-DPKNBUts.js +0 -3
  192. package/dist/dashboard/assets/index-B25bZOYX.js +0 -55
@@ -10,6 +10,8 @@
10
10
  * marked `.passthrough()` (#1831): see the note above AgentStateSchema.
11
11
  */
12
12
  import { z } from 'zod';
13
+ /** Narrows an {@link openEnum} value to the values this release knows (#2005). */
14
+ export declare function isKnownValue<T extends string>(values: readonly T[], value: string): value is T;
13
15
  /** Drops the `[k: string]: unknown` index signature `.passthrough()` adds to an inferred type. */
14
16
  type KnownKeys<T> = {
15
17
  [K in keyof T as string extends K ? never : K]: T[K];
@@ -114,6 +116,8 @@ export declare const StoredMergedPRSchema: z.ZodObject<{
114
116
  firstMaintainerResponseAt: z.ZodOptional<z.ZodString>;
115
117
  commentsFetchedAt: z.ZodOptional<z.ZodString>;
116
118
  learningsExtractedAt: z.ZodOptional<z.ZodString>;
119
+ learningsProposedAt: z.ZodOptional<z.ZodISODateTime>;
120
+ learningsProposedOn: z.ZodOptional<z.ZodString>;
117
121
  }, z.core.$loose>;
118
122
  export declare const StoredClosedPRSchema: z.ZodObject<{
119
123
  closeReason: z.ZodOptional<z.ZodCustom<"unknown" | "rejected" | (string & {}) | "ai-policy" | "superseded" | "stale" | "self-closed", "unknown" | "rejected" | (string & {}) | "ai-policy" | "superseded" | "stale" | "self-closed">>;
@@ -145,59 +149,9 @@ export declare const StoredClosedPRSchema: z.ZodObject<{
145
149
  firstMaintainerResponseAt: z.ZodOptional<z.ZodString>;
146
150
  commentsFetchedAt: z.ZodOptional<z.ZodString>;
147
151
  learningsExtractedAt: z.ZodOptional<z.ZodString>;
152
+ learningsProposedAt: z.ZodOptional<z.ZodISODateTime>;
153
+ learningsProposedOn: z.ZodOptional<z.ZodString>;
148
154
  }, z.core.$loose>;
149
- export declare const AnalyzedIssueConversationSchema: z.ZodObject<{
150
- url: z.ZodString;
151
- repo: z.ZodString;
152
- analyzedAt: z.ZodString;
153
- }, z.core.$strip>;
154
- /**
155
- * One entry in a PR's follow-up history (#1277). Tier matches the
156
- * cadence labels in `skills/pr-etiquette/SKILL.md` (light_check_in
157
- * for 7-13 days, direct_check_in for 14-29 days, final_check_in for
158
- * 30+ days). The `draftPath` is optional so an entry recorded from a
159
- * direct `gh pr comment` (no draft) still validates.
160
- */
161
- export declare const FollowUpEntrySchema: z.ZodObject<{
162
- tier: z.ZodEnum<{
163
- light_check_in: "light_check_in";
164
- direct_check_in: "direct_check_in";
165
- final_check_in: "final_check_in";
166
- }>;
167
- timestamp: z.ZodString;
168
- draftPath: z.ZodOptional<z.ZodString>;
169
- }, z.core.$strip>;
170
- export type FollowUpEntry = z.infer<typeof FollowUpEntrySchema>;
171
- /**
172
- * Pause-point snapshot for resumable workflows (#1280). When the user
173
- * picks "Done for now" inside `draft-first-workflow.md`,
174
- * `work-through-issues.md`, or `pre-commit-review.md`, the workflow
175
- * records its position here. The next `/oss` run consults this state
176
- * and offers "Resume / Restart / Discard" instead of restarting from
177
- * the beginning.
178
- *
179
- * `stepData` is intentionally typed as `Record<string, unknown>` so
180
- * each workflow can persist whatever per-step context it needs to
181
- * resume cleanly (compliance-gap skip list, last review pass count,
182
- * etc.) without forcing a tagged-union schema in shared state.
183
- */
184
- export declare const WorkflowStateSchema: z.ZodObject<{
185
- workflowName: z.ZodEnum<{
186
- "draft-first": "draft-first";
187
- "work-through-issues": "work-through-issues";
188
- "pre-commit-review": "pre-commit-review";
189
- }>;
190
- currentStep: z.ZodString;
191
- branchName: z.ZodOptional<z.ZodString>;
192
- issueContext: z.ZodOptional<z.ZodObject<{
193
- title: z.ZodString;
194
- url: z.ZodString;
195
- }, z.core.$strip>>;
196
- completedSteps: z.ZodDefault<z.ZodArray<z.ZodString>>;
197
- stepData: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
198
- lastUpdatedAt: z.ZodString;
199
- }, z.core.$strip>;
200
- export type WorkflowState = z.infer<typeof WorkflowStateSchema>;
201
155
  export declare const ContributionGuidelinesSchema: z.ZodObject<{
202
156
  branchNamingConvention: z.ZodOptional<z.ZodString>;
203
157
  commitMessageFormat: z.ZodOptional<z.ZodString>;
@@ -247,12 +201,7 @@ export declare const TrackedIssueSchema: z.ZodObject<{
247
201
  repo: z.ZodString;
248
202
  number: z.ZodNumber;
249
203
  title: z.ZodString;
250
- status: z.ZodEnum<{
251
- candidate: "candidate";
252
- claimed: "claimed";
253
- in_progress: "in_progress";
254
- pr_submitted: "pr_submitted";
255
- }>;
204
+ status: z.ZodCustom<"candidate" | (string & {}) | "claimed" | "in_progress" | "pr_submitted", "candidate" | (string & {}) | "claimed" | "in_progress" | "pr_submitted">;
256
205
  labels: z.ZodArray<z.ZodString>;
257
206
  createdAt: z.ZodString;
258
207
  updatedAt: z.ZodString;
@@ -291,30 +240,23 @@ export declare const ShelvedPRRefSchema: z.ZodObject<{
291
240
  title: z.ZodString;
292
241
  repo: z.ZodString;
293
242
  daysSinceActivity: z.ZodNumber;
294
- status: z.ZodEnum<{
295
- needs_addressing: "needs_addressing";
296
- waiting_on_maintainer: "waiting_on_maintainer";
297
- }>;
243
+ status: z.ZodCustom<(string & {}) | "needs_addressing" | "waiting_on_maintainer", (string & {}) | "needs_addressing" | "waiting_on_maintainer">;
298
244
  }, z.core.$strip>;
299
245
  export declare const StatusOverrideSchema: z.ZodObject<{
300
- status: z.ZodEnum<{
301
- needs_addressing: "needs_addressing";
302
- waiting_on_maintainer: "waiting_on_maintainer";
303
- }>;
246
+ status: z.ZodCustom<(string & {}) | "needs_addressing" | "waiting_on_maintainer", (string & {}) | "needs_addressing" | "waiting_on_maintainer">;
304
247
  setAt: z.ZodString;
305
248
  lastActivityAt: z.ZodString;
306
249
  }, z.core.$strip>;
307
250
  export declare const AgentConfigSchema: z.ZodPipe<z.ZodObject<{
308
251
  setupComplete: z.ZodDefault<z.ZodBoolean>;
309
252
  setupCompletedAt: z.ZodOptional<z.ZodString>;
310
- persistence: z.ZodDefault<z.ZodEnum<{
311
- local: "local";
312
- gist: "gist";
313
- }>>;
253
+ persistence: z.ZodDefault<z.ZodCustom<(string & {}) | "local" | "gist", (string & {}) | "local" | "gist">>;
314
254
  maxActivePRs: z.ZodDefault<z.ZodNumber>;
315
255
  maxOpenPRsPerRepo: z.ZodDefault<z.ZodNumber>;
316
256
  maxOpenPRsColdRepo: z.ZodDefault<z.ZodNumber>;
317
257
  maxConcurrentImplementations: z.ZodDefault<z.ZodNumber>;
258
+ maxNewPrsPerDay: z.ZodOptional<z.ZodNumber>;
259
+ maxNewForksPerDay: z.ZodOptional<z.ZodNumber>;
318
260
  dormantThresholdDays: z.ZodDefault<z.ZodNumber>;
319
261
  approachingDormantDays: z.ZodDefault<z.ZodNumber>;
320
262
  maxIssueAgeDays: z.ZodDefault<z.ZodNumber>;
@@ -322,11 +264,7 @@ export declare const AgentConfigSchema: z.ZodPipe<z.ZodObject<{
322
264
  complexIssues: z.ZodDefault<z.ZodCustom<"off" | (string & {}) | "warm", "off" | (string & {}) | "warm">>;
323
265
  languages: z.ZodDefault<z.ZodArray<z.ZodString>>;
324
266
  labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
325
- scope: z.ZodOptional<z.ZodArray<z.ZodEnum<{
326
- advanced: "advanced";
327
- beginner: "beginner";
328
- intermediate: "intermediate";
329
- }>>>;
267
+ scope: z.ZodOptional<z.ZodArray<z.ZodCustom<"advanced" | (string & {}) | "beginner" | "intermediate", "advanced" | (string & {}) | "beginner" | "intermediate">>>;
330
268
  excludeRepos: z.ZodDefault<z.ZodArray<z.ZodString>>;
331
269
  excludeOrgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
332
270
  untrackedOrgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -342,34 +280,24 @@ export declare const AgentConfigSchema: z.ZodPipe<z.ZodObject<{
342
280
  minStars: z.ZodDefault<z.ZodNumber>;
343
281
  includeDocIssues: z.ZodDefault<z.ZodBoolean>;
344
282
  aiPolicyBlocklist: z.ZodDefault<z.ZodArray<z.ZodString>>;
283
+ keepForks: z.ZodDefault<z.ZodArray<z.ZodString>>;
345
284
  shelvedPRUrls: z.ZodDefault<z.ZodArray<z.ZodString>>;
285
+ shelvedPRInfo: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
286
+ at: z.ZodString;
287
+ reasons: z.ZodOptional<z.ZodArray<z.ZodString>>;
288
+ }, z.core.$strip>>>;
346
289
  dismissedIssues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
347
290
  dismissedPRHeads: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
348
291
  statusOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
349
- status: z.ZodEnum<{
350
- needs_addressing: "needs_addressing";
351
- waiting_on_maintainer: "waiting_on_maintainer";
352
- }>;
292
+ status: z.ZodCustom<(string & {}) | "needs_addressing" | "waiting_on_maintainer", (string & {}) | "needs_addressing" | "waiting_on_maintainer">;
353
293
  setAt: z.ZodString;
354
294
  lastActivityAt: z.ZodString;
355
295
  }, z.core.$strip>>>;
356
296
  issueListPath: z.ZodOptional<z.ZodString>;
357
297
  skippedIssuesPath: z.ZodOptional<z.ZodString>;
358
- projectCategories: z.ZodDefault<z.ZodArray<z.ZodEnum<{
359
- nonprofit: "nonprofit";
360
- devtools: "devtools";
361
- infrastructure: "infrastructure";
362
- "web-frameworks": "web-frameworks";
363
- "data-ml": "data-ml";
364
- education: "education";
365
- }>>>;
298
+ projectCategories: z.ZodDefault<z.ZodArray<z.ZodCustom<(string & {}) | "nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education", (string & {}) | "nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education">>>;
366
299
  preferredOrgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
367
- diffTool: z.ZodDefault<z.ZodEnum<{
368
- inline: "inline";
369
- custom: "custom";
370
- sourcetree: "sourcetree";
371
- vscode: "vscode";
372
- }>>;
300
+ diffTool: z.ZodDefault<z.ZodCustom<"inline" | "custom" | (string & {}) | "sourcetree" | "vscode", "inline" | "custom" | (string & {}) | "sourcetree" | "vscode">>;
373
301
  diffToolCustomCommand: z.ZodOptional<z.ZodString>;
374
302
  autoExtractLearnings: z.ZodDefault<z.ZodBoolean>;
375
303
  autoFormatBeforePush: z.ZodDefault<z.ZodBoolean>;
@@ -381,7 +309,7 @@ export declare const AgentConfigSchema: z.ZodPipe<z.ZodObject<{
381
309
  }, z.core.$loose>, z.ZodTransform<{
382
310
  [x: string]: unknown;
383
311
  setupComplete: boolean;
384
- persistence: "local" | "gist";
312
+ persistence: (string & {}) | "local" | "gist";
385
313
  maxActivePRs: number;
386
314
  maxOpenPRsPerRepo: number;
387
315
  maxOpenPRsColdRepo: number;
@@ -405,12 +333,17 @@ export declare const AgentConfigSchema: z.ZodPipe<z.ZodObject<{
405
333
  minStars: number;
406
334
  includeDocIssues: boolean;
407
335
  aiPolicyBlocklist: string[];
336
+ keepForks: string[];
408
337
  shelvedPRUrls: string[];
338
+ shelvedPRInfo: Record<string, {
339
+ at: string;
340
+ reasons?: string[] | undefined;
341
+ }>;
409
342
  dismissedIssues: Record<string, string>;
410
343
  dismissedPRHeads: Record<string, string>;
411
- projectCategories: ("nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education")[];
344
+ projectCategories: ((string & {}) | "nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education")[];
412
345
  preferredOrgs: string[];
413
- diffTool: "inline" | "custom" | "sourcetree" | "vscode";
346
+ diffTool: "inline" | "custom" | (string & {}) | "sourcetree" | "vscode";
414
347
  autoExtractLearnings: boolean;
415
348
  autoFormatBeforePush: boolean;
416
349
  trustOwnRepoWrites: boolean;
@@ -418,12 +351,14 @@ export declare const AgentConfigSchema: z.ZodPipe<z.ZodObject<{
418
351
  slmTriageModel: string;
419
352
  slmTriageHost: string;
420
353
  setupCompletedAt?: string | undefined;
421
- scope?: ("advanced" | "beginner" | "intermediate")[] | undefined;
354
+ maxNewPrsPerDay?: number | undefined;
355
+ maxNewForksPerDay?: number | undefined;
356
+ scope?: ("advanced" | (string & {}) | "beginner" | "intermediate")[] | undefined;
422
357
  excludeOrgs?: string[] | undefined;
423
358
  starredReposLastFetched?: string | undefined;
424
359
  localRepoScanPaths?: string[] | undefined;
425
360
  statusOverrides?: Record<string, {
426
- status: "needs_addressing" | "waiting_on_maintainer";
361
+ status: (string & {}) | "needs_addressing" | "waiting_on_maintainer";
427
362
  setAt: string;
428
363
  lastActivityAt: string;
429
364
  }> | undefined;
@@ -434,7 +369,7 @@ export declare const AgentConfigSchema: z.ZodPipe<z.ZodObject<{
434
369
  }, {
435
370
  [x: string]: unknown;
436
371
  setupComplete: boolean;
437
- persistence: "local" | "gist";
372
+ persistence: (string & {}) | "local" | "gist";
438
373
  maxActivePRs: number;
439
374
  maxOpenPRsPerRepo: number;
440
375
  maxOpenPRsColdRepo: number;
@@ -458,12 +393,17 @@ export declare const AgentConfigSchema: z.ZodPipe<z.ZodObject<{
458
393
  minStars: number;
459
394
  includeDocIssues: boolean;
460
395
  aiPolicyBlocklist: string[];
396
+ keepForks: string[];
461
397
  shelvedPRUrls: string[];
398
+ shelvedPRInfo: Record<string, {
399
+ at: string;
400
+ reasons?: string[] | undefined;
401
+ }>;
462
402
  dismissedIssues: Record<string, string>;
463
403
  dismissedPRHeads: Record<string, string>;
464
- projectCategories: ("nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education")[];
404
+ projectCategories: ((string & {}) | "nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education")[];
465
405
  preferredOrgs: string[];
466
- diffTool: "inline" | "custom" | "sourcetree" | "vscode";
406
+ diffTool: "inline" | "custom" | (string & {}) | "sourcetree" | "vscode";
467
407
  autoExtractLearnings: boolean;
468
408
  autoFormatBeforePush: boolean;
469
409
  trustOwnRepoWrites: boolean;
@@ -471,12 +411,14 @@ export declare const AgentConfigSchema: z.ZodPipe<z.ZodObject<{
471
411
  slmTriageModel: string;
472
412
  slmTriageHost: string;
473
413
  setupCompletedAt?: string | undefined;
474
- scope?: ("advanced" | "beginner" | "intermediate")[] | undefined;
414
+ maxNewPrsPerDay?: number | undefined;
415
+ maxNewForksPerDay?: number | undefined;
416
+ scope?: ("advanced" | (string & {}) | "beginner" | "intermediate")[] | undefined;
475
417
  excludeOrgs?: string[] | undefined;
476
418
  starredReposLastFetched?: string | undefined;
477
419
  localRepoScanPaths?: string[] | undefined;
478
420
  statusOverrides?: Record<string, {
479
- status: "needs_addressing" | "waiting_on_maintainer";
421
+ status: (string & {}) | "needs_addressing" | "waiting_on_maintainer";
480
422
  setAt: string;
481
423
  lastActivityAt: string;
482
424
  }> | undefined;
@@ -532,10 +474,7 @@ export declare const FetchedPRSchema: z.ZodObject<{
532
474
  url: z.ZodString;
533
475
  repo: z.ZodString;
534
476
  number: z.ZodNumber;
535
- status: z.ZodEnum<{
536
- needs_addressing: "needs_addressing";
537
- waiting_on_maintainer: "waiting_on_maintainer";
538
- }>;
477
+ status: z.ZodCustom<(string & {}) | "needs_addressing" | "waiting_on_maintainer", (string & {}) | "needs_addressing" | "waiting_on_maintainer">;
539
478
  }, z.core.$loose>;
540
479
  export declare const DailyDigestSchema: z.ZodPreprocess<z.ZodObject<{
541
480
  generatedAt: z.ZodString;
@@ -567,10 +506,7 @@ export declare const DailyDigestSchema: z.ZodPreprocess<z.ZodObject<{
567
506
  title: z.ZodString;
568
507
  repo: z.ZodString;
569
508
  daysSinceActivity: z.ZodNumber;
570
- status: z.ZodEnum<{
571
- needs_addressing: "needs_addressing";
572
- waiting_on_maintainer: "waiting_on_maintainer";
573
- }>;
509
+ status: z.ZodCustom<(string & {}) | "needs_addressing" | "waiting_on_maintainer", (string & {}) | "needs_addressing" | "waiting_on_maintainer">;
574
510
  }, z.core.$strip>>;
575
511
  autoUnshelvedPRs: z.ZodArray<z.ZodObject<{
576
512
  number: z.ZodNumber;
@@ -578,10 +514,7 @@ export declare const DailyDigestSchema: z.ZodPreprocess<z.ZodObject<{
578
514
  title: z.ZodString;
579
515
  repo: z.ZodString;
580
516
  daysSinceActivity: z.ZodNumber;
581
- status: z.ZodEnum<{
582
- needs_addressing: "needs_addressing";
583
- waiting_on_maintainer: "waiting_on_maintainer";
584
- }>;
517
+ status: z.ZodCustom<(string & {}) | "needs_addressing" | "waiting_on_maintainer", (string & {}) | "needs_addressing" | "waiting_on_maintainer">;
585
518
  }, z.core.$strip>>;
586
519
  summary: z.ZodObject<{
587
520
  totalActivePRs: z.ZodNumber;
@@ -629,10 +562,7 @@ export declare const OvernightPreparedSchema: z.ZodObject<{
629
562
  export declare const OvernightImplementAttemptSchema: z.ZodObject<{
630
563
  url: z.ZodString;
631
564
  attemptedAt: z.ZodString;
632
- outcome: z.ZodEnum<{
633
- blocked: "blocked";
634
- prepared: "prepared";
635
- }>;
565
+ outcome: z.ZodCustom<"blocked" | (string & {}) | "prepared", "blocked" | (string & {}) | "prepared">;
636
566
  note: z.ZodOptional<z.ZodString>;
637
567
  }, z.core.$loose>;
638
568
  export declare const OvernightRecordSchema: z.ZodObject<{
@@ -655,10 +585,7 @@ export declare const OvernightRecordSchema: z.ZodObject<{
655
585
  implementAttempts: z.ZodOptional<z.ZodArray<z.ZodObject<{
656
586
  url: z.ZodString;
657
587
  attemptedAt: z.ZodString;
658
- outcome: z.ZodEnum<{
659
- blocked: "blocked";
660
- prepared: "prepared";
661
- }>;
588
+ outcome: z.ZodCustom<"blocked" | (string & {}) | "prepared", "blocked" | (string & {}) | "prepared">;
662
589
  note: z.ZodOptional<z.ZodString>;
663
590
  }, z.core.$loose>>>;
664
591
  }, z.core.$loose>;
@@ -701,6 +628,11 @@ export declare const WorkClaimSchema: z.ZodObject<{
701
628
  runId: z.ZodOptional<z.ZodString>;
702
629
  finishedAt: z.ZodOptional<z.ZodString>;
703
630
  }, z.core.$loose>;
631
+ /** One PR the tool opened (#1911), recorded at creation for the pacing caps. */
632
+ export declare const RecentNewPRSchema: z.ZodObject<{
633
+ url: z.ZodString;
634
+ openedAt: z.ZodString;
635
+ }, z.core.$loose>;
704
636
  /** How many entries of `raw.workClaims` the lenient parse dropped as malformed (#1856); 0 when none or no list. */
705
637
  export declare function malformedWorkClaimCount(raw: unknown, parsed: {
706
638
  workClaims: readonly unknown[];
@@ -712,10 +644,53 @@ export declare function malformedWorkClaimCount(raw: unknown, parsed: {
712
644
  * kept (root, config, repoScores, the outcome ledger and pick snapshots,
713
645
  * lastOvernight, searchRotation) are `.passthrough()`; schemas regenerated on
714
646
  * every run (lastDigest) or rarely extended still strip. Persisted enums that
715
- * grow (closeReason, pick source) accept unknown strings via {@link openEnum}.
647
+ * grow (closeReason, pick source, statuses, config modes; #2005) accept unknown strings via {@link openEnum}.
716
648
  * Inferred types drop the passthrough index signature ({@link KnownKeys}) so a
717
649
  * misspelled key still fails to compile.
650
+ *
651
+ * Retired root fields are dropped from the schema, not stripped: passthrough
652
+ * keeps an older client's `analyzedIssueConversations`, `prFollowUpHistory`
653
+ * and `workflowState` verbatim (#1948), so that client still parses its own data.
718
654
  */
655
+ /** One user approval of a repo's stored guidelines text (#1929). */
656
+ export declare const GuidelinesReviewSchema: z.ZodObject<{
657
+ reviewedAt: z.ZodString;
658
+ sha256: z.ZodString;
659
+ }, z.core.$strip>;
660
+ /** Longest quoted source line or disclosure text a repo policy keeps (#1953): the text is from other people's repos. */
661
+ export declare const POLICY_QUOTE_MAX = 200;
662
+ /** Longest gate label a repo policy keeps; GitHub caps a label name at 50 characters. */
663
+ export declare const GATE_LABEL_MAX = 50;
664
+ export declare const RepoPolicySchema: z.ZodObject<{
665
+ aiPolicy: z.ZodEnum<{
666
+ unknown: "unknown";
667
+ allowed: "allowed";
668
+ "disclosure-required": "disclosure-required";
669
+ banned: "banned";
670
+ }>;
671
+ disclosureText: z.ZodOptional<z.ZodString>;
672
+ cla: z.ZodEnum<{
673
+ required: "required";
674
+ none: "none";
675
+ unknown: "unknown";
676
+ }>;
677
+ commitRules: z.ZodArray<z.ZodString>;
678
+ prGate: z.ZodEnum<{
679
+ none: "none";
680
+ unknown: "unknown";
681
+ "claim-first": "claim-first";
682
+ "maintainer-label": "maintainer-label";
683
+ "collaborators-only": "collaborators-only";
684
+ }>;
685
+ gateLabel: z.ZodOptional<z.ZodString>;
686
+ maxOpenAiPRs: z.ZodOptional<z.ZodNumber>;
687
+ source: z.ZodArray<z.ZodObject<{
688
+ file: z.ZodString;
689
+ quotedLine: z.ZodString;
690
+ }, z.core.$strip>>;
691
+ reviewedByUser: z.ZodBoolean;
692
+ updatedAt: z.ZodString;
693
+ }, z.core.$strip>;
719
694
  export declare const AgentStateSchema: z.ZodObject<{
720
695
  version: z.ZodLiteral<4>;
721
696
  gistId: z.ZodOptional<z.ZodString>;
@@ -738,14 +713,13 @@ export declare const AgentStateSchema: z.ZodObject<{
738
713
  config: z.ZodDefault<z.ZodPipe<z.ZodObject<{
739
714
  setupComplete: z.ZodDefault<z.ZodBoolean>;
740
715
  setupCompletedAt: z.ZodOptional<z.ZodString>;
741
- persistence: z.ZodDefault<z.ZodEnum<{
742
- local: "local";
743
- gist: "gist";
744
- }>>;
716
+ persistence: z.ZodDefault<z.ZodCustom<(string & {}) | "local" | "gist", (string & {}) | "local" | "gist">>;
745
717
  maxActivePRs: z.ZodDefault<z.ZodNumber>;
746
718
  maxOpenPRsPerRepo: z.ZodDefault<z.ZodNumber>;
747
719
  maxOpenPRsColdRepo: z.ZodDefault<z.ZodNumber>;
748
720
  maxConcurrentImplementations: z.ZodDefault<z.ZodNumber>;
721
+ maxNewPrsPerDay: z.ZodOptional<z.ZodNumber>;
722
+ maxNewForksPerDay: z.ZodOptional<z.ZodNumber>;
749
723
  dormantThresholdDays: z.ZodDefault<z.ZodNumber>;
750
724
  approachingDormantDays: z.ZodDefault<z.ZodNumber>;
751
725
  maxIssueAgeDays: z.ZodDefault<z.ZodNumber>;
@@ -753,11 +727,7 @@ export declare const AgentStateSchema: z.ZodObject<{
753
727
  complexIssues: z.ZodDefault<z.ZodCustom<"off" | (string & {}) | "warm", "off" | (string & {}) | "warm">>;
754
728
  languages: z.ZodDefault<z.ZodArray<z.ZodString>>;
755
729
  labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
756
- scope: z.ZodOptional<z.ZodArray<z.ZodEnum<{
757
- advanced: "advanced";
758
- beginner: "beginner";
759
- intermediate: "intermediate";
760
- }>>>;
730
+ scope: z.ZodOptional<z.ZodArray<z.ZodCustom<"advanced" | (string & {}) | "beginner" | "intermediate", "advanced" | (string & {}) | "beginner" | "intermediate">>>;
761
731
  excludeRepos: z.ZodDefault<z.ZodArray<z.ZodString>>;
762
732
  excludeOrgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
763
733
  untrackedOrgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -773,34 +743,24 @@ export declare const AgentStateSchema: z.ZodObject<{
773
743
  minStars: z.ZodDefault<z.ZodNumber>;
774
744
  includeDocIssues: z.ZodDefault<z.ZodBoolean>;
775
745
  aiPolicyBlocklist: z.ZodDefault<z.ZodArray<z.ZodString>>;
746
+ keepForks: z.ZodDefault<z.ZodArray<z.ZodString>>;
776
747
  shelvedPRUrls: z.ZodDefault<z.ZodArray<z.ZodString>>;
748
+ shelvedPRInfo: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
749
+ at: z.ZodString;
750
+ reasons: z.ZodOptional<z.ZodArray<z.ZodString>>;
751
+ }, z.core.$strip>>>;
777
752
  dismissedIssues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
778
753
  dismissedPRHeads: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
779
754
  statusOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
780
- status: z.ZodEnum<{
781
- needs_addressing: "needs_addressing";
782
- waiting_on_maintainer: "waiting_on_maintainer";
783
- }>;
755
+ status: z.ZodCustom<(string & {}) | "needs_addressing" | "waiting_on_maintainer", (string & {}) | "needs_addressing" | "waiting_on_maintainer">;
784
756
  setAt: z.ZodString;
785
757
  lastActivityAt: z.ZodString;
786
758
  }, z.core.$strip>>>;
787
759
  issueListPath: z.ZodOptional<z.ZodString>;
788
760
  skippedIssuesPath: z.ZodOptional<z.ZodString>;
789
- projectCategories: z.ZodDefault<z.ZodArray<z.ZodEnum<{
790
- nonprofit: "nonprofit";
791
- devtools: "devtools";
792
- infrastructure: "infrastructure";
793
- "web-frameworks": "web-frameworks";
794
- "data-ml": "data-ml";
795
- education: "education";
796
- }>>>;
761
+ projectCategories: z.ZodDefault<z.ZodArray<z.ZodCustom<(string & {}) | "nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education", (string & {}) | "nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education">>>;
797
762
  preferredOrgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
798
- diffTool: z.ZodDefault<z.ZodEnum<{
799
- inline: "inline";
800
- custom: "custom";
801
- sourcetree: "sourcetree";
802
- vscode: "vscode";
803
- }>>;
763
+ diffTool: z.ZodDefault<z.ZodCustom<"inline" | "custom" | (string & {}) | "sourcetree" | "vscode", "inline" | "custom" | (string & {}) | "sourcetree" | "vscode">>;
804
764
  diffToolCustomCommand: z.ZodOptional<z.ZodString>;
805
765
  autoExtractLearnings: z.ZodDefault<z.ZodBoolean>;
806
766
  autoFormatBeforePush: z.ZodDefault<z.ZodBoolean>;
@@ -812,7 +772,7 @@ export declare const AgentStateSchema: z.ZodObject<{
812
772
  }, z.core.$loose>, z.ZodTransform<{
813
773
  [x: string]: unknown;
814
774
  setupComplete: boolean;
815
- persistence: "local" | "gist";
775
+ persistence: (string & {}) | "local" | "gist";
816
776
  maxActivePRs: number;
817
777
  maxOpenPRsPerRepo: number;
818
778
  maxOpenPRsColdRepo: number;
@@ -836,12 +796,17 @@ export declare const AgentStateSchema: z.ZodObject<{
836
796
  minStars: number;
837
797
  includeDocIssues: boolean;
838
798
  aiPolicyBlocklist: string[];
799
+ keepForks: string[];
839
800
  shelvedPRUrls: string[];
801
+ shelvedPRInfo: Record<string, {
802
+ at: string;
803
+ reasons?: string[] | undefined;
804
+ }>;
840
805
  dismissedIssues: Record<string, string>;
841
806
  dismissedPRHeads: Record<string, string>;
842
- projectCategories: ("nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education")[];
807
+ projectCategories: ((string & {}) | "nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education")[];
843
808
  preferredOrgs: string[];
844
- diffTool: "inline" | "custom" | "sourcetree" | "vscode";
809
+ diffTool: "inline" | "custom" | (string & {}) | "sourcetree" | "vscode";
845
810
  autoExtractLearnings: boolean;
846
811
  autoFormatBeforePush: boolean;
847
812
  trustOwnRepoWrites: boolean;
@@ -849,12 +814,14 @@ export declare const AgentStateSchema: z.ZodObject<{
849
814
  slmTriageModel: string;
850
815
  slmTriageHost: string;
851
816
  setupCompletedAt?: string | undefined;
852
- scope?: ("advanced" | "beginner" | "intermediate")[] | undefined;
817
+ maxNewPrsPerDay?: number | undefined;
818
+ maxNewForksPerDay?: number | undefined;
819
+ scope?: ("advanced" | (string & {}) | "beginner" | "intermediate")[] | undefined;
853
820
  excludeOrgs?: string[] | undefined;
854
821
  starredReposLastFetched?: string | undefined;
855
822
  localRepoScanPaths?: string[] | undefined;
856
823
  statusOverrides?: Record<string, {
857
- status: "needs_addressing" | "waiting_on_maintainer";
824
+ status: (string & {}) | "needs_addressing" | "waiting_on_maintainer";
858
825
  setAt: string;
859
826
  lastActivityAt: string;
860
827
  }> | undefined;
@@ -865,7 +832,7 @@ export declare const AgentStateSchema: z.ZodObject<{
865
832
  }, {
866
833
  [x: string]: unknown;
867
834
  setupComplete: boolean;
868
- persistence: "local" | "gist";
835
+ persistence: (string & {}) | "local" | "gist";
869
836
  maxActivePRs: number;
870
837
  maxOpenPRsPerRepo: number;
871
838
  maxOpenPRsColdRepo: number;
@@ -889,12 +856,17 @@ export declare const AgentStateSchema: z.ZodObject<{
889
856
  minStars: number;
890
857
  includeDocIssues: boolean;
891
858
  aiPolicyBlocklist: string[];
859
+ keepForks: string[];
892
860
  shelvedPRUrls: string[];
861
+ shelvedPRInfo: Record<string, {
862
+ at: string;
863
+ reasons?: string[] | undefined;
864
+ }>;
893
865
  dismissedIssues: Record<string, string>;
894
866
  dismissedPRHeads: Record<string, string>;
895
- projectCategories: ("nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education")[];
867
+ projectCategories: ((string & {}) | "nonprofit" | "devtools" | "infrastructure" | "web-frameworks" | "data-ml" | "education")[];
896
868
  preferredOrgs: string[];
897
- diffTool: "inline" | "custom" | "sourcetree" | "vscode";
869
+ diffTool: "inline" | "custom" | (string & {}) | "sourcetree" | "vscode";
898
870
  autoExtractLearnings: boolean;
899
871
  autoFormatBeforePush: boolean;
900
872
  trustOwnRepoWrites: boolean;
@@ -902,12 +874,14 @@ export declare const AgentStateSchema: z.ZodObject<{
902
874
  slmTriageModel: string;
903
875
  slmTriageHost: string;
904
876
  setupCompletedAt?: string | undefined;
905
- scope?: ("advanced" | "beginner" | "intermediate")[] | undefined;
877
+ maxNewPrsPerDay?: number | undefined;
878
+ maxNewForksPerDay?: number | undefined;
879
+ scope?: ("advanced" | (string & {}) | "beginner" | "intermediate")[] | undefined;
906
880
  excludeOrgs?: string[] | undefined;
907
881
  starredReposLastFetched?: string | undefined;
908
882
  localRepoScanPaths?: string[] | undefined;
909
883
  statusOverrides?: Record<string, {
910
- status: "needs_addressing" | "waiting_on_maintainer";
884
+ status: (string & {}) | "needs_addressing" | "waiting_on_maintainer";
911
885
  setAt: string;
912
886
  lastActivityAt: string;
913
887
  }> | undefined;
@@ -949,10 +923,7 @@ export declare const AgentStateSchema: z.ZodObject<{
949
923
  title: z.ZodString;
950
924
  repo: z.ZodString;
951
925
  daysSinceActivity: z.ZodNumber;
952
- status: z.ZodEnum<{
953
- needs_addressing: "needs_addressing";
954
- waiting_on_maintainer: "waiting_on_maintainer";
955
- }>;
926
+ status: z.ZodCustom<(string & {}) | "needs_addressing" | "waiting_on_maintainer", (string & {}) | "needs_addressing" | "waiting_on_maintainer">;
956
927
  }, z.core.$strip>>;
957
928
  autoUnshelvedPRs: z.ZodArray<z.ZodObject<{
958
929
  number: z.ZodNumber;
@@ -960,10 +931,7 @@ export declare const AgentStateSchema: z.ZodObject<{
960
931
  title: z.ZodString;
961
932
  repo: z.ZodString;
962
933
  daysSinceActivity: z.ZodNumber;
963
- status: z.ZodEnum<{
964
- needs_addressing: "needs_addressing";
965
- waiting_on_maintainer: "waiting_on_maintainer";
966
- }>;
934
+ status: z.ZodCustom<(string & {}) | "needs_addressing" | "waiting_on_maintainer", (string & {}) | "needs_addressing" | "waiting_on_maintainer">;
967
935
  }, z.core.$strip>>;
968
936
  summary: z.ZodObject<{
969
937
  totalActivePRs: z.ZodNumber;
@@ -1012,6 +980,8 @@ export declare const AgentStateSchema: z.ZodObject<{
1012
980
  firstMaintainerResponseAt: z.ZodOptional<z.ZodString>;
1013
981
  commentsFetchedAt: z.ZodOptional<z.ZodString>;
1014
982
  learningsExtractedAt: z.ZodOptional<z.ZodString>;
983
+ learningsProposedAt: z.ZodOptional<z.ZodISODateTime>;
984
+ learningsProposedOn: z.ZodOptional<z.ZodString>;
1015
985
  }, z.core.$loose>>>;
1016
986
  closedPRs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1017
987
  closeReason: z.ZodOptional<z.ZodCustom<"unknown" | "rejected" | (string & {}) | "ai-policy" | "superseded" | "stale" | "self-closed", "unknown" | "rejected" | (string & {}) | "ai-policy" | "superseded" | "stale" | "self-closed">>;
@@ -1043,24 +1013,16 @@ export declare const AgentStateSchema: z.ZodObject<{
1043
1013
  firstMaintainerResponseAt: z.ZodOptional<z.ZodString>;
1044
1014
  commentsFetchedAt: z.ZodOptional<z.ZodString>;
1045
1015
  learningsExtractedAt: z.ZodOptional<z.ZodString>;
1016
+ learningsProposedAt: z.ZodOptional<z.ZodISODateTime>;
1017
+ learningsProposedOn: z.ZodOptional<z.ZodString>;
1046
1018
  }, z.core.$loose>>>;
1047
- analyzedIssueConversations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1048
- url: z.ZodString;
1049
- repo: z.ZodString;
1050
- analyzedAt: z.ZodString;
1051
- }, z.core.$strip>>>;
1052
1019
  activeIssues: z.ZodDefault<z.ZodArray<z.ZodObject<{
1053
1020
  id: z.ZodNumber;
1054
1021
  url: z.ZodString;
1055
1022
  repo: z.ZodString;
1056
1023
  number: z.ZodNumber;
1057
1024
  title: z.ZodString;
1058
- status: z.ZodEnum<{
1059
- candidate: "candidate";
1060
- claimed: "claimed";
1061
- in_progress: "in_progress";
1062
- pr_submitted: "pr_submitted";
1063
- }>;
1025
+ status: z.ZodCustom<"candidate" | (string & {}) | "claimed" | "in_progress" | "pr_submitted", "candidate" | (string & {}) | "claimed" | "in_progress" | "pr_submitted">;
1064
1026
  labels: z.ZodArray<z.ZodString>;
1065
1027
  createdAt: z.ZodString;
1066
1028
  updatedAt: z.ZodString;
@@ -1093,31 +1055,6 @@ export declare const AgentStateSchema: z.ZodObject<{
1093
1055
  notes: z.ZodArray<z.ZodString>;
1094
1056
  }, z.core.$strip>>;
1095
1057
  }, z.core.$strip>>>;
1096
- prFollowUpHistory: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1097
- tier: z.ZodEnum<{
1098
- light_check_in: "light_check_in";
1099
- direct_check_in: "direct_check_in";
1100
- final_check_in: "final_check_in";
1101
- }>;
1102
- timestamp: z.ZodString;
1103
- draftPath: z.ZodOptional<z.ZodString>;
1104
- }, z.core.$strip>>>>;
1105
- workflowState: z.ZodOptional<z.ZodObject<{
1106
- workflowName: z.ZodEnum<{
1107
- "draft-first": "draft-first";
1108
- "work-through-issues": "work-through-issues";
1109
- "pre-commit-review": "pre-commit-review";
1110
- }>;
1111
- currentStep: z.ZodString;
1112
- branchName: z.ZodOptional<z.ZodString>;
1113
- issueContext: z.ZodOptional<z.ZodObject<{
1114
- title: z.ZodString;
1115
- url: z.ZodString;
1116
- }, z.core.$strip>>;
1117
- completedSteps: z.ZodDefault<z.ZodArray<z.ZodString>>;
1118
- stepData: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1119
- lastUpdatedAt: z.ZodString;
1120
- }, z.core.$strip>>;
1121
1058
  searchSeen: z.ZodDefault<z.ZodArray<z.ZodObject<{
1122
1059
  url: z.ZodString;
1123
1060
  lastSeenAt: z.ZodString;
@@ -1157,10 +1094,7 @@ export declare const AgentStateSchema: z.ZodObject<{
1157
1094
  implementAttempts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1158
1095
  url: z.ZodString;
1159
1096
  attemptedAt: z.ZodString;
1160
- outcome: z.ZodEnum<{
1161
- blocked: "blocked";
1162
- prepared: "prepared";
1163
- }>;
1097
+ outcome: z.ZodCustom<"blocked" | (string & {}) | "prepared", "blocked" | (string & {}) | "prepared">;
1164
1098
  note: z.ZodOptional<z.ZodString>;
1165
1099
  }, z.core.$loose>>>;
1166
1100
  }, z.core.$loose>>;
@@ -1187,7 +1121,16 @@ export declare const AgentStateSchema: z.ZodObject<{
1187
1121
  runId?: string | undefined;
1188
1122
  finishedAt?: string | undefined;
1189
1123
  }[], unknown[]>>;
1124
+ recentNewPRs: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<{
1125
+ [x: string]: unknown;
1126
+ url: string;
1127
+ openedAt: string;
1128
+ }[] | undefined, unknown>>;
1129
+ guidelinesReviews: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1130
+ repoPolicies: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1190
1131
  }, z.core.$loose>;
1132
+ export type GuidelinesReview = z.infer<typeof GuidelinesReviewSchema>;
1133
+ export type RepoPolicy = z.infer<typeof RepoPolicySchema>;
1191
1134
  export type IssueStatus = z.infer<typeof IssueStatusSchema>;
1192
1135
  export type FetchedPRStatus = z.infer<typeof FetchedPRStatusSchema>;
1193
1136
  export type ProjectCategory = z.infer<typeof ProjectCategorySchema>;
@@ -1206,7 +1149,6 @@ export type RepoSignals = z.infer<typeof RepoSignalsSchema>;
1206
1149
  export type RepoScore = KnownKeys<z.infer<typeof RepoScoreSchema>>;
1207
1150
  export type StoredMergedPR = KnownKeys<z.infer<typeof StoredMergedPRSchema>>;
1208
1151
  export type StoredClosedPR = KnownKeys<z.infer<typeof StoredClosedPRSchema>>;
1209
- export type AnalyzedIssueConversation = z.infer<typeof AnalyzedIssueConversationSchema>;
1210
1152
  export type ContributionGuidelines = z.infer<typeof ContributionGuidelinesSchema>;
1211
1153
  export type IssueVettingResult = z.infer<typeof IssueVettingResultSchema>;
1212
1154
  export type TrackedIssue = z.infer<typeof TrackedIssueSchema>;