@cjvana/claude-auto 0.1.2 → 0.3.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 (153) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/{chunk-24PS2XSV.js → chunk-27NCPABY.js} +4 -67
  3. package/dist/chunk-27NCPABY.js.map +1 -0
  4. package/dist/{chunk-2D5E23XA.js → chunk-2G2KQJ2Q.js} +3 -3
  5. package/dist/chunk-2G2KQJ2Q.js.map +1 -0
  6. package/dist/{chunk-BY5YEOVG.js → chunk-5RGKLL5S.js} +3 -3
  7. package/dist/{chunk-SZRIZBWI.js → chunk-7WBOMWGX.js} +3 -3
  8. package/dist/{chunk-GLW7T4QE.js → chunk-AQMJSOKP.js} +3 -3
  9. package/dist/chunk-BYWX3R4W.js +1823 -0
  10. package/dist/chunk-BYWX3R4W.js.map +1 -0
  11. package/dist/{chunk-PFU5YLRH.js → chunk-CDLRNIJ2.js} +3 -3
  12. package/dist/{chunk-W2HBRERV.js → chunk-CY2RLEHC.js} +4 -4
  13. package/dist/{chunk-5LGOK52J.js → chunk-DJ25VI7Q.js} +2 -2
  14. package/dist/{chunk-S6W4SURF.js → chunk-F5ZAKXGU.js} +4 -4
  15. package/dist/{chunk-MI7OZ5XD.js → chunk-FC5A7WIX.js} +3 -3
  16. package/dist/{chunk-DVZC42TL.js → chunk-IAIVZ6DI.js} +4 -4
  17. package/dist/{chunk-QRYCNVLT.js → chunk-LYWZRGJR.js} +3 -3
  18. package/dist/{chunk-M53MPY3U.js → chunk-MGOTE5UN.js} +3 -3
  19. package/dist/{chunk-NB46PEG2.js → chunk-MKKXWEAJ.js} +4 -4
  20. package/dist/{chunk-NB46PEG2.js.map → chunk-MKKXWEAJ.js.map} +1 -1
  21. package/dist/{chunk-U35GRLBD.js → chunk-O3NXIT5A.js} +6 -1
  22. package/dist/chunk-O3NXIT5A.js.map +1 -0
  23. package/dist/{chunk-WYU476R2.js → chunk-QFPHB7UP.js} +7 -2
  24. package/dist/chunk-QFPHB7UP.js.map +1 -0
  25. package/dist/chunk-RGPRN5LC.js +1782 -0
  26. package/dist/chunk-RGPRN5LC.js.map +1 -0
  27. package/dist/{chunk-H2MUDYMW.js → chunk-SRBR6LEH.js} +2 -1
  28. package/dist/chunk-SRBR6LEH.js.map +1 -0
  29. package/dist/{chunk-QLRCFKLU.js → chunk-VCMT7VYH.js} +4 -4
  30. package/dist/{chunk-QQTIJN3S.js → chunk-VRRDTDFU.js} +7 -2
  31. package/dist/chunk-VRRDTDFU.js.map +1 -0
  32. package/dist/{chunk-TAGHPCFT.js → chunk-VXY6ZLTA.js} +3 -3
  33. package/dist/chunk-W7PREJFY.js +75 -0
  34. package/dist/chunk-W7PREJFY.js.map +1 -0
  35. package/dist/{chunk-S6E67XMR.js → chunk-WD4XNFNG.js} +2 -2
  36. package/dist/{chunk-HF7PGQI3.js → chunk-WMF2RTBI.js} +3 -3
  37. package/dist/{chunk-LBH6SLHH.js → chunk-XIT33W6W.js} +6 -6
  38. package/dist/{chunk-4I5UIASZ.js → chunk-YF7F7AXH.js} +2 -2
  39. package/dist/{chunk-SMZYA6CY.js → chunk-YUULUW5Q.js} +3 -3
  40. package/dist/claude-auto-run.js +9 -1683
  41. package/dist/claude-auto-run.js.map +1 -1
  42. package/dist/claude-auto.js +16 -10
  43. package/dist/claude-auto.js.map +1 -1
  44. package/dist/{cost-QGM3D4QW.js → cost-DIEL6X7Y.js} +4 -4
  45. package/dist/cost-WLBDKGRO.js +11 -0
  46. package/dist/create-F2TZM2L3.js +15 -0
  47. package/dist/{create-U5WYKTD4.js → create-OCKJJFJ3.js} +5 -5
  48. package/dist/{crontab-PNEWANLW.js → crontab-G4S5N4ZU.js} +3 -3
  49. package/dist/{crontab-MAJ52FOK.js → crontab-I7F5QWWP.js} +7 -2
  50. package/dist/crontab-I7F5QWWP.js.map +1 -0
  51. package/dist/{crontab-CDMC2FDT.js → crontab-WYKWDJZA.js} +7 -2
  52. package/dist/crontab-WYKWDJZA.js.map +1 -0
  53. package/dist/{edit-77E3ZQHM.js → edit-VJTGESSH.js} +5 -5
  54. package/dist/edit-WIXE3UGC.js +14 -0
  55. package/dist/index.d.ts +320 -615
  56. package/dist/index.js +86 -1690
  57. package/dist/index.js.map +1 -1
  58. package/dist/{launchd-HNZIWLNC.js → launchd-7YACEL5D.js} +7 -2
  59. package/dist/launchd-7YACEL5D.js.map +1 -0
  60. package/dist/{launchd-7F27BIZB.js → launchd-ENBS6KCA.js} +7 -2
  61. package/dist/launchd-ENBS6KCA.js.map +1 -0
  62. package/dist/{launchd-LZGDP7BM.js → launchd-MINT7AHT.js} +3 -3
  63. package/dist/list-LTPGPOIW.js +16 -0
  64. package/dist/{list-T35RSQVU.js → list-N5B7DY2G.js} +6 -6
  65. package/dist/logs-E2V3TVZS.js +12 -0
  66. package/dist/{logs-YVSFXBSB.js → logs-WA46MIUY.js} +4 -4
  67. package/dist/pause-4F5DHHDH.js +13 -0
  68. package/dist/{pause-OJNUYBCJ.js → pause-7ALFP7IW.js} +5 -5
  69. package/dist/{pause-JB42JGTB.js → pause-DPMRAYQH.js} +4 -4
  70. package/dist/remove-BEFJXL5W.js +13 -0
  71. package/dist/{remove-UASXZCOR.js → remove-WD7QHQXP.js} +5 -5
  72. package/dist/report-DNNTF3UY.js +15 -0
  73. package/dist/{report-CHAJH2SA.js → report-FNIA26A3.js} +6 -6
  74. package/dist/{resume-6WVGU6XW.js → resume-DAN6ZC3R.js} +4 -4
  75. package/dist/resume-E2UFDC4V.js +14 -0
  76. package/dist/{resume-JVTR7OEX.js → resume-GOUUQ2QI.js} +5 -5
  77. package/dist/run-KO2YUJC7.js +34 -0
  78. package/dist/run-KO2YUJC7.js.map +1 -0
  79. package/dist/run-ROG4GKIX.js +34 -0
  80. package/dist/run-ROG4GKIX.js.map +1 -0
  81. package/dist/{schtasks-4V2IFD3A.js → schtasks-5IZCEIPB.js} +6 -1
  82. package/dist/schtasks-5IZCEIPB.js.map +1 -0
  83. package/dist/{schtasks-JGEPEKQS.js → schtasks-6GQ27GI2.js} +6 -1
  84. package/dist/schtasks-6GQ27GI2.js.map +1 -0
  85. package/dist/{schtasks-2EQAD3ES.js → schtasks-ZJ5NAIU6.js} +2 -2
  86. package/dist/{tui-6LOGPILA.js → tui-7PR7OPVQ.js} +9 -9
  87. package/dist/tui-SO6O7CTZ.js +16 -0
  88. package/package.json +1 -1
  89. package/dist/chunk-24PS2XSV.js.map +0 -1
  90. package/dist/chunk-2D5E23XA.js.map +0 -1
  91. package/dist/chunk-H2MUDYMW.js.map +0 -1
  92. package/dist/chunk-QQTIJN3S.js.map +0 -1
  93. package/dist/chunk-U35GRLBD.js.map +0 -1
  94. package/dist/chunk-WYU476R2.js.map +0 -1
  95. package/dist/cost-QKN3U7AG.js +0 -11
  96. package/dist/create-T3BDDS6G.js +0 -14
  97. package/dist/crontab-CDMC2FDT.js.map +0 -1
  98. package/dist/crontab-MAJ52FOK.js.map +0 -1
  99. package/dist/edit-RVPRAAQ2.js +0 -13
  100. package/dist/launchd-7F27BIZB.js.map +0 -1
  101. package/dist/launchd-HNZIWLNC.js.map +0 -1
  102. package/dist/list-OIGERGYJ.js +0 -15
  103. package/dist/logs-D5FNSCXE.js +0 -12
  104. package/dist/pause-2YOLFMAR.js +0 -12
  105. package/dist/remove-RXYKFYBI.js +0 -12
  106. package/dist/report-IYGK5HTC.js +0 -14
  107. package/dist/resume-3ATNZP6D.js +0 -13
  108. package/dist/schtasks-4V2IFD3A.js.map +0 -1
  109. package/dist/schtasks-JGEPEKQS.js.map +0 -1
  110. package/dist/tui-2DUPCX3Q.js +0 -15
  111. /package/dist/{chunk-BY5YEOVG.js.map → chunk-5RGKLL5S.js.map} +0 -0
  112. /package/dist/{chunk-SZRIZBWI.js.map → chunk-7WBOMWGX.js.map} +0 -0
  113. /package/dist/{chunk-GLW7T4QE.js.map → chunk-AQMJSOKP.js.map} +0 -0
  114. /package/dist/{chunk-PFU5YLRH.js.map → chunk-CDLRNIJ2.js.map} +0 -0
  115. /package/dist/{chunk-W2HBRERV.js.map → chunk-CY2RLEHC.js.map} +0 -0
  116. /package/dist/{chunk-5LGOK52J.js.map → chunk-DJ25VI7Q.js.map} +0 -0
  117. /package/dist/{chunk-DVZC42TL.js.map → chunk-F5ZAKXGU.js.map} +0 -0
  118. /package/dist/{chunk-MI7OZ5XD.js.map → chunk-FC5A7WIX.js.map} +0 -0
  119. /package/dist/{chunk-QLRCFKLU.js.map → chunk-IAIVZ6DI.js.map} +0 -0
  120. /package/dist/{chunk-QRYCNVLT.js.map → chunk-LYWZRGJR.js.map} +0 -0
  121. /package/dist/{chunk-M53MPY3U.js.map → chunk-MGOTE5UN.js.map} +0 -0
  122. /package/dist/{chunk-S6W4SURF.js.map → chunk-VCMT7VYH.js.map} +0 -0
  123. /package/dist/{chunk-TAGHPCFT.js.map → chunk-VXY6ZLTA.js.map} +0 -0
  124. /package/dist/{chunk-S6E67XMR.js.map → chunk-WD4XNFNG.js.map} +0 -0
  125. /package/dist/{chunk-HF7PGQI3.js.map → chunk-WMF2RTBI.js.map} +0 -0
  126. /package/dist/{chunk-LBH6SLHH.js.map → chunk-XIT33W6W.js.map} +0 -0
  127. /package/dist/{chunk-4I5UIASZ.js.map → chunk-YF7F7AXH.js.map} +0 -0
  128. /package/dist/{chunk-SMZYA6CY.js.map → chunk-YUULUW5Q.js.map} +0 -0
  129. /package/dist/{cost-QGM3D4QW.js.map → cost-DIEL6X7Y.js.map} +0 -0
  130. /package/dist/{cost-QKN3U7AG.js.map → cost-WLBDKGRO.js.map} +0 -0
  131. /package/dist/{create-T3BDDS6G.js.map → create-F2TZM2L3.js.map} +0 -0
  132. /package/dist/{create-U5WYKTD4.js.map → create-OCKJJFJ3.js.map} +0 -0
  133. /package/dist/{crontab-PNEWANLW.js.map → crontab-G4S5N4ZU.js.map} +0 -0
  134. /package/dist/{edit-77E3ZQHM.js.map → edit-VJTGESSH.js.map} +0 -0
  135. /package/dist/{edit-RVPRAAQ2.js.map → edit-WIXE3UGC.js.map} +0 -0
  136. /package/dist/{launchd-LZGDP7BM.js.map → launchd-MINT7AHT.js.map} +0 -0
  137. /package/dist/{list-OIGERGYJ.js.map → list-LTPGPOIW.js.map} +0 -0
  138. /package/dist/{list-T35RSQVU.js.map → list-N5B7DY2G.js.map} +0 -0
  139. /package/dist/{logs-D5FNSCXE.js.map → logs-E2V3TVZS.js.map} +0 -0
  140. /package/dist/{logs-YVSFXBSB.js.map → logs-WA46MIUY.js.map} +0 -0
  141. /package/dist/{pause-2YOLFMAR.js.map → pause-4F5DHHDH.js.map} +0 -0
  142. /package/dist/{pause-OJNUYBCJ.js.map → pause-7ALFP7IW.js.map} +0 -0
  143. /package/dist/{pause-JB42JGTB.js.map → pause-DPMRAYQH.js.map} +0 -0
  144. /package/dist/{remove-RXYKFYBI.js.map → remove-BEFJXL5W.js.map} +0 -0
  145. /package/dist/{remove-UASXZCOR.js.map → remove-WD7QHQXP.js.map} +0 -0
  146. /package/dist/{report-IYGK5HTC.js.map → report-DNNTF3UY.js.map} +0 -0
  147. /package/dist/{report-CHAJH2SA.js.map → report-FNIA26A3.js.map} +0 -0
  148. /package/dist/{resume-6WVGU6XW.js.map → resume-DAN6ZC3R.js.map} +0 -0
  149. /package/dist/{resume-3ATNZP6D.js.map → resume-E2UFDC4V.js.map} +0 -0
  150. /package/dist/{resume-JVTR7OEX.js.map → resume-GOUUQ2QI.js.map} +0 -0
  151. /package/dist/{schtasks-2EQAD3ES.js.map → schtasks-ZJ5NAIU6.js.map} +0 -0
  152. /package/dist/{tui-6LOGPILA.js.map → tui-7PR7OPVQ.js.map} +0 -0
  153. /package/dist/{tui-2DUPCX3Q.js.map → tui-SO6O7CTZ.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,23 +1,11 @@
1
- import { Document } from "yaml";
2
- import { z } from "zod";
3
- import Database from "better-sqlite3";
1
+ import { Document } from 'yaml';
2
+ import { z } from 'zod';
3
+ import Database from 'better-sqlite3';
4
4
 
5
- type CliCommand =
6
- | "create"
7
- | "check-repo"
8
- | "list"
9
- | "logs"
10
- | "report"
11
- | "pause"
12
- | "resume"
13
- | "remove"
14
- | "edit"
15
- | "cost"
16
- | "dashboard"
17
- | "help";
5
+ type CliCommand = "create" | "check-repo" | "list" | "logs" | "report" | "pause" | "resume" | "remove" | "edit" | "cost" | "run" | "dashboard" | "help";
18
6
  interface ParsedCommand {
19
- command: CliCommand;
20
- args: Record<string, string | number | boolean | undefined>;
7
+ command: CliCommand;
8
+ args: Record<string, string | number | boolean | undefined>;
21
9
  }
22
10
  type CommandHandler = (args: ParsedCommand["args"]) => Promise<void>;
23
11
  declare const COMMANDS: Record<string, string>;
@@ -37,9 +25,7 @@ declare function checkRepoCommand(args: ParsedCommand["args"]): Promise<void>;
37
25
  *
38
26
  * @param args - Parsed CLI arguments (jobId?: string, json?: boolean)
39
27
  */
40
- declare function costCommand(
41
- args: Record<string, string | number | boolean | undefined>,
42
- ): Promise<void>;
28
+ declare function costCommand(args: Record<string, string | number | boolean | undefined>): Promise<void>;
43
29
 
44
30
  /**
45
31
  * Create a new autonomous cron job. Validates all inputs, optionally clones the repo,
@@ -123,179 +109,103 @@ declare function parseCommand(argv: string[]): ParsedCommand;
123
109
  */
124
110
  declare function runCli(argv: string[]): Promise<void>;
125
111
 
126
- declare const JobConfigSchema: z.ZodObject<
127
- {
128
- id: z.ZodString;
129
- name: z.ZodString;
130
- repo: z.ZodObject<
131
- {
132
- path: z.ZodString;
133
- branch: z.ZodDefault<z.ZodString>;
134
- remote: z.ZodDefault<z.ZodString>;
135
- },
136
- z.core.$strip
137
- >;
138
- schedule: z.ZodObject<
139
- {
140
- cron: z.ZodString;
141
- timezone: z.ZodDefault<z.ZodString>;
142
- },
143
- z.core.$strip
144
- >;
145
- focus: z.ZodDefault<
146
- z.ZodArray<
147
- z.ZodEnum<{
148
- "open-issues": "open-issues";
149
- "bug-discovery": "bug-discovery";
150
- features: "features";
151
- documentation: "documentation";
152
- }>
153
- >
154
- >;
155
- systemPrompt: z.ZodOptional<z.ZodString>;
156
- guardrails: z.ZodDefault<
157
- z.ZodObject<
158
- {
159
- maxTurns: z.ZodDefault<z.ZodNumber>;
160
- maxBudgetUsd: z.ZodDefault<z.ZodNumber>;
161
- noNewDependencies: z.ZodDefault<z.ZodBoolean>;
162
- noArchitectureChanges: z.ZodDefault<z.ZodBoolean>;
163
- bugFixOnly: z.ZodDefault<z.ZodBoolean>;
164
- restrictToPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
165
- },
166
- z.core.$strip
167
- >
168
- >;
169
- notifications: z.ZodDefault<
170
- z.ZodObject<
171
- {
172
- discord: z.ZodOptional<
173
- z.ZodObject<
174
- {
175
- webhookUrl: z.ZodString;
176
- onSuccess: z.ZodDefault<z.ZodBoolean>;
177
- onFailure: z.ZodDefault<z.ZodBoolean>;
178
- onNoChanges: z.ZodDefault<z.ZodBoolean>;
179
- onLocked: z.ZodDefault<z.ZodBoolean>;
180
- },
181
- z.core.$strip
182
- >
183
- >;
184
- slack: z.ZodOptional<
185
- z.ZodObject<
186
- {
187
- webhookUrl: z.ZodString;
188
- onSuccess: z.ZodDefault<z.ZodBoolean>;
189
- onFailure: z.ZodDefault<z.ZodBoolean>;
190
- onNoChanges: z.ZodDefault<z.ZodBoolean>;
191
- onLocked: z.ZodDefault<z.ZodBoolean>;
192
- },
193
- z.core.$strip
194
- >
195
- >;
196
- telegram: z.ZodOptional<
197
- z.ZodObject<
198
- {
199
- botToken: z.ZodString;
200
- chatId: z.ZodString;
201
- onSuccess: z.ZodDefault<z.ZodBoolean>;
202
- onFailure: z.ZodDefault<z.ZodBoolean>;
203
- onNoChanges: z.ZodDefault<z.ZodBoolean>;
204
- onLocked: z.ZodDefault<z.ZodBoolean>;
205
- },
206
- z.core.$strip
207
- >
208
- >;
209
- },
210
- z.core.$strip
211
- >
212
- >;
213
- enabled: z.ZodDefault<z.ZodBoolean>;
214
- model: z.ZodOptional<
215
- z.ZodUnion<
216
- readonly [
217
- z.ZodEnum<{
218
- default: "default";
219
- sonnet: "sonnet";
220
- opus: "opus";
221
- haiku: "haiku";
222
- opusplan: "opusplan";
223
- }>,
224
- z.ZodString,
225
- ]
226
- >
227
- >;
228
- budget: z.ZodOptional<
229
- z.ZodObject<
230
- {
231
- dailyUsd: z.ZodOptional<z.ZodNumber>;
232
- weeklyUsd: z.ZodOptional<z.ZodNumber>;
233
- monthlyUsd: z.ZodOptional<z.ZodNumber>;
234
- },
235
- z.core.$strip
236
- >
237
- >;
238
- maxFeedbackRounds: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
239
- pipeline: z.ZodOptional<
240
- z.ZodObject<
241
- {
242
- enabled: z.ZodDefault<z.ZodBoolean>;
243
- planModel: z.ZodDefault<
244
- z.ZodUnion<
245
- readonly [
246
- z.ZodEnum<{
247
- default: "default";
248
- sonnet: "sonnet";
249
- opus: "opus";
250
- haiku: "haiku";
251
- opusplan: "opusplan";
252
- }>,
253
- z.ZodString,
254
- ]
255
- >
256
- >;
257
- implementModel: z.ZodDefault<
258
- z.ZodUnion<
259
- readonly [
260
- z.ZodEnum<{
261
- default: "default";
262
- sonnet: "sonnet";
263
- opus: "opus";
264
- haiku: "haiku";
265
- opusplan: "opusplan";
266
- }>,
267
- z.ZodString,
268
- ]
269
- >
270
- >;
271
- reviewModel: z.ZodDefault<
272
- z.ZodUnion<
273
- readonly [
274
- z.ZodEnum<{
275
- default: "default";
276
- sonnet: "sonnet";
277
- opus: "opus";
278
- haiku: "haiku";
279
- opusplan: "opusplan";
280
- }>,
281
- z.ZodString,
282
- ]
283
- >
284
- >;
285
- maxReviewRounds: z.ZodDefault<z.ZodNumber>;
286
- },
287
- z.core.$strip
288
- >
289
- >;
290
- },
291
- z.core.$strip
292
- >;
112
+ declare const JobConfigSchema: z.ZodObject<{
113
+ id: z.ZodString;
114
+ name: z.ZodString;
115
+ repo: z.ZodObject<{
116
+ path: z.ZodString;
117
+ branch: z.ZodDefault<z.ZodString>;
118
+ remote: z.ZodDefault<z.ZodString>;
119
+ }, z.core.$strip>;
120
+ schedule: z.ZodObject<{
121
+ cron: z.ZodString;
122
+ timezone: z.ZodDefault<z.ZodString>;
123
+ }, z.core.$strip>;
124
+ focus: z.ZodDefault<z.ZodArray<z.ZodEnum<{
125
+ "open-issues": "open-issues";
126
+ "bug-discovery": "bug-discovery";
127
+ features: "features";
128
+ documentation: "documentation";
129
+ }>>>;
130
+ systemPrompt: z.ZodOptional<z.ZodString>;
131
+ guardrails: z.ZodDefault<z.ZodObject<{
132
+ maxTurns: z.ZodDefault<z.ZodNumber>;
133
+ maxBudgetUsd: z.ZodDefault<z.ZodNumber>;
134
+ noNewDependencies: z.ZodDefault<z.ZodBoolean>;
135
+ noArchitectureChanges: z.ZodDefault<z.ZodBoolean>;
136
+ bugFixOnly: z.ZodDefault<z.ZodBoolean>;
137
+ restrictToPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
138
+ }, z.core.$strip>>;
139
+ notifications: z.ZodDefault<z.ZodObject<{
140
+ discord: z.ZodOptional<z.ZodObject<{
141
+ webhookUrl: z.ZodString;
142
+ onSuccess: z.ZodDefault<z.ZodBoolean>;
143
+ onFailure: z.ZodDefault<z.ZodBoolean>;
144
+ onNoChanges: z.ZodDefault<z.ZodBoolean>;
145
+ onLocked: z.ZodDefault<z.ZodBoolean>;
146
+ }, z.core.$strip>>;
147
+ slack: z.ZodOptional<z.ZodObject<{
148
+ webhookUrl: z.ZodString;
149
+ onSuccess: z.ZodDefault<z.ZodBoolean>;
150
+ onFailure: z.ZodDefault<z.ZodBoolean>;
151
+ onNoChanges: z.ZodDefault<z.ZodBoolean>;
152
+ onLocked: z.ZodDefault<z.ZodBoolean>;
153
+ }, z.core.$strip>>;
154
+ telegram: z.ZodOptional<z.ZodObject<{
155
+ botToken: z.ZodString;
156
+ chatId: z.ZodString;
157
+ onSuccess: z.ZodDefault<z.ZodBoolean>;
158
+ onFailure: z.ZodDefault<z.ZodBoolean>;
159
+ onNoChanges: z.ZodDefault<z.ZodBoolean>;
160
+ onLocked: z.ZodDefault<z.ZodBoolean>;
161
+ }, z.core.$strip>>;
162
+ }, z.core.$strip>>;
163
+ enabled: z.ZodDefault<z.ZodBoolean>;
164
+ model: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
165
+ default: "default";
166
+ sonnet: "sonnet";
167
+ opus: "opus";
168
+ haiku: "haiku";
169
+ opusplan: "opusplan";
170
+ }>, z.ZodString]>>;
171
+ budget: z.ZodOptional<z.ZodObject<{
172
+ dailyUsd: z.ZodOptional<z.ZodNumber>;
173
+ weeklyUsd: z.ZodOptional<z.ZodNumber>;
174
+ monthlyUsd: z.ZodOptional<z.ZodNumber>;
175
+ }, z.core.$strip>>;
176
+ maxFeedbackRounds: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
177
+ pipeline: z.ZodOptional<z.ZodObject<{
178
+ enabled: z.ZodDefault<z.ZodBoolean>;
179
+ planModel: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
180
+ default: "default";
181
+ sonnet: "sonnet";
182
+ opus: "opus";
183
+ haiku: "haiku";
184
+ opusplan: "opusplan";
185
+ }>, z.ZodString]>>;
186
+ implementModel: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
187
+ default: "default";
188
+ sonnet: "sonnet";
189
+ opus: "opus";
190
+ haiku: "haiku";
191
+ opusplan: "opusplan";
192
+ }>, z.ZodString]>>;
193
+ reviewModel: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
194
+ default: "default";
195
+ sonnet: "sonnet";
196
+ opus: "opus";
197
+ haiku: "haiku";
198
+ opusplan: "opusplan";
199
+ }>, z.ZodString]>>;
200
+ maxReviewRounds: z.ZodDefault<z.ZodNumber>;
201
+ }, z.core.$strip>>;
202
+ }, z.core.$strip>;
293
203
  type JobConfig = z.infer<typeof JobConfigSchema>;
