@pourkit/cli 0.0.0-next-20260614002607 → 0.0.0-next-20260614074434

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.
@@ -0,0 +1 @@
1
+ e5c15c3c5cbfd1575de528fc18ec429caa36a9df9896868b21d7a66146f95b8f
@@ -0,0 +1,356 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://pourkit.ai/schema/pourkit.schema.json",
4
+ "x-pourkit-schema-version": 1,
5
+ "title": "Pourkit Configuration",
6
+ "description": "JSON Schema for Pourkit configuration at .pourkit/config.json",
7
+ "type": "object",
8
+ "required": ["$schema", "schemaVersion", "targets", "sandbox", "checks"],
9
+ "properties": {
10
+ "$schema": {
11
+ "type": "string",
12
+ "const": "./schema/pourkit.schema.json"
13
+ },
14
+ "schemaVersion": {
15
+ "type": "integer",
16
+ "const": 1
17
+ },
18
+ "targets": {
19
+ "type": "array",
20
+ "items": { "$ref": "#/$defs/target" },
21
+ "minItems": 1
22
+ },
23
+ "sandbox": { "$ref": "#/$defs/sandbox" },
24
+ "checks": { "$ref": "#/$defs/checks" },
25
+ "labels": { "$ref": "#/$defs/labels" },
26
+ "cleanup": { "$ref": "#/$defs/cleanup" },
27
+ "serena": { "$ref": "#/$defs/serena" }
28
+ },
29
+ "additionalProperties": false,
30
+ "$defs": {
31
+ "nonEmptyString": {
32
+ "type": "string",
33
+ "minLength": 1
34
+ },
35
+ "repoRelativePath": {
36
+ "type": "string",
37
+ "minLength": 1,
38
+ "pattern": "^(?!\\.\\./)(?!/).+"
39
+ },
40
+ "stageAgent": {
41
+ "type": "object",
42
+ "required": ["agent", "model", "promptTemplate"],
43
+ "properties": {
44
+ "agent": { "$ref": "#/$defs/nonEmptyString" },
45
+ "model": { "$ref": "#/$defs/nonEmptyString" },
46
+ "variant": { "$ref": "#/$defs/nonEmptyString" },
47
+ "env": {
48
+ "type": "object",
49
+ "additionalProperties": { "type": "string" }
50
+ },
51
+ "promptTemplate": { "$ref": "#/$defs/repoRelativePath" },
52
+ "outputRetries": { "$ref": "#/$defs/outputRetries" }
53
+ },
54
+ "additionalProperties": false
55
+ },
56
+ "outputRetries": {
57
+ "type": "object",
58
+ "properties": {
59
+ "missingOrEmpty": {
60
+ "type": "integer",
61
+ "minimum": 0
62
+ }
63
+ },
64
+ "additionalProperties": false
65
+ },
66
+ "verificationCommand": {
67
+ "type": "object",
68
+ "required": ["command"],
69
+ "properties": {
70
+ "command": { "$ref": "#/$defs/nonEmptyString" },
71
+ "label": { "type": "string" }
72
+ },
73
+ "additionalProperties": false
74
+ },
75
+ "reviewer": {
76
+ "type": "object",
77
+ "required": ["agent", "model", "promptTemplate", "criteria"],
78
+ "properties": {
79
+ "agent": { "$ref": "#/$defs/nonEmptyString" },
80
+ "model": { "$ref": "#/$defs/nonEmptyString" },
81
+ "variant": { "$ref": "#/$defs/nonEmptyString" },
82
+ "env": {
83
+ "type": "object",
84
+ "additionalProperties": { "type": "string" }
85
+ },
86
+ "promptTemplate": { "$ref": "#/$defs/repoRelativePath" },
87
+ "outputRetries": { "$ref": "#/$defs/outputRetries" },
88
+ "criteria": {
89
+ "type": "array",
90
+ "items": { "$ref": "#/$defs/nonEmptyString" }
91
+ },
92
+ "includeReviewHistory": { "type": "boolean" },
93
+ "passWithNotesRefactorAttempts": {
94
+ "type": "integer",
95
+ "minimum": 0
96
+ }
97
+ },
98
+ "additionalProperties": false
99
+ },
100
+ "failureResolution": {
101
+ "type": "object",
102
+ "required": ["agent", "model", "promptTemplate", "maxAttemptsPerFailure"],
103
+ "properties": {
104
+ "agent": { "$ref": "#/$defs/nonEmptyString" },
105
+ "model": { "$ref": "#/$defs/nonEmptyString" },
106
+ "variant": { "$ref": "#/$defs/nonEmptyString" },
107
+ "env": {
108
+ "type": "object",
109
+ "additionalProperties": { "type": "string" }
110
+ },
111
+ "promptTemplate": { "$ref": "#/$defs/repoRelativePath" },
112
+ "outputRetries": { "$ref": "#/$defs/outputRetries" },
113
+ "maxAttemptsPerFailure": { "type": "integer", "minimum": 1 },
114
+ "failureLimits": {
115
+ "type": "object",
116
+ "additionalProperties": {
117
+ "type": "integer",
118
+ "minimum": 1
119
+ }
120
+ }
121
+ },
122
+ "additionalProperties": false
123
+ },
124
+ "sandboxMount": {
125
+ "type": "object",
126
+ "required": ["hostPath", "sandboxPath"],
127
+ "properties": {
128
+ "hostPath": { "type": "string", "minLength": 1 },
129
+ "sandboxPath": { "type": "string", "minLength": 1 },
130
+ "readonly": { "type": "boolean" }
131
+ },
132
+ "additionalProperties": false
133
+ },
134
+ "reviewRefactorLoopStrategy": {
135
+ "type": "object",
136
+ "required": [
137
+ "type",
138
+ "implement",
139
+ "failureResolution",
140
+ "review",
141
+ "issueFinalReview",
142
+ "finalize"
143
+ ],
144
+ "properties": {
145
+ "type": { "const": "review-refactor-loop" },
146
+ "implement": {
147
+ "type": "object",
148
+ "required": ["builder"],
149
+ "properties": {
150
+ "builder": { "$ref": "#/$defs/stageAgent" }
151
+ },
152
+ "additionalProperties": false
153
+ },
154
+ "failureResolution": { "$ref": "#/$defs/failureResolution" },
155
+ "review": {
156
+ "type": "object",
157
+ "required": ["reviewer", "refactor", "maxIterations"],
158
+ "properties": {
159
+ "reviewer": { "$ref": "#/$defs/reviewer" },
160
+ "refactor": { "$ref": "#/$defs/stageAgent" },
161
+ "maxIterations": { "type": "integer", "minimum": 1 },
162
+ "passWithNotesRefactorAttempts": {
163
+ "type": "integer",
164
+ "minimum": 0
165
+ }
166
+ },
167
+ "additionalProperties": false
168
+ },
169
+ "verify": {
170
+ "type": "object",
171
+ "required": ["commands"],
172
+ "properties": {
173
+ "commands": {
174
+ "type": "array",
175
+ "items": { "$ref": "#/$defs/verificationCommand" },
176
+ "minItems": 1
177
+ }
178
+ },
179
+ "additionalProperties": false
180
+ },
181
+ "issueFinalReview": {
182
+ "type": "object",
183
+ "required": ["agent", "model", "promptTemplate", "maxAttempts"],
184
+ "properties": {
185
+ "agent": { "$ref": "#/$defs/nonEmptyString" },
186
+ "model": { "$ref": "#/$defs/nonEmptyString" },
187
+ "variant": { "$ref": "#/$defs/nonEmptyString" },
188
+ "env": {
189
+ "type": "object",
190
+ "additionalProperties": { "type": "string" }
191
+ },
192
+ "promptTemplate": { "$ref": "#/$defs/repoRelativePath" },
193
+ "outputRetries": { "$ref": "#/$defs/outputRetries" },
194
+ "maxAttempts": { "type": "integer", "minimum": 1 }
195
+ },
196
+ "additionalProperties": false
197
+ },
198
+ "finalize": {
199
+ "type": "object",
200
+ "required": ["prDescriptionAgent", "maxAttempts"],
201
+ "properties": {
202
+ "prDescriptionAgent": { "$ref": "#/$defs/stageAgent" },
203
+ "maxAttempts": { "type": "integer", "minimum": 1 }
204
+ },
205
+ "additionalProperties": false
206
+ }
207
+ },
208
+ "additionalProperties": false
209
+ },
210
+ "target": {
211
+ "type": "object",
212
+ "required": ["name", "baseBranch", "strategy"],
213
+ "properties": {
214
+ "name": { "$ref": "#/$defs/nonEmptyString" },
215
+ "baseBranch": { "type": "string", "minLength": 1 },
216
+ "branchTemplate": { "type": "string" },
217
+ "setupCommands": {
218
+ "type": "array",
219
+ "items": { "$ref": "#/$defs/verificationCommand" }
220
+ },
221
+ "autoMerge": { "type": "boolean" },
222
+ "queue": {
223
+ "type": "object",
224
+ "properties": {
225
+ "loop": { "type": "boolean" }
226
+ },
227
+ "additionalProperties": false
228
+ },
229
+ "serena": {
230
+ "type": "object",
231
+ "properties": {
232
+ "enabled": { "type": "boolean" },
233
+ "required": { "type": "boolean" }
234
+ },
235
+ "additionalProperties": false
236
+ },
237
+ "prdRun": {
238
+ "type": "object",
239
+ "properties": {
240
+ "mode": { "type": "string", "enum": ["github", "local"] }
241
+ },
242
+ "additionalProperties": false
243
+ },
244
+ "strategy": { "$ref": "#/$defs/reviewRefactorLoopStrategy" }
245
+ },
246
+ "additionalProperties": false
247
+ },
248
+ "labels": {
249
+ "type": "object",
250
+ "required": [
251
+ "readyForAgent",
252
+ "agentInProgress",
253
+ "blocked",
254
+ "prOpenAwaitingMerge",
255
+ "readyForHuman"
256
+ ],
257
+ "properties": {
258
+ "readyForAgent": { "$ref": "#/$defs/nonEmptyString" },
259
+ "agentInProgress": { "$ref": "#/$defs/nonEmptyString" },
260
+ "blocked": { "$ref": "#/$defs/nonEmptyString" },
261
+ "prOpenAwaitingMerge": { "$ref": "#/$defs/nonEmptyString" },
262
+ "readyForHuman": { "$ref": "#/$defs/nonEmptyString" },
263
+ "needsTriage": { "$ref": "#/$defs/nonEmptyString" }
264
+ },
265
+ "additionalProperties": false
266
+ },
267
+ "sandbox": {
268
+ "type": "object",
269
+ "required": ["provider"],
270
+ "properties": {
271
+ "provider": {
272
+ "type": "string",
273
+ "enum": ["docker"]
274
+ },
275
+ "copyToWorktree": {
276
+ "type": "array",
277
+ "items": { "$ref": "#/$defs/repoRelativePath" }
278
+ },
279
+ "mounts": {
280
+ "type": "array",
281
+ "items": { "$ref": "#/$defs/sandboxMount" }
282
+ },
283
+ "env": {
284
+ "type": "object",
285
+ "additionalProperties": { "type": "string" }
286
+ },
287
+ "idleTimeoutSeconds": {
288
+ "type": "integer",
289
+ "minimum": 1
290
+ },
291
+ "forceRebuild": {
292
+ "type": "boolean"
293
+ }
294
+ },
295
+ "additionalProperties": false
296
+ },
297
+ "checks": {
298
+ "type": "object",
299
+ "required": ["requiredLabels", "allowedAuthors"],
300
+ "properties": {
301
+ "requiredLabels": {
302
+ "type": "array",
303
+ "items": { "$ref": "#/$defs/nonEmptyString" }
304
+ },
305
+ "allowedAuthors": {
306
+ "type": "array",
307
+ "items": { "$ref": "#/$defs/nonEmptyString" }
308
+ },
309
+ "checksFoundTimeoutSeconds": {
310
+ "type": "integer",
311
+ "minimum": 1
312
+ },
313
+ "checksCompletionTimeoutSeconds": {
314
+ "type": "integer",
315
+ "minimum": 1
316
+ },
317
+ "pollIntervalSeconds": {
318
+ "type": "integer",
319
+ "minimum": 1
320
+ },
321
+ "issueListLimit": {
322
+ "type": "integer",
323
+ "minimum": 1
324
+ }
325
+ },
326
+ "additionalProperties": false
327
+ },
328
+ "cleanup": {
329
+ "type": "object",
330
+ "properties": {
331
+ "enabled": { "type": "boolean" },
332
+ "worktreeRetentionDays": {
333
+ "type": "integer",
334
+ "minimum": 1
335
+ },
336
+ "logRetentionDays": {
337
+ "type": "integer",
338
+ "minimum": 1
339
+ }
340
+ },
341
+ "additionalProperties": false
342
+ },
343
+ "serena": {
344
+ "type": "object",
345
+ "properties": {
346
+ "enabled": { "type": "boolean" },
347
+ "required": { "type": "boolean" },
348
+ "mcpUrl": { "$ref": "#/$defs/nonEmptyString" },
349
+ "sandboxMcpUrl": { "$ref": "#/$defs/nonEmptyString" },
350
+ "dataDir": { "type": "string" },
351
+ "autoStart": { "type": "boolean" }
352
+ },
353
+ "additionalProperties": false
354
+ }
355
+ }
356
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pourkit/cli",
3
- "version": "0.0.0-next-20260614002607",
3
+ "version": "0.0.0-next-20260614074434",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "repository": {
@@ -19,7 +19,10 @@
19
19
  "scripts": {
20
20
  "build": "tsup --config tsup.config.ts",
21
21
  "postbuild": "chmod +x dist/cli.js dist/e2e/run-live-e2e.js dist/issues/unblock.js dist/issues/close-issues-on-merge.js",
22
- "typecheck": "tsc -p tsconfig.json --noEmit --pretty false"
22
+ "typecheck": "tsc -p tsconfig.json --noEmit --pretty false",
23
+ "config:types": "tsx scripts/config-schema.ts types",
24
+ "config:schema:hash": "tsx scripts/config-schema.ts hash",
25
+ "config:schema:check": "tsx scripts/config-schema.ts check"
23
26
  },
24
27
  "devDependencies": {
25
28
  "@pourkit/logger": "*"
@@ -27,9 +30,9 @@
27
30
  "dependencies": {
28
31
  "@ai-hero/sandcastle": "0.6.3",
29
32
  "@clack/prompts": "^0.10.1",
33
+ "ajv": "^8.20.0",
30
34
  "commander": "^14.0.3",
31
35
  "effect": "^3.21.2",
32
- "esbuild": "^0.28.0",
33
36
  "octokit": "^5.0.5",
34
37
  "zod": "^3.24.5"
35
38
  }