294
204
  interface ScheduleInfo {
295
- cron: string;
296
- timezone: string;
297
- humanReadable: string;
298
- nextRuns: Date[];
205
+ cron: string;
206
+ timezone: string;
207
+ humanReadable: string;
208
+ nextRuns: Date[];
299
209
  }
300
210
 
301
211
  /**
@@ -358,10 +268,7 @@ declare function readJob(jobId: string): Promise<JobConfig>;
358
268
  * Update specified fields of a job config while preserving YAML comments.
359
269
  * Validates the result before writing. Rejects invalid updates.
360
270
  */
361
- declare function updateJob(
362
- jobId: string,
363
- updates: Partial<Omit<JobConfig, "id">>,
364
- ): Promise<JobConfig>;
271
+ declare function updateJob(jobId: string, updates: Partial<Omit<JobConfig, "id">>): Promise<JobConfig>;
365
272
  /**
366
273
  * Delete a job and its entire directory.
367
274
  * Idempotent: does not throw if the job doesn't exist.
@@ -394,97 +301,89 @@ declare function getNextRuns(cronExpr: string, timezone: string, count?: number)
394
301
  declare function validateAndDescribeSchedule(cronExpr: string, timezone: string): ScheduleInfo;
395
302
 
396
303
  interface SpawnOptions {
397
- cwd: string;
398
- prompt: string;
399
- maxTurns: number;
400
- maxBudgetUsd: number;
401
- allowedTools: string[];
402
- appendSystemPrompt?: string;
403
- model?: string;
404
- env?: Record<string, string>;
304
+ cwd: string;
305
+ prompt: string;
306
+ maxTurns: number;
307
+ maxBudgetUsd: number;
308
+ allowedTools: string[];
309
+ appendSystemPrompt?: string;
310
+ model?: string;
311
+ env?: Record<string, string>;
405
312
  }
406
313
  interface SpawnResult {
407
- success: boolean;
408
- result: string;
409
- summary: string;
410
- sessionId: string;
411
- costUsd: number;
412
- numTurns: number;
413
- durationMs: number;
414
- isError: boolean;
415
- subtype: string;
416
- errors?: string[];
314
+ success: boolean;
315
+ result: string;
316
+ summary: string;
317
+ sessionId: string;
318
+ costUsd: number;
319
+ numTurns: number;
320
+ durationMs: number;
321
+ isError: boolean;
322
+ subtype: string;
323
+ errors?: string[];
417
324
  }
418
- type RunStatus =
419
- | "success"
420
- | "no-changes"
421
- | "error"
422
- | "locked"
423
- | "git-error"
424
- | "paused"
425
- | "budget-exceeded"
426
- | "needs-human-review"
427
- | "merge-conflict";
325
+ type RunStatus = "success" | "no-changes" | "error" | "locked" | "git-error" | "paused" | "budget-exceeded" | "needs-human-review" | "merge-conflict";
428
326
  interface RunResult {
429
- status: RunStatus;
430
- jobId: string;
431
- runId: string;
432
- startedAt: string;
433
- completedAt: string;
434
- durationMs: number;
435
- prUrl?: string;
436
- summary?: string;
437
- costUsd?: number;
438
- numTurns?: number;
439
- sessionId?: string;
440
- error?: string;
441
- branchName?: string;
442
- issueNumber?: number;
443
- model?: string;
444
- feedbackRound?: number;
445
- prNumber?: number;
446
- pipelineStages?: Array<{
447
- stage: string;
448
- costUsd: number;
449
- durationMs: number;
450
- numTurns: number;
451
- }>;
327
+ status: RunStatus;
328
+ jobId: string;
329
+ runId: string;
330
+ startedAt: string;
331
+ completedAt: string;
332
+ durationMs: number;
333
+ prUrl?: string;
334
+ summary?: string;
335
+ costUsd?: number;
336
+ numTurns?: number;
337
+ sessionId?: string;
338
+ error?: string;
339
+ branchName?: string;
340
+ issueNumber?: number;
341
+ model?: string;
342
+ feedbackRound?: number;
343
+ prNumber?: number;
344
+ pipelineStages?: Array<{
345
+ stage: string;
346
+ costUsd: number;
347
+ durationMs: number;
348
+ numTurns: number;
349
+ }>;
350
+ }
351
+ interface RunLogEntry extends RunResult {
452
352
  }
453
- interface RunLogEntry extends RunResult {}
454
353
  interface ReviewThread {
455
- id: string;
456
- isResolved: boolean;
457
- comments: Array<{
458
- body: string;
459
- author: {
460
- login: string;
461
- };
462
- }>;
354
+ id: string;
355
+ isResolved: boolean;
356
+ comments: Array<{
357
+ body: string;
358
+ author: {
359
+ login: string;
360
+ };
361
+ }>;
463
362
  }
464
363
  interface PRFeedbackContext {
465
- number: number;
466
- title: string;
467
- headRefName: string;
468
- url: string;
469
- reviewDecision: string;
470
- unresolvedThreads: ReviewThread[];
471
- currentRound: number;
364
+ number: number;
365
+ title: string;
366
+ headRefName: string;
367
+ url: string;
368
+ reviewDecision: string;
369
+ unresolvedThreads: ReviewThread[];
370
+ currentRound: number;
472
371
  }
473
372
  interface PipelineStageResult {
474
- stage: "plan" | "implement" | "review" | "fix";
475
- spawnResult: SpawnResult;
373
+ stage: "plan" | "implement" | "review" | "fix";
374
+ spawnResult: SpawnResult;
476
375
  }
477
376
  interface PipelineResult {
478
- stages: PipelineStageResult[];
479
- reviewVerdict: "pass" | "fail" | "skipped";
480
- totalCostUsd: number;
481
- totalDurationMs: number;
482
- summary: string;
377
+ stages: PipelineStageResult[];
378
+ reviewVerdict: "pass" | "fail" | "skipped";
379
+ totalCostUsd: number;
380
+ totalDurationMs: number;
381
+ summary: string;
483
382
  }
484
383
  interface RebaseResult {
485
- diverged: boolean;
486
- rebased: boolean;
487
- conflicts: string[];
384
+ diverged: boolean;
385
+ rebased: boolean;
386
+ conflicts: string[];
488
387
  }
489
388
 
490
389
  /**
@@ -495,37 +394,29 @@ interface RebaseResult {
495
394
  */
496
395
  declare function sendNotifications(config: JobConfig, result: RunResult): Promise<void>;
497
396
 
498
- type NotificationEvent =
499
- | "success"
500
- | "no-changes"
501
- | "error"
502
- | "locked"
503
- | "git-error"
504
- | "budget-exceeded"
505
- | "merge-conflict"
506
- | "needs-human-review";
397
+ type NotificationEvent = "success" | "no-changes" | "error" | "locked" | "git-error" | "budget-exceeded" | "merge-conflict" | "needs-human-review";
507
398
  interface NotificationPayload {
508
- event: NotificationEvent;
509
- jobId: string;
510
- jobName: string;
511
- runId: string;
512
- repoPath: string;
513
- branch: string;
514
- startedAt: string;
515
- completedAt: string;
516
- durationMs: number;
517
- prUrl?: string;
518
- summary?: string;
519
- costUsd?: number;
520
- numTurns?: number;
521
- error?: string;
522
- branchName?: string;
399
+ event: NotificationEvent;
400
+ jobId: string;
401
+ jobName: string;
402
+ runId: string;
403
+ repoPath: string;
404
+ branch: string;
405
+ startedAt: string;
406
+ completedAt: string;
407
+ durationMs: number;
408
+ prUrl?: string;
409
+ summary?: string;
410
+ costUsd?: number;
411
+ numTurns?: number;
412
+ error?: string;
413
+ branchName?: string;
523
414
  }
524
415
  interface EventTriggers {
525
- onSuccess?: boolean;
526
- onFailure?: boolean;
527
- onNoChanges?: boolean;
528
- onLocked?: boolean;
416
+ onSuccess?: boolean;
417
+ onFailure?: boolean;
418
+ onNoChanges?: boolean;
419
+ onLocked?: boolean;
529
420
  }
530
421
  /**
531
422
  * Determines whether a notification should be sent for a given run status
@@ -567,13 +458,13 @@ declare function formatTelegram(payload: NotificationPayload, chatId: string): o
567
458
  */
568
459
  declare function extractIssueNumber(text: string): number | undefined;
569
460
  interface PostIssueCommentOptions {
570
- repoPath: string;
571
- issueNumber: number;
572
- status: RunStatus;
573
- prUrl?: string;
574
- summary?: string;
575
- error?: string;
576
- jobName: string;
461
+ repoPath: string;
462
+ issueNumber: number;
463
+ status: RunStatus;
464
+ prUrl?: string;
465
+ summary?: string;
466
+ error?: string;
467
+ jobName: string;
577
468
  }
578
469
  /**
579
470
  * Post a comment on a GitHub issue about the run result.
@@ -584,15 +475,15 @@ interface PostIssueCommentOptions {
584
475
  declare function postIssueComment(options: PostIssueCommentOptions): Promise<void>;
585
476
 
586
477
  interface RegisteredJob {
587
- jobId: string;
588
- schedule: string;
589
- command: string;
478
+ jobId: string;
479
+ schedule: string;
480
+ command: string;
590
481
  }
591
482
  interface Scheduler {
592
- register(job: JobConfig, env?: Record<string, string>): Promise<void>;
593
- unregister(jobId: string): Promise<void>;
594
- isRegistered(jobId: string): Promise<boolean>;
595
- list(): Promise<RegisteredJob[]>;
483
+ register(job: JobConfig, env?: Record<string, string>): Promise<void>;
484
+ unregister(jobId: string): Promise<void>;
485
+ isRegistered(jobId: string): Promise<boolean>;
486
+ list(): Promise<RegisteredJob[]>;
596
487
  }
597
488
  /**
598
489
  * Factory function that returns the correct Scheduler implementation
@@ -606,10 +497,10 @@ declare function createScheduler(): Promise<Scheduler>;
606
497
  * Uses comment-tagged crontab entries for identification and CRUD.
607
498
  */
608
499
  declare class CrontabScheduler implements Scheduler {
609
- register(job: JobConfig, _env?: Record<string, string>): Promise<void>;
610
- unregister(jobId: string): Promise<void>;
611
- isRegistered(jobId: string): Promise<boolean>;
612
- list(): Promise<RegisteredJob[]>;
500
+ register(job: JobConfig, _env?: Record<string, string>): Promise<void>;
501
+ unregister(jobId: string): Promise<void>;
502
+ isRegistered(jobId: string): Promise<boolean>;
503
+ list(): Promise<RegisteredJob[]>;
613
504
  }
614
505
 
615
506
  type Platform = "linux" | "darwin" | "win32";
@@ -620,11 +511,11 @@ type Platform = "linux" | "darwin" | "win32";
620
511
  declare function detectPlatform(): Platform;
621
512
 
622
513
  interface CalendarInterval {
623
- Month?: number;
624
- Day?: number;
625
- Weekday?: number;
626
- Hour?: number;
627
- Minute?: number;
514
+ Month?: number;
515
+ Day?: number;
516
+ Weekday?: number;
517
+ Hour?: number;
518
+ Minute?: number;
628
519
  }
629
520
  /**
630
521
  * Convert a 5-field cron expression to launchd scheduling config.
@@ -635,23 +526,23 @@ interface CalendarInterval {
635
526
  * Throws if the expression would produce more than 50 calendar intervals.
636
527
  */
637
528
  declare function cronToCalendarIntervals(cronExpr: string): {
638
- calendarIntervals?: CalendarInterval[];
639
- startInterval?: number;
529
+ calendarIntervals?: CalendarInterval[];
530
+ startInterval?: number;
640
531
  };
641
532
  /**
642
533
  * LaunchdScheduler implements the Scheduler interface for macOS.
643
534
  * Uses plist files in ~/Library/LaunchAgents/ and modern launchctl bootstrap/bootout.
644
535
  */
645
536
  declare class LaunchdScheduler implements Scheduler {
646
- register(job: JobConfig, env?: Record<string, string>): Promise<void>;
647
- unregister(jobId: string): Promise<void>;
648
- isRegistered(jobId: string): Promise<boolean>;
649
- list(): Promise<RegisteredJob[]>;
537
+ register(job: JobConfig, env?: Record<string, string>): Promise<void>;
538
+ unregister(jobId: string): Promise<void>;
539
+ isRegistered(jobId: string): Promise<boolean>;
540
+ list(): Promise<RegisteredJob[]>;
650
541
  }
651
542
 
652
543
  interface SchtasksSchedule {
653
- args: string[];
654
- description: string;
544
+ args: string[];
545
+ description: string;
655
546
  }
656
547
  /**
657
548
  * Translate a 5-field cron expression into schtasks /SC schedule parameters.
@@ -674,10 +565,10 @@ declare function cronToSchtasks(cronExpr: string): SchtasksSchedule;
674
565
  * Task name format: `claude-auto-{jobId}`
675
566
  */
676
567
  declare class SchtasksScheduler implements Scheduler {
677
- register(job: JobConfig, _env?: Record<string, string>): Promise<void>;
678
- unregister(jobId: string): Promise<void>;
679
- isRegistered(jobId: string): Promise<boolean>;
680
- list(): Promise<RegisteredJob[]>;
568
+ register(job: JobConfig, _env?: Record<string, string>): Promise<void>;
569
+ unregister(jobId: string): Promise<void>;
570
+ isRegistered(jobId: string): Promise<boolean>;
571
+ list(): Promise<RegisteredJob[]>;
681
572
  }
682
573
 
683
574
  /**
@@ -685,13 +576,13 @@ declare class SchtasksScheduler implements Scheduler {
685
576
  * (issue numbers, PR URLs, branch names) -- never raw narrative summaries.
686
577
  */
687
578
  interface RunContext {
688
- id: string;
689
- status: string;
690
- pr_url: string | null;
691
- branch_name: string | null;
692
- issue_number: number | null;
693
- summary: string | null;
694
- started_at: string;
579
+ id: string;
580
+ status: string;
581
+ pr_url: string | null;
582
+ branch_name: string | null;
583
+ issue_number: number | null;
584
+ summary: string | null;
585
+ started_at: string;
695
586
  }
696
587
  /**
697
588
  * Persist a run log entry to the SQLite database.
@@ -726,28 +617,28 @@ declare function formatContextWindow(context: RunContext[]): string;
726
617
  * before spawning a new run.
727
618
  */
728
619
  interface BudgetConfig {
729
- dailyUsd?: number;
730
- weeklyUsd?: number;
731
- monthlyUsd?: number;
620
+ dailyUsd?: number;
621
+ weeklyUsd?: number;
622
+ monthlyUsd?: number;
732
623
  }
733
624
  /**
734
625
  * Per-job cost summary row returned by getCostSummary() when no jobId is specified.
735
626
  */
736
627
  interface CostSummaryRow {
737
- job_id: string;
738
- runs: number;
739
- total_cost: number;
740
- avg_cost: number;
741
- total_turns: number;
628
+ job_id: string;
629
+ runs: number;
630
+ total_cost: number;
631
+ avg_cost: number;
632
+ total_turns: number;
742
633
  }
743
634
  /**
744
635
  * Per-day cost breakdown row returned by getCostSummary(jobId).
745
636
  */
746
637
  interface DailyCostRow {
747
- day: string;
748
- runs: number;
749
- total_cost: number;
750
- total_turns: number;
638
+ day: string;
639
+ runs: number;
640
+ total_cost: number;
641
+ total_turns: number;
751
642
  }
752
643
  /**
753
644
  * Check whether cumulative cost for a job exceeds any configured budget cap.
@@ -806,13 +697,7 @@ declare function checkoutExistingBranch(repoPath: string, branchName: string): P
806
697
  * Create a pull request via GitHub CLI.
807
698
  * Returns the PR URL.
808
699
  */
809
- declare function createPR(
810
- repoPath: string,
811
- branchName: string,
812
- baseBranch: string,
813
- title: string,
814
- body: string,
815
- ): Promise<string>;
700
+ declare function createPR(repoPath: string, branchName: string, baseBranch: string, title: string, body: string): Promise<string>;
816
701
  /**
817
702
  * Check if the target branch has diverged from the current branch.
818
703
  * Fetches the remote base branch first, then uses git merge-base --is-ancestor
@@ -820,21 +705,13 @@ declare function createPR(
820
705
  *
821
706
  * @returns true if diverged (remote base has commits not in current branch), false otherwise
822
707
  */
823
- declare function checkDivergence(
824
- repoPath: string,
825
- baseBranch: string,
826
- remote: string,
827
- ): Promise<boolean>;
708
+ declare function checkDivergence(repoPath: string, baseBranch: string, remote: string): Promise<boolean>;
828
709
  /**
829
710
  * Attempt to rebase the current branch onto the remote base branch.
830
711
  * First checks for divergence; if not diverged, returns early.
831
712
  * If diverged, attempts rebase. On conflict, aborts cleanly and returns conflict list.
832
713
  */
833
- declare function attemptRebase(
834
- repoPath: string,
835
- baseBranch: string,
836
- remote: string,
837
- ): Promise<RebaseResult>;
714
+ declare function attemptRebase(repoPath: string, baseBranch: string, remote: string): Promise<RebaseResult>;
838
715
  /**
839
716
  * Get the diff between the base branch and HEAD.
840
717
  * Best-effort: returns empty string on error.
@@ -846,12 +723,12 @@ declare function getDiffFromBase(repoPath: string, baseBranch: string): Promise<
846
723
  * Body is truncated to 1000 chars to reduce token usage.
847
724
  */
848
725
  interface ScoredIssue {
849
- number: number;
850
- title: string;
851
- body: string;
852
- labels: string[];
853
- score: number;
854
- skipReason?: string;
726
+ number: number;
727
+ title: string;
728
+ body: string;
729
+ labels: string[];
730
+ score: number;
731
+ skipReason?: string;
855
732
  }
856
733
  /**
857
734
  * Triage GitHub issues for a repository by scoring and filtering them
@@ -941,13 +818,7 @@ declare function executeRun(jobId: string): Promise<RunResult>;
941
818
  * @param triaged - Pre-scored issues from triage
942
819
  * @returns PipelineResult with all stage results aggregated
943
820
  */
944
- declare function runPipeline(
945
- config: JobConfig,
946
- repoPath: string,
947
- _branchName: string,
948
- runContext: RunContext[],
949
- triaged: ScoredIssue[],
950
- ): Promise<PipelineResult>;
821
+ declare function runPipeline(config: JobConfig, repoPath: string, _branchName: string, runContext: RunContext[], triaged: ScoredIssue[]): Promise<PipelineResult>;
951
822
 
952
823
  /**
953
824
  * Build a read-only tool set for plan and review stages.
@@ -968,11 +839,7 @@ declare function buildReadOnlyTools(_config: JobConfig): string[];
968
839
  * @param context - Prior run context for duplicate avoidance
969
840
  * @returns Multi-section plan prompt string
970
841
  */
971
- declare function buildPlanPrompt(
972
- config: JobConfig,
973
- triaged: ScoredIssue[],
974
- context: RunContext[],
975
- ): string;
842
+ declare function buildPlanPrompt(config: JobConfig, triaged: ScoredIssue[], context: RunContext[]): string;
976
843
  /**
977
844
  * Build the system prompt for the PLAN stage.
978
845
  *
@@ -990,11 +857,7 @@ declare function buildPlanSystemPrompt(config: JobConfig): string;
990
857
  * @param context - Prior run context for duplicate avoidance
991
858
  * @returns Multi-section implement prompt string
992
859
  */
993
- declare function buildImplementPrompt(
994
- config: JobConfig,
995
- planResult: SpawnResult,
996
- context: RunContext[],
997
- ): string;
860
+ declare function buildImplementPrompt(config: JobConfig, planResult: SpawnResult, context: RunContext[]): string;
998
861
  /**
999
862
  * Build the system prompt for the IMPLEMENT stage.
1000
863
  *
@@ -1011,11 +874,7 @@ declare function buildImplementSystemPrompt(config: JobConfig): string;
1011
874
  * @param diffOutput - Git diff of implementation changes
1012
875
  * @returns Multi-section review prompt string
1013
876
  */
1014
- declare function buildReviewPrompt(
1015
- _config: JobConfig,
1016
- planText: string,
1017
- diffOutput: string,
1018
- ): string;
877
+ declare function buildReviewPrompt(_config: JobConfig, planText: string, diffOutput: string): string;
1019
878
  /**
1020
879
  * Build the system prompt for the REVIEW stage.
1021
880
  *
@@ -1055,11 +914,11 @@ declare function parseReviewVerdict(reviewResult: SpawnResult): "pass" | "fail";
1055
914
  * Not exported -- external consumers use PRFeedbackContext.
1056
915
  */
1057
916
  interface PRWithFeedback {
1058
- number: number;
1059
- title: string;
1060
- headRefName: string;
1061
- reviewDecision: string;
1062
- url: string;
917
+ number: number;
918
+ title: string;
919
+ headRefName: string;
920
+ reviewDecision: string;
921
+ url: string;
1063
922
  }
1064
923
  /**
1065
924
  * List open PRs authored by the current user that match this job's branch prefix.
@@ -1069,10 +928,7 @@ interface PRWithFeedback {
1069
928
  * @param jobId - Job identifier used to filter branches by prefix
1070
929
  * @returns Array of PRs matching the claude-auto/{jobId}/ branch prefix
1071
930
  */
1072
- declare function listOpenPRsWithFeedback(
1073
- repoPath: string,
1074
- jobId: string,
1075
- ): Promise<PRWithFeedback[]>;
931
+ declare function listOpenPRsWithFeedback(repoPath: string, jobId: string): Promise<PRWithFeedback[]>;
1076
932
  /**
1077
933
  * Get the owner and name of the repository from `gh repo view`.
1078
934
  *
@@ -1080,8 +936,8 @@ declare function listOpenPRsWithFeedback(
1080
936
  * @returns Object with owner (login) and name of the repository
1081
937
  */
1082
938
  declare function getRepoOwnerName(repoPath: string): Promise<{
1083
- owner: string;
1084
- name: string;
939
+ owner: string;
940
+ name: string;
1085
941
  }>;
1086
942
  /**
1087
943
  * Fetch unresolved review threads for a PR using the GitHub GraphQL API.
@@ -1129,11 +985,7 @@ declare function getFeedbackRound(jobId: string, prNumber: number): number;
1129
985
  * @param maxRounds - Maximum number of feedback rounds allowed
1130
986
  * @returns PRFeedbackContext if there's actionable feedback, null otherwise
1131
987
  */
1132
- declare function checkPendingPRFeedback(
1133
- repoPath: string,
1134
- jobId: string,
1135
- maxRounds: number,
1136
- ): Promise<PRFeedbackContext | null>;
988
+ declare function checkPendingPRFeedback(repoPath: string, jobId: string, maxRounds: number): Promise<PRFeedbackContext | null>;
1137
989
 
1138
990
  /**
1139
991
  * Build the system prompt for Claude, including research instructions
@@ -1168,11 +1020,7 @@ declare function buildWorkPrompt(config: JobConfig, context?: RunContext[]): str
1168
1020
  * @param context - Optional array of prior run context
1169
1021
  * @returns Multi-section feedback prompt string
1170
1022
  */
1171
- declare function buildFeedbackPrompt(
1172
- config: JobConfig,
1173
- feedback: PRFeedbackContext,
1174
- context?: RunContext[],
1175
- ): string;
1023
+ declare function buildFeedbackPrompt(config: JobConfig, feedback: PRFeedbackContext, context?: RunContext[]): string;
1176
1024
  /**
1177
1025
  * Build a work prompt enhanced with pre-triaged issue candidates.
1178
1026
  *
@@ -1185,11 +1033,7 @@ declare function buildFeedbackPrompt(
1185
1033
  * @param context - Optional array of prior run context
1186
1034
  * @returns Multi-section work prompt string
1187
1035
  */
1188
- declare function buildTriagedWorkPrompt(
1189
- config: JobConfig,
1190
- triaged: ScoredIssue[],
1191
- context?: RunContext[],
1192
- ): string;
1036
+ declare function buildTriagedWorkPrompt(config: JobConfig, triaged: ScoredIssue[], context?: RunContext[]): string;
1193
1037
 
1194
1038
  /**
1195
1039
  * Build the list of allowed tools for Claude based on job config guardrails.
@@ -1216,218 +1060,79 @@ declare function spawnClaude(options: SpawnOptions): Promise<SpawnResult>;
1216
1060
  declare function launchDashboard(): Promise<void>;
1217
1061
 
1218
1062
  declare class ConfigParseError extends Error {
1219
- readonly filePath: string;
1220
- readonly parseErrors: Array<{
1221
- message: string;
1222
- }>;
1223
- name: "ConfigParseError";
1224
- constructor(
1225
- filePath: string,
1226
- parseErrors: Array<{
1227
- message: string;
1228
- }>,
1229
- );
1063
+ readonly filePath: string;
1064
+ readonly parseErrors: Array<{
1065
+ message: string;
1066
+ }>;
1067
+ name: "ConfigParseError";
1068
+ constructor(filePath: string, parseErrors: Array<{
1069
+ message: string;
1070
+ }>);
1230
1071
  }
1231
1072
  declare class ConfigValidationError extends Error {
1232
- readonly filePath: string;
1233
- readonly validationMessage: string;
1234
- name: "ConfigValidationError";
1235
- constructor(filePath: string, validationMessage: string);
1073
+ readonly filePath: string;
1074
+ readonly validationMessage: string;
1075
+ name: "ConfigValidationError";
1076
+ constructor(filePath: string, validationMessage: string);
1236
1077
  }
1237
1078
  declare class SchedulerError extends Error {
1238
- readonly platform: string;
1239
- readonly cause?: Error | undefined;
1240
- name: "SchedulerError";
1241
- constructor(platform: string, message: string, cause?: Error | undefined);
1079
+ readonly platform: string;
1080
+ readonly cause?: Error | undefined;
1081
+ name: "SchedulerError";
1082
+ constructor(platform: string, message: string, cause?: Error | undefined);
1242
1083
  }
1243
1084
  declare class CronValidationError extends Error {
1244
- readonly expression: string;
1245
- name: "CronValidationError";
1246
- constructor(expression: string, message: string);
1085
+ readonly expression: string;
1086
+ name: "CronValidationError";
1087
+ constructor(expression: string, message: string);
1247
1088
  }
1248
1089
  declare class GitOpsError extends Error {
1249
- readonly operation: string;
1250
- readonly repoPath: string;
1251
- readonly cause?: Error | undefined;
1252
- name: "GitOpsError";
1253
- constructor(operation: string, repoPath: string, message: string, cause?: Error | undefined);
1090
+ readonly operation: string;
1091
+ readonly repoPath: string;
1092
+ readonly cause?: Error | undefined;
1093
+ name: "GitOpsError";
1094
+ constructor(operation: string, repoPath: string, message: string, cause?: Error | undefined);
1254
1095
  }
1255
1096
  declare class LockError extends Error {
1256
- readonly jobId: string;
1257
- name: "LockError";
1258
- constructor(jobId: string, message: string);
1097
+ readonly jobId: string;
1098
+ name: "LockError";
1099
+ constructor(jobId: string, message: string);
1259
1100
  }
1260
1101
  declare class SpawnError extends Error {
1261
- readonly exitCode?: number | undefined;
1262
- name: "SpawnError";
1263
- constructor(message: string, exitCode?: number | undefined);
1102
+ readonly exitCode?: number | undefined;
1103
+ name: "SpawnError";
1104
+ constructor(message: string, exitCode?: number | undefined);
1264
1105
  }
1265
1106
 
1266
1107
  interface ExecResult {
1267
- stdout: string;
1268
- stderr: string;
1108
+ stdout: string;
1109
+ stderr: string;
1269
1110
  }
1270
1111
  /**
1271
1112
  * Execute a command and return stdout/stderr.
1272
1113
  * Throws if the command exits with non-zero status.
1273
1114
  */
1274
- declare function execCommand(
1275
- command: string,
1276
- args: string[],
1277
- options?: {
1278
- stdin?: string;
1279
- cwd?: string;
1280
- },
1281
- ): Promise<ExecResult>;
1115
+ declare function execCommand(command: string, args: string[], options?: {
1116
+ stdin?: string;
1117
+ cwd?: string;
1118
+ }): Promise<ExecResult>;
1282
1119
 
1283
1120
  declare function writeFileSafe(filePath: string, content: string): Promise<void>;
1284
1121
 
1285
1122
  declare const paths: {
1286
- readonly base: string;
1287
- readonly jobs: string;
1288
- readonly jobDir: (jobId: string) => string;
1289
- readonly jobConfig: (jobId: string) => string;
1290
- readonly logs: string;
1291
- readonly jobLogs: (jobId: string) => string;
1292
- readonly jobLog: (jobId: string, runId: string) => string;
1293
- readonly jobLock: (jobId: string) => string;
1294
- readonly plistDir: string;
1295
- readonly plistPath: (jobId: string) => string;
1296
- readonly crontabLock: string;
1297
- readonly database: string;
1123
+ readonly base: string;
1124
+ readonly jobs: string;
1125
+ readonly jobDir: (jobId: string) => string;
1126
+ readonly jobConfig: (jobId: string) => string;
1127
+ readonly logs: string;
1128
+ readonly jobLogs: (jobId: string) => string;
1129
+ readonly jobLog: (jobId: string, runId: string) => string;
1130
+ readonly jobLock: (jobId: string) => string;
1131
+ readonly plistDir: string;
1132
+ readonly plistPath: (jobId: string) => string;
1133
+ readonly repoLock: (repoPath: string) => string;
1134
+ readonly crontabLock: string;
1135
+ readonly database: string;
1298
1136
  };
1299
1137
 
1300
- export {
1301
- type BudgetConfig,
1302
- COMMANDS,
1303
- type CalendarInterval,
1304
- type CliCommand,
1305
- type CommandHandler,
1306
- ConfigParseError,
1307
- ConfigValidationError,
1308
- type CostSummaryRow,
1309
- CronValidationError,
1310
- CrontabScheduler,
1311
- type DailyCostRow,
1312
- type EventTriggers,
1313
- GitOpsError,
1314
- type JobConfig,
1315
- JobConfigSchema,
1316
- LaunchdScheduler,
1317
- LockError,
1318
- type NotificationEvent,
1319
- type NotificationPayload,
1320
- type PRFeedbackContext,
1321
- type ParsedCommand,
1322
- type PipelineResult,
1323
- type PipelineStageResult,
1324
- type Platform,
1325
- type RebaseResult,
1326
- type RegisteredJob,
1327
- type ReviewThread,
1328
- type RunContext,
1329
- type RunLogEntry,
1330
- type RunResult,
1331
- type RunStatus,
1332
- STALE_THRESHOLD,
1333
- type ScheduleInfo,
1334
- type Scheduler,
1335
- SchedulerError,
1336
- SchtasksScheduler,
1337
- type ScoredIssue,
1338
- SpawnError,
1339
- type SpawnOptions,
1340
- type SpawnResult,
1341
- acquireLock,
1342
- attemptRebase,
1343
- buildAllowedTools,
1344
- buildFeedbackPrompt,
1345
- buildFixPrompt,
1346
- buildFixSystemPrompt,
1347
- buildImplementPrompt,
1348
- buildImplementSystemPrompt,
1349
- buildPayload,
1350
- buildPlanPrompt,
1351
- buildPlanSystemPrompt,
1352
- buildReadOnlyTools,
1353
- buildReviewPrompt,
1354
- buildReviewSystemPrompt,
1355
- buildSystemPrompt,
1356
- buildTriagedWorkPrompt,
1357
- buildWorkPrompt,
1358
- checkBudget,
1359
- checkDivergence,
1360
- checkPendingPRFeedback,
1361
- checkRepoCommand,
1362
- checkoutExistingBranch,
1363
- closeDatabase,
1364
- costCommand,
1365
- createBranch,
1366
- createCommand,
1367
- createJob,
1368
- createPR,
1369
- createScheduler,
1370
- cronToCalendarIntervals,
1371
- cronToSchtasks,
1372
- deleteJob,
1373
- describeSchedule,
1374
- detectPlatform,
1375
- editCommand,
1376
- execCommand,
1377
- executeRun,
1378
- extractIssueNumber,
1379
- formatContextWindow,
1380
- formatDiscord,
1381
- formatDuration,
1382
- formatRelativeTime,
1383
- formatSlack,
1384
- formatTable,
1385
- formatTelegram,
1386
- getCostSummary,
1387
- getDatabase,
1388
- getDiffFromBase,
1389
- getFeedbackRound,
1390
- getNextRuns,
1391
- getRepoOwnerName,
1392
- getUnresolvedThreads,
1393
- hasChanges,
1394
- launchDashboard,
1395
- listCommand,
1396
- listJobs,
1397
- listOpenPRsWithFeedback,
1398
- listRunLogs,
1399
- loadJobConfig,
1400
- loadRunContext,
1401
- logsCommand,
1402
- parseCommand,
1403
- parseReviewVerdict,
1404
- paths,
1405
- pauseCommand,
1406
- postIssueComment,
1407
- postPRComment,
1408
- pullLatest,
1409
- pushBranch,
1410
- readConfigDocument,
1411
- readJob,
1412
- readRunLog,
1413
- removeCommand,
1414
- reportCommand,
1415
- resumeCommand,
1416
- runCli,
1417
- runPipeline,
1418
- saveJobConfig,
1419
- saveRunContext,
1420
- sendNotifications,
1421
- shouldNotify,
1422
- spawnClaude,
1423
- statusBadge,
1424
- triageIssues,
1425
- updateConfigField,
1426
- updateJob,
1427
- validateAndDescribeSchedule,
1428
- validateConfig,
1429
- validateCronExpression,
1430
- writeConfigDocument,
1431
- writeFileSafe,
1432
- writeRunLog,
1433
- };
1138
+ export { type BudgetConfig, COMMANDS, type CalendarInterval, type CliCommand, type CommandHandler, ConfigParseError, ConfigValidationError, type CostSummaryRow, CronValidationError, CrontabScheduler, type DailyCostRow, type EventTriggers, GitOpsError, type JobConfig, JobConfigSchema, LaunchdScheduler, LockError, type NotificationEvent, type NotificationPayload, type PRFeedbackContext, type ParsedCommand, type PipelineResult, type PipelineStageResult, type Platform, type RebaseResult, type RegisteredJob, type ReviewThread, type RunContext, type RunLogEntry, type RunResult, type RunStatus, STALE_THRESHOLD, type ScheduleInfo, type Scheduler, SchedulerError, SchtasksScheduler, type ScoredIssue, SpawnError, type SpawnOptions, type SpawnResult, acquireLock, attemptRebase, buildAllowedTools, buildFeedbackPrompt, buildFixPrompt, buildFixSystemPrompt, buildImplementPrompt, buildImplementSystemPrompt, buildPayload, buildPlanPrompt, buildPlanSystemPrompt, buildReadOnlyTools, buildReviewPrompt, buildReviewSystemPrompt, buildSystemPrompt, buildTriagedWorkPrompt, buildWorkPrompt, checkBudget, checkDivergence, checkPendingPRFeedback, checkRepoCommand, checkoutExistingBranch, closeDatabase, costCommand, createBranch, createCommand, createJob, createPR, createScheduler, cronToCalendarIntervals, cronToSchtasks, deleteJob, describeSchedule, detectPlatform, editCommand, execCommand, executeRun, extractIssueNumber, formatContextWindow, formatDiscord, formatDuration, formatRelativeTime, formatSlack, formatTable, formatTelegram, getCostSummary, getDatabase, getDiffFromBase, getFeedbackRound, getNextRuns, getRepoOwnerName, getUnresolvedThreads, hasChanges, launchDashboard, listCommand, listJobs, listOpenPRsWithFeedback, listRunLogs, loadJobConfig, loadRunContext, logsCommand, parseCommand, parseReviewVerdict, paths, pauseCommand, postIssueComment, postPRComment, pullLatest, pushBranch, readConfigDocument, readJob, readRunLog, removeCommand, reportCommand, resumeCommand, runCli, runPipeline, saveJobConfig, saveRunContext, sendNotifications, shouldNotify, spawnClaude, statusBadge, triageIssues, updateConfigField, updateJob, validateAndDescribeSchedule, validateConfig, validateCronExpression, writeConfigDocument, writeFileSafe, writeRunLog };