@haystackeditor/cli 0.15.31 → 0.17.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 (136) hide show
  1. package/README.md +141 -61
  2. package/dist/assets/hooks/scripts/commit-msg.sh +3 -0
  3. package/dist/assets/hooks/scripts/post-commit.sh +3 -0
  4. package/dist/assets/hooks/scripts/pre-commit.sh +11 -6
  5. package/dist/assets/hooks/scripts/pre-push.sh +3 -0
  6. package/dist/assets/hooks/scripts/prepare-commit-msg.sh +3 -0
  7. package/dist/commands/case-batch-contract.js +694 -0
  8. package/dist/commands/case-batch.js +1011 -0
  9. package/dist/commands/cloud-verifier-identity-census.js +5 -2
  10. package/dist/commands/combination-search-hook.js +139 -0
  11. package/dist/commands/dismiss.js +2 -1
  12. package/dist/commands/hooks.js +66 -7
  13. package/dist/commands/install-session-hooks.js +131 -44
  14. package/dist/commands/policy.js +32 -45
  15. package/dist/commands/precompute-delivery.js +6 -1
  16. package/dist/commands/scaffold-provisional-universe.js +8 -10
  17. package/dist/commands/setup.js +32 -10
  18. package/dist/commands/submit.js +39 -71
  19. package/dist/commands/telemetry.js +17 -2
  20. package/dist/commands/triage.js +2 -1
  21. package/dist/commands/verify-explore.js +1 -0
  22. package/dist/commands/verify-hosted-mcp.js +3 -12
  23. package/dist/commands/verify-hosted-reproducibility.js +49 -547
  24. package/dist/commands/verify-hosted.js +66 -168
  25. package/dist/commands/verify-precompute.js +64 -11
  26. package/dist/commands/verify.js +51 -139
  27. package/dist/index.js +290 -366
  28. package/dist/lazy.js +8 -0
  29. package/dist/schema.js +2 -1
  30. package/dist/tools/detect.js +3 -24
  31. package/dist/triage/astra.js +199 -0
  32. package/dist/triage/prompts.js +145 -179
  33. package/dist/triage/runner.js +104 -300
  34. package/dist/triage/types.js +2 -2
  35. package/dist/types.js +2 -6
  36. package/dist/utils/auth.js +14 -2
  37. package/dist/utils/git.js +60 -29
  38. package/dist/utils/github-api.js +14 -1
  39. package/dist/utils/haystack-api.js +38 -7
  40. package/dist/utils/hooks.js +43 -6
  41. package/dist/utils/prompter.js +25 -10
  42. package/dist/utils/safe-write.js +31 -0
  43. package/dist/utils/secret-paths.js +115 -0
  44. package/dist/utils/secrets.js +0 -1
  45. package/dist/utils/telemetry.js +34 -14
  46. package/dist/utils/update-check.js +151 -0
  47. package/package.json +19 -14
  48. package/schemas/case-batch.v1.json +235 -0
  49. package/schemas/cloud-verifier.v1.json +55 -100
  50. package/schemas/submit.v1.json +4 -2
  51. package/dist/commands/ask.d.ts +0 -14
  52. package/dist/commands/cloud-verifier-behaviors.d.ts +0 -27
  53. package/dist/commands/cloud-verifier-data-store-census.d.ts +0 -47
  54. package/dist/commands/cloud-verifier-data-store-drift.d.ts +0 -42
  55. package/dist/commands/cloud-verifier-identity-census.d.ts +0 -88
  56. package/dist/commands/cloud-verifier-materialization.d.ts +0 -16
  57. package/dist/commands/cloud-verifier-pascal-selector-census.d.ts +0 -29
  58. package/dist/commands/cloud-verifier-python-manifest-selector-census.d.ts +0 -27
  59. package/dist/commands/cloud-verifier-specialized-operational-census.d.ts +0 -51
  60. package/dist/commands/cloud-verifier-universe.d.ts +0 -31
  61. package/dist/commands/config.d.ts +0 -46
  62. package/dist/commands/design-verify.d.ts +0 -33
  63. package/dist/commands/dismiss.d.ts +0 -29
  64. package/dist/commands/hooks.d.ts +0 -13
  65. package/dist/commands/inbox.d.ts +0 -65
  66. package/dist/commands/init.d.ts +0 -10
  67. package/dist/commands/install-session-hooks.d.ts +0 -17
  68. package/dist/commands/login.d.ts +0 -8
  69. package/dist/commands/mcp.d.ts +0 -1
  70. package/dist/commands/policy.d.ts +0 -31
  71. package/dist/commands/pr-status.d.ts +0 -144
  72. package/dist/commands/pr.d.ts +0 -40
  73. package/dist/commands/precompute-delivery-contract.d.ts +0 -68
  74. package/dist/commands/precompute-delivery.d.ts +0 -20
  75. package/dist/commands/prepare-universe-review.d.ts +0 -115
  76. package/dist/commands/production-source-deny-policy.d.ts +0 -15
  77. package/dist/commands/request-review.d.ts +0 -26
  78. package/dist/commands/review.d.ts +0 -25
  79. package/dist/commands/rules.d.ts +0 -4
  80. package/dist/commands/scaffold-provisional-universe.d.ts +0 -468
  81. package/dist/commands/schema-cmd.d.ts +0 -2
  82. package/dist/commands/setup.d.ts +0 -28
  83. package/dist/commands/skills.d.ts +0 -8
  84. package/dist/commands/status.d.ts +0 -4
  85. package/dist/commands/submit.d.ts +0 -30
  86. package/dist/commands/system-map.d.ts +0 -42
  87. package/dist/commands/telemetry.d.ts +0 -53
  88. package/dist/commands/tokens.d.ts +0 -14
  89. package/dist/commands/triage.d.ts +0 -35
  90. package/dist/commands/verify-core.d.ts +0 -449
  91. package/dist/commands/verify-core.js +0 -789
  92. package/dist/commands/verify-explore.d.ts +0 -14
  93. package/dist/commands/verify-history.d.ts +0 -14
  94. package/dist/commands/verify-hosted-mcp.d.ts +0 -12
  95. package/dist/commands/verify-hosted-reproducibility.d.ts +0 -90
  96. package/dist/commands/verify-hosted.d.ts +0 -92
  97. package/dist/commands/verify-mcp.d.ts +0 -8
  98. package/dist/commands/verify-mcp.js +0 -517
  99. package/dist/commands/verify-ops.d.ts +0 -158
  100. package/dist/commands/verify-ops.js +0 -1148
  101. package/dist/commands/verify-precompute.d.ts +0 -30
  102. package/dist/commands/verify-reproducibility.d.ts +0 -85
  103. package/dist/commands/verify-reproducibility.js +0 -494
  104. package/dist/commands/verify-reseal.d.ts +0 -9
  105. package/dist/commands/verify-reseal.js +0 -148
  106. package/dist/commands/verify-sandboxes.d.ts +0 -95
  107. package/dist/commands/verify-sandboxes.js +0 -352
  108. package/dist/commands/verify.d.ts +0 -28
  109. package/dist/commands/webhooks.d.ts +0 -30
  110. package/dist/index.d.ts +0 -22
  111. package/dist/schema.d.ts +0 -28
  112. package/dist/states.d.ts +0 -29
  113. package/dist/tools/detect.d.ts +0 -50
  114. package/dist/triage/prompts.d.ts +0 -24
  115. package/dist/triage/runner.d.ts +0 -34
  116. package/dist/triage/types.d.ts +0 -42
  117. package/dist/types/verify-history.d.ts +0 -38
  118. package/dist/types.d.ts +0 -1684
  119. package/dist/utils/action-output.d.ts +0 -24
  120. package/dist/utils/analysis-api.d.ts +0 -187
  121. package/dist/utils/auth.d.ts +0 -79
  122. package/dist/utils/config.d.ts +0 -24
  123. package/dist/utils/design-verifier-api.d.ts +0 -208
  124. package/dist/utils/design-verifier-history.d.ts +0 -46
  125. package/dist/utils/design-verifier-result.d.ts +0 -74
  126. package/dist/utils/detect.d.ts +0 -43
  127. package/dist/utils/git.d.ts +0 -135
  128. package/dist/utils/github-api.d.ts +0 -104
  129. package/dist/utils/haystack-api.d.ts +0 -37
  130. package/dist/utils/hooks.d.ts +0 -12
  131. package/dist/utils/pending-state.d.ts +0 -40
  132. package/dist/utils/pr-ref.d.ts +0 -27
  133. package/dist/utils/prompter.d.ts +0 -85
  134. package/dist/utils/secrets.d.ts +0 -47
  135. package/dist/utils/telemetry.d.ts +0 -19
  136. /package/dist/commands/{precompute-delivery-worker.d.ts → combination-search-hook-contract.js} +0 -0
package/dist/types.d.ts DELETED
@@ -1,1684 +0,0 @@
1
- /**
2
- * Haystack CLI Types
3
- *
4
- * Zod schemas for .haystack.json configuration + CLI-only types.
5
- * Zod schemas for .haystack.json configuration.
6
- */
7
- import { z } from 'zod';
8
- declare const VerificationCommandSchema: z.ZodObject<{
9
- /** Human-readable name (e.g., "Build", "Lint", "Typecheck") */
10
- name: z.ZodString;
11
- /** The shell command to run (e.g., "pnpm build", "pnpm lint") */
12
- run: z.ZodString;
13
- }, "strip", z.ZodTypeAny, {
14
- name: string;
15
- run: string;
16
- }, {
17
- name: string;
18
- run: string;
19
- }>;
20
- declare const FixtureEntrySchema: z.ZodObject<{
21
- /** Where to load fixture data from */
22
- source: z.ZodEffects<z.ZodString, string, string>;
23
- /** Headers to include when fetching from remote source */
24
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
25
- /** Cookies to include when fetching from remote source */
26
- cookies: z.ZodOptional<z.ZodString>;
27
- }, "strip", z.ZodTypeAny, {
28
- source: string;
29
- headers?: Record<string, string> | undefined;
30
- cookies?: string | undefined;
31
- }, {
32
- source: string;
33
- headers?: Record<string, string> | undefined;
34
- cookies?: string | undefined;
35
- }>;
36
- declare const DevServerSchema: z.ZodObject<{
37
- /** Command to start dev server (e.g., "pnpm dev") */
38
- command: z.ZodString;
39
- /** Port the dev server runs on */
40
- port: z.ZodNumber;
41
- /** Pattern in stdout that indicates server is ready (e.g., "Local:") */
42
- ready_pattern: z.ZodOptional<z.ZodString>;
43
- /** Environment variables to set when starting the server */
44
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
45
- }, "strip", z.ZodTypeAny, {
46
- command: string;
47
- port: number;
48
- ready_pattern?: string | undefined;
49
- env?: Record<string, string> | undefined;
50
- }, {
51
- command: string;
52
- port: number;
53
- ready_pattern?: string | undefined;
54
- env?: Record<string, string> | undefined;
55
- }>;
56
- /** Valid AI reviewer source identifiers that the merge queue can wait for */
57
- export declare const AI_REVIEWER_SOURCES: readonly ["cursor", "coderabbit", "copilot", "greptile", "sourcery", "qodo", "codeant", "ellipsis", "korbit", "panto", "bito", "graphite", "deepsource", "snyk", "codacy", "sonarcloud", "sweep", "codeguru", "codereviewer", "codium"];
58
- export declare const AI_REVIEWER_DISPLAY_NAMES: Record<typeof AI_REVIEWER_SOURCES[number], string>;
59
- /** Maps friendly source names to exact GitHub bot login usernames. */
60
- export declare const AI_REVIEWER_BOT_USERNAMES: Record<typeof AI_REVIEWER_SOURCES[number], string>;
61
- declare const MergeQueueConfigSchema: z.ZodObject<{
62
- /** Enable the Haystack auto-merge queue */
63
- merge_queue: z.ZodOptional<z.ZodBoolean>;
64
- /** Automatically rebase PRs that develop merge conflicts after pushes to the base branch */
65
- auto_resolve_conflicts: z.ZodOptional<z.ZodBoolean>;
66
- /** Dispatch the Haystack agent to fix failing CI checks. Defaults to true; set
67
- * false to escalate CI failures to the PR author instead of attempting a fix. */
68
- auto_fix_ci_failures: z.ZodOptional<z.ZodBoolean>;
69
- /** Grace period configuration before auto-merging */
70
- merge_debounce: z.ZodOptional<z.ZodObject<{
71
- /** Default wait time in minutes before auto-merging */
72
- default_minutes: z.ZodOptional<z.ZodNumber>;
73
- /** Per-author wait time overrides (author login → minutes) */
74
- authors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
75
- }, "strip", z.ZodTypeAny, {
76
- default_minutes?: number | undefined;
77
- authors?: Record<string, number> | undefined;
78
- }, {
79
- default_minutes?: number | undefined;
80
- authors?: Record<string, number> | undefined;
81
- }>>;
82
- /** Batch multiple PRs into one CI run */
83
- batch_merge: z.ZodOptional<z.ZodObject<{
84
- /** Enable batch merging */
85
- enabled: z.ZodOptional<z.ZodBoolean>;
86
- /** Minimum PRs to form a batch */
87
- min_batch_size: z.ZodOptional<z.ZodNumber>;
88
- /** Maximum PRs per batch (cap: 20) */
89
- max_batch_size: z.ZodOptional<z.ZodNumber>;
90
- /** Seconds to wait after grace period for more PRs to accumulate (default: 30, 0 to disable) */
91
- batch_window_seconds: z.ZodOptional<z.ZodNumber>;
92
- }, "strip", z.ZodTypeAny, {
93
- enabled?: boolean | undefined;
94
- min_batch_size?: number | undefined;
95
- max_batch_size?: number | undefined;
96
- batch_window_seconds?: number | undefined;
97
- }, {
98
- enabled?: boolean | undefined;
99
- min_batch_size?: number | undefined;
100
- max_batch_size?: number | undefined;
101
- batch_window_seconds?: number | undefined;
102
- }>>;
103
- /** Wait for external AI code reviewers before merging — all bots must post */
104
- wait_for_reviewer: z.ZodOptional<z.ZodObject<{
105
- /** GitHub bot usernames to wait for (e.g. "cursor-bugbot[bot]") */
106
- bots: z.ZodArray<z.ZodString, "many">;
107
- /** Give up waiting after this many minutes (default: 30) */
108
- timeout_minutes: z.ZodOptional<z.ZodNumber>;
109
- }, "strip", z.ZodTypeAny, {
110
- bots: string[];
111
- timeout_minutes?: number | undefined;
112
- }, {
113
- bots: string[];
114
- timeout_minutes?: number | undefined;
115
- }>>;
116
- }, "strip", z.ZodTypeAny, {
117
- merge_queue?: boolean | undefined;
118
- auto_resolve_conflicts?: boolean | undefined;
119
- auto_fix_ci_failures?: boolean | undefined;
120
- merge_debounce?: {
121
- default_minutes?: number | undefined;
122
- authors?: Record<string, number> | undefined;
123
- } | undefined;
124
- batch_merge?: {
125
- enabled?: boolean | undefined;
126
- min_batch_size?: number | undefined;
127
- max_batch_size?: number | undefined;
128
- batch_window_seconds?: number | undefined;
129
- } | undefined;
130
- wait_for_reviewer?: {
131
- bots: string[];
132
- timeout_minutes?: number | undefined;
133
- } | undefined;
134
- }, {
135
- merge_queue?: boolean | undefined;
136
- auto_resolve_conflicts?: boolean | undefined;
137
- auto_fix_ci_failures?: boolean | undefined;
138
- merge_debounce?: {
139
- default_minutes?: number | undefined;
140
- authors?: Record<string, number> | undefined;
141
- } | undefined;
142
- batch_merge?: {
143
- enabled?: boolean | undefined;
144
- min_batch_size?: number | undefined;
145
- max_batch_size?: number | undefined;
146
- batch_window_seconds?: number | undefined;
147
- } | undefined;
148
- wait_for_reviewer?: {
149
- bots: string[];
150
- timeout_minutes?: number | undefined;
151
- } | undefined;
152
- }>;
153
- declare const ServiceSchema: z.ZodObject<{
154
- /** Root directory relative to repo root */
155
- root: z.ZodOptional<z.ZodString>;
156
- /** Command to start the service */
157
- command: z.ZodString;
158
- /** Port the service runs on (not required for batch jobs) */
159
- port: z.ZodOptional<z.ZodNumber>;
160
- /** Pattern in stdout that indicates service is ready */
161
- ready_pattern: z.ZodOptional<z.ZodString>;
162
- /** Environment variables to set */
163
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
164
- /** Service type: 'server' (default) or 'batch' (run once, no port) */
165
- type: z.ZodOptional<z.ZodEnum<["server", "batch"]>>;
166
- /** Services that must be started before this service */
167
- depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
168
- }, "strip", z.ZodTypeAny, {
169
- command: string;
170
- type?: "server" | "batch" | undefined;
171
- port?: number | undefined;
172
- ready_pattern?: string | undefined;
173
- env?: Record<string, string> | undefined;
174
- root?: string | undefined;
175
- depends_on?: string[] | undefined;
176
- }, {
177
- command: string;
178
- type?: "server" | "batch" | undefined;
179
- port?: number | undefined;
180
- ready_pattern?: string | undefined;
181
- env?: Record<string, string> | undefined;
182
- root?: string | undefined;
183
- depends_on?: string[] | undefined;
184
- }>;
185
- declare const VerificationSchema: z.ZodObject<{
186
- /** Commands to run for verification (build, lint, test, etc.) */
187
- commands: z.ZodOptional<z.ZodArray<z.ZodObject<{
188
- /** Human-readable name (e.g., "Build", "Lint", "Typecheck") */
189
- name: z.ZodString;
190
- /** The shell command to run (e.g., "pnpm build", "pnpm lint") */
191
- run: z.ZodString;
192
- }, "strip", z.ZodTypeAny, {
193
- name: string;
194
- run: string;
195
- }, {
196
- name: string;
197
- run: string;
198
- }>, "many">>;
199
- /** Fixture data sources keyed by endpoint pattern */
200
- fixtures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
201
- /** Where to load fixture data from */
202
- source: z.ZodEffects<z.ZodString, string, string>;
203
- /** Headers to include when fetching from remote source */
204
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
205
- /** Cookies to include when fetching from remote source */
206
- cookies: z.ZodOptional<z.ZodString>;
207
- }, "strip", z.ZodTypeAny, {
208
- source: string;
209
- headers?: Record<string, string> | undefined;
210
- cookies?: string | undefined;
211
- }, {
212
- source: string;
213
- headers?: Record<string, string> | undefined;
214
- cookies?: string | undefined;
215
- }>>>;
216
- }, "strip", z.ZodTypeAny, {
217
- commands?: {
218
- name: string;
219
- run: string;
220
- }[] | undefined;
221
- fixtures?: Record<string, {
222
- source: string;
223
- headers?: Record<string, string> | undefined;
224
- cookies?: string | undefined;
225
- }> | undefined;
226
- }, {
227
- commands?: {
228
- name: string;
229
- run: string;
230
- }[] | undefined;
231
- fixtures?: Record<string, {
232
- source: string;
233
- headers?: Record<string, string> | undefined;
234
- cookies?: string | undefined;
235
- }> | undefined;
236
- }>;
237
- declare const AuthStrategySchema: z.ZodEnum<["bypass", "fixture", "token", "test_account"]>;
238
- declare const TokenInjectionSchema: z.ZodObject<{
239
- type: z.ZodEnum<["cookie", "localStorage", "sessionStorage", "header"]>;
240
- name: z.ZodString;
241
- secret: z.ZodString;
242
- cookie_options: z.ZodOptional<z.ZodObject<{
243
- path: z.ZodOptional<z.ZodString>;
244
- domain: z.ZodOptional<z.ZodString>;
245
- secure: z.ZodOptional<z.ZodBoolean>;
246
- httpOnly: z.ZodOptional<z.ZodBoolean>;
247
- sameSite: z.ZodOptional<z.ZodEnum<["Strict", "Lax", "None"]>>;
248
- }, "strip", z.ZodTypeAny, {
249
- path?: string | undefined;
250
- domain?: string | undefined;
251
- secure?: boolean | undefined;
252
- httpOnly?: boolean | undefined;
253
- sameSite?: "Strict" | "Lax" | "None" | undefined;
254
- }, {
255
- path?: string | undefined;
256
- domain?: string | undefined;
257
- secure?: boolean | undefined;
258
- httpOnly?: boolean | undefined;
259
- sameSite?: "Strict" | "Lax" | "None" | undefined;
260
- }>>;
261
- }, "strip", z.ZodTypeAny, {
262
- name: string;
263
- type: "cookie" | "localStorage" | "sessionStorage" | "header";
264
- secret: string;
265
- cookie_options?: {
266
- path?: string | undefined;
267
- domain?: string | undefined;
268
- secure?: boolean | undefined;
269
- httpOnly?: boolean | undefined;
270
- sameSite?: "Strict" | "Lax" | "None" | undefined;
271
- } | undefined;
272
- }, {
273
- name: string;
274
- type: "cookie" | "localStorage" | "sessionStorage" | "header";
275
- secret: string;
276
- cookie_options?: {
277
- path?: string | undefined;
278
- domain?: string | undefined;
279
- secure?: boolean | undefined;
280
- httpOnly?: boolean | undefined;
281
- sameSite?: "Strict" | "Lax" | "None" | undefined;
282
- } | undefined;
283
- }>;
284
- declare const LoginStepSchema: z.ZodObject<{
285
- action: z.ZodEnum<["navigate", "type", "click", "wait", "submit"]>;
286
- url: z.ZodOptional<z.ZodString>;
287
- selector: z.ZodOptional<z.ZodString>;
288
- value: z.ZodOptional<z.ZodString>;
289
- timeout: z.ZodOptional<z.ZodNumber>;
290
- }, "strip", z.ZodTypeAny, {
291
- action: "type" | "navigate" | "click" | "wait" | "submit";
292
- value?: string | undefined;
293
- url?: string | undefined;
294
- selector?: string | undefined;
295
- timeout?: number | undefined;
296
- }, {
297
- action: "type" | "navigate" | "click" | "wait" | "submit";
298
- value?: string | undefined;
299
- url?: string | undefined;
300
- selector?: string | undefined;
301
- timeout?: number | undefined;
302
- }>;
303
- declare const TestAccountSchema: z.ZodObject<{
304
- credentials_secret: z.ZodString;
305
- login_flow: z.ZodArray<z.ZodObject<{
306
- action: z.ZodEnum<["navigate", "type", "click", "wait", "submit"]>;
307
- url: z.ZodOptional<z.ZodString>;
308
- selector: z.ZodOptional<z.ZodString>;
309
- value: z.ZodOptional<z.ZodString>;
310
- timeout: z.ZodOptional<z.ZodNumber>;
311
- }, "strip", z.ZodTypeAny, {
312
- action: "type" | "navigate" | "click" | "wait" | "submit";
313
- value?: string | undefined;
314
- url?: string | undefined;
315
- selector?: string | undefined;
316
- timeout?: number | undefined;
317
- }, {
318
- action: "type" | "navigate" | "click" | "wait" | "submit";
319
- value?: string | undefined;
320
- url?: string | undefined;
321
- selector?: string | undefined;
322
- timeout?: number | undefined;
323
- }>, "many">;
324
- success_selector: z.ZodOptional<z.ZodString>;
325
- failure_selector: z.ZodOptional<z.ZodString>;
326
- }, "strip", z.ZodTypeAny, {
327
- credentials_secret: string;
328
- login_flow: {
329
- action: "type" | "navigate" | "click" | "wait" | "submit";
330
- value?: string | undefined;
331
- url?: string | undefined;
332
- selector?: string | undefined;
333
- timeout?: number | undefined;
334
- }[];
335
- success_selector?: string | undefined;
336
- failure_selector?: string | undefined;
337
- }, {
338
- credentials_secret: string;
339
- login_flow: {
340
- action: "type" | "navigate" | "click" | "wait" | "submit";
341
- value?: string | undefined;
342
- url?: string | undefined;
343
- selector?: string | undefined;
344
- timeout?: number | undefined;
345
- }[];
346
- success_selector?: string | undefined;
347
- failure_selector?: string | undefined;
348
- }>;
349
- declare const AuthConfigSchema: z.ZodObject<{
350
- strategy: z.ZodDefault<z.ZodEnum<["bypass", "fixture", "token", "test_account"]>>;
351
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
352
- fixture: z.ZodOptional<z.ZodObject<{
353
- pattern: z.ZodString;
354
- source: z.ZodString;
355
- }, "strip", z.ZodTypeAny, {
356
- source: string;
357
- pattern: string;
358
- }, {
359
- source: string;
360
- pattern: string;
361
- }>>;
362
- token: z.ZodOptional<z.ZodObject<{
363
- type: z.ZodEnum<["cookie", "localStorage", "sessionStorage", "header"]>;
364
- name: z.ZodString;
365
- secret: z.ZodString;
366
- cookie_options: z.ZodOptional<z.ZodObject<{
367
- path: z.ZodOptional<z.ZodString>;
368
- domain: z.ZodOptional<z.ZodString>;
369
- secure: z.ZodOptional<z.ZodBoolean>;
370
- httpOnly: z.ZodOptional<z.ZodBoolean>;
371
- sameSite: z.ZodOptional<z.ZodEnum<["Strict", "Lax", "None"]>>;
372
- }, "strip", z.ZodTypeAny, {
373
- path?: string | undefined;
374
- domain?: string | undefined;
375
- secure?: boolean | undefined;
376
- httpOnly?: boolean | undefined;
377
- sameSite?: "Strict" | "Lax" | "None" | undefined;
378
- }, {
379
- path?: string | undefined;
380
- domain?: string | undefined;
381
- secure?: boolean | undefined;
382
- httpOnly?: boolean | undefined;
383
- sameSite?: "Strict" | "Lax" | "None" | undefined;
384
- }>>;
385
- }, "strip", z.ZodTypeAny, {
386
- name: string;
387
- type: "cookie" | "localStorage" | "sessionStorage" | "header";
388
- secret: string;
389
- cookie_options?: {
390
- path?: string | undefined;
391
- domain?: string | undefined;
392
- secure?: boolean | undefined;
393
- httpOnly?: boolean | undefined;
394
- sameSite?: "Strict" | "Lax" | "None" | undefined;
395
- } | undefined;
396
- }, {
397
- name: string;
398
- type: "cookie" | "localStorage" | "sessionStorage" | "header";
399
- secret: string;
400
- cookie_options?: {
401
- path?: string | undefined;
402
- domain?: string | undefined;
403
- secure?: boolean | undefined;
404
- httpOnly?: boolean | undefined;
405
- sameSite?: "Strict" | "Lax" | "None" | undefined;
406
- } | undefined;
407
- }>>;
408
- test_account: z.ZodOptional<z.ZodObject<{
409
- credentials_secret: z.ZodString;
410
- login_flow: z.ZodArray<z.ZodObject<{
411
- action: z.ZodEnum<["navigate", "type", "click", "wait", "submit"]>;
412
- url: z.ZodOptional<z.ZodString>;
413
- selector: z.ZodOptional<z.ZodString>;
414
- value: z.ZodOptional<z.ZodString>;
415
- timeout: z.ZodOptional<z.ZodNumber>;
416
- }, "strip", z.ZodTypeAny, {
417
- action: "type" | "navigate" | "click" | "wait" | "submit";
418
- value?: string | undefined;
419
- url?: string | undefined;
420
- selector?: string | undefined;
421
- timeout?: number | undefined;
422
- }, {
423
- action: "type" | "navigate" | "click" | "wait" | "submit";
424
- value?: string | undefined;
425
- url?: string | undefined;
426
- selector?: string | undefined;
427
- timeout?: number | undefined;
428
- }>, "many">;
429
- success_selector: z.ZodOptional<z.ZodString>;
430
- failure_selector: z.ZodOptional<z.ZodString>;
431
- }, "strip", z.ZodTypeAny, {
432
- credentials_secret: string;
433
- login_flow: {
434
- action: "type" | "navigate" | "click" | "wait" | "submit";
435
- value?: string | undefined;
436
- url?: string | undefined;
437
- selector?: string | undefined;
438
- timeout?: number | undefined;
439
- }[];
440
- success_selector?: string | undefined;
441
- failure_selector?: string | undefined;
442
- }, {
443
- credentials_secret: string;
444
- login_flow: {
445
- action: "type" | "navigate" | "click" | "wait" | "submit";
446
- value?: string | undefined;
447
- url?: string | undefined;
448
- selector?: string | undefined;
449
- timeout?: number | undefined;
450
- }[];
451
- success_selector?: string | undefined;
452
- failure_selector?: string | undefined;
453
- }>>;
454
- fallback: z.ZodOptional<z.ZodEnum<["bypass", "fixture", "token", "test_account"]>>;
455
- }, "strip", z.ZodTypeAny, {
456
- strategy: "bypass" | "fixture" | "token" | "test_account";
457
- env?: Record<string, string> | undefined;
458
- fixture?: {
459
- source: string;
460
- pattern: string;
461
- } | undefined;
462
- token?: {
463
- name: string;
464
- type: "cookie" | "localStorage" | "sessionStorage" | "header";
465
- secret: string;
466
- cookie_options?: {
467
- path?: string | undefined;
468
- domain?: string | undefined;
469
- secure?: boolean | undefined;
470
- httpOnly?: boolean | undefined;
471
- sameSite?: "Strict" | "Lax" | "None" | undefined;
472
- } | undefined;
473
- } | undefined;
474
- test_account?: {
475
- credentials_secret: string;
476
- login_flow: {
477
- action: "type" | "navigate" | "click" | "wait" | "submit";
478
- value?: string | undefined;
479
- url?: string | undefined;
480
- selector?: string | undefined;
481
- timeout?: number | undefined;
482
- }[];
483
- success_selector?: string | undefined;
484
- failure_selector?: string | undefined;
485
- } | undefined;
486
- fallback?: "bypass" | "fixture" | "token" | "test_account" | undefined;
487
- }, {
488
- env?: Record<string, string> | undefined;
489
- fixture?: {
490
- source: string;
491
- pattern: string;
492
- } | undefined;
493
- token?: {
494
- name: string;
495
- type: "cookie" | "localStorage" | "sessionStorage" | "header";
496
- secret: string;
497
- cookie_options?: {
498
- path?: string | undefined;
499
- domain?: string | undefined;
500
- secure?: boolean | undefined;
501
- httpOnly?: boolean | undefined;
502
- sameSite?: "Strict" | "Lax" | "None" | undefined;
503
- } | undefined;
504
- } | undefined;
505
- test_account?: {
506
- credentials_secret: string;
507
- login_flow: {
508
- action: "type" | "navigate" | "click" | "wait" | "submit";
509
- value?: string | undefined;
510
- url?: string | undefined;
511
- selector?: string | undefined;
512
- timeout?: number | undefined;
513
- }[];
514
- success_selector?: string | undefined;
515
- failure_selector?: string | undefined;
516
- } | undefined;
517
- strategy?: "bypass" | "fixture" | "token" | "test_account" | undefined;
518
- fallback?: "bypass" | "fixture" | "token" | "test_account" | undefined;
519
- }>;
520
- declare const DatabaseStrategySchema: z.ZodEnum<["fixture", "memory", "seed", "docker", "remote"]>;
521
- declare const DockerServiceSchema: z.ZodObject<{
522
- image: z.ZodString;
523
- port: z.ZodNumber;
524
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
525
- health_check: z.ZodOptional<z.ZodString>;
526
- health_timeout: z.ZodOptional<z.ZodNumber>;
527
- }, "strip", z.ZodTypeAny, {
528
- port: number;
529
- image: string;
530
- env?: Record<string, string> | undefined;
531
- health_check?: string | undefined;
532
- health_timeout?: number | undefined;
533
- }, {
534
- port: number;
535
- image: string;
536
- env?: Record<string, string> | undefined;
537
- health_check?: string | undefined;
538
- health_timeout?: number | undefined;
539
- }>;
540
- declare const DatabaseConfigSchema: z.ZodObject<{
541
- strategy: z.ZodDefault<z.ZodEnum<["fixture", "memory", "seed", "docker", "remote"]>>;
542
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
543
- seed_command: z.ZodOptional<z.ZodString>;
544
- migrate_command: z.ZodOptional<z.ZodString>;
545
- services: z.ZodOptional<z.ZodArray<z.ZodObject<{
546
- image: z.ZodString;
547
- port: z.ZodNumber;
548
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
549
- health_check: z.ZodOptional<z.ZodString>;
550
- health_timeout: z.ZodOptional<z.ZodNumber>;
551
- }, "strip", z.ZodTypeAny, {
552
- port: number;
553
- image: string;
554
- env?: Record<string, string> | undefined;
555
- health_check?: string | undefined;
556
- health_timeout?: number | undefined;
557
- }, {
558
- port: number;
559
- image: string;
560
- env?: Record<string, string> | undefined;
561
- health_check?: string | undefined;
562
- health_timeout?: number | undefined;
563
- }>, "many">>;
564
- read_only: z.ZodOptional<z.ZodBoolean>;
565
- ready_timeout: z.ZodOptional<z.ZodNumber>;
566
- } & {
567
- fallback: z.ZodOptional<z.ZodObject<{
568
- strategy: z.ZodDefault<z.ZodEnum<["fixture", "memory", "seed", "docker", "remote"]>>;
569
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
570
- seed_command: z.ZodOptional<z.ZodString>;
571
- migrate_command: z.ZodOptional<z.ZodString>;
572
- services: z.ZodOptional<z.ZodArray<z.ZodObject<{
573
- image: z.ZodString;
574
- port: z.ZodNumber;
575
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
576
- health_check: z.ZodOptional<z.ZodString>;
577
- health_timeout: z.ZodOptional<z.ZodNumber>;
578
- }, "strip", z.ZodTypeAny, {
579
- port: number;
580
- image: string;
581
- env?: Record<string, string> | undefined;
582
- health_check?: string | undefined;
583
- health_timeout?: number | undefined;
584
- }, {
585
- port: number;
586
- image: string;
587
- env?: Record<string, string> | undefined;
588
- health_check?: string | undefined;
589
- health_timeout?: number | undefined;
590
- }>, "many">>;
591
- read_only: z.ZodOptional<z.ZodBoolean>;
592
- ready_timeout: z.ZodOptional<z.ZodNumber>;
593
- }, "strip", z.ZodTypeAny, {
594
- strategy: "fixture" | "memory" | "seed" | "docker" | "remote";
595
- env?: Record<string, string> | undefined;
596
- seed_command?: string | undefined;
597
- migrate_command?: string | undefined;
598
- services?: {
599
- port: number;
600
- image: string;
601
- env?: Record<string, string> | undefined;
602
- health_check?: string | undefined;
603
- health_timeout?: number | undefined;
604
- }[] | undefined;
605
- read_only?: boolean | undefined;
606
- ready_timeout?: number | undefined;
607
- }, {
608
- env?: Record<string, string> | undefined;
609
- strategy?: "fixture" | "memory" | "seed" | "docker" | "remote" | undefined;
610
- seed_command?: string | undefined;
611
- migrate_command?: string | undefined;
612
- services?: {
613
- port: number;
614
- image: string;
615
- env?: Record<string, string> | undefined;
616
- health_check?: string | undefined;
617
- health_timeout?: number | undefined;
618
- }[] | undefined;
619
- read_only?: boolean | undefined;
620
- ready_timeout?: number | undefined;
621
- }>>;
622
- }, "strip", z.ZodTypeAny, {
623
- strategy: "fixture" | "memory" | "seed" | "docker" | "remote";
624
- env?: Record<string, string> | undefined;
625
- fallback?: {
626
- strategy: "fixture" | "memory" | "seed" | "docker" | "remote";
627
- env?: Record<string, string> | undefined;
628
- seed_command?: string | undefined;
629
- migrate_command?: string | undefined;
630
- services?: {
631
- port: number;
632
- image: string;
633
- env?: Record<string, string> | undefined;
634
- health_check?: string | undefined;
635
- health_timeout?: number | undefined;
636
- }[] | undefined;
637
- read_only?: boolean | undefined;
638
- ready_timeout?: number | undefined;
639
- } | undefined;
640
- seed_command?: string | undefined;
641
- migrate_command?: string | undefined;
642
- services?: {
643
- port: number;
644
- image: string;
645
- env?: Record<string, string> | undefined;
646
- health_check?: string | undefined;
647
- health_timeout?: number | undefined;
648
- }[] | undefined;
649
- read_only?: boolean | undefined;
650
- ready_timeout?: number | undefined;
651
- }, {
652
- env?: Record<string, string> | undefined;
653
- strategy?: "fixture" | "memory" | "seed" | "docker" | "remote" | undefined;
654
- fallback?: {
655
- env?: Record<string, string> | undefined;
656
- strategy?: "fixture" | "memory" | "seed" | "docker" | "remote" | undefined;
657
- seed_command?: string | undefined;
658
- migrate_command?: string | undefined;
659
- services?: {
660
- port: number;
661
- image: string;
662
- env?: Record<string, string> | undefined;
663
- health_check?: string | undefined;
664
- health_timeout?: number | undefined;
665
- }[] | undefined;
666
- read_only?: boolean | undefined;
667
- ready_timeout?: number | undefined;
668
- } | undefined;
669
- seed_command?: string | undefined;
670
- migrate_command?: string | undefined;
671
- services?: {
672
- port: number;
673
- image: string;
674
- env?: Record<string, string> | undefined;
675
- health_check?: string | undefined;
676
- health_timeout?: number | undefined;
677
- }[] | undefined;
678
- read_only?: boolean | undefined;
679
- ready_timeout?: number | undefined;
680
- }>;
681
- declare const AgenticToolSchema: z.ZodEnum<["opencode", "claude-code", "codex"]>;
682
- declare const AgenticSchema: z.ZodObject<{
683
- tool: z.ZodOptional<z.ZodEnum<["opencode", "claude-code", "codex"]>>;
684
- }, "strip", z.ZodTypeAny, {
685
- tool?: "opencode" | "claude-code" | "codex" | undefined;
686
- }, {
687
- tool?: "opencode" | "claude-code" | "codex" | undefined;
688
- }>;
689
- declare const NetworkConfigSchema: z.ZodObject<{
690
- /** Additional hosts/domains to allow egress to */
691
- allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
692
- }, "strip", z.ZodTypeAny, {
693
- allow?: string[] | undefined;
694
- }, {
695
- allow?: string[] | undefined;
696
- }>;
697
- declare const SecretDeclarationSchema: z.ZodObject<{
698
- description: z.ZodOptional<z.ZodString>;
699
- required: z.ZodOptional<z.ZodBoolean>;
700
- services: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
701
- }, "strip", z.ZodTypeAny, {
702
- required?: boolean | undefined;
703
- services?: string[] | undefined;
704
- description?: string | undefined;
705
- }, {
706
- required?: boolean | undefined;
707
- services?: string[] | undefined;
708
- description?: string | undefined;
709
- }>;
710
- declare const TriageConfigSchema: z.ZodObject<{
711
- /** Per-checker max agentic turns. Unspecified checkers use built-in defaults. */
712
- maxTurns: z.ZodOptional<z.ZodRecord<z.ZodEnum<["code-review", "rules-validator"]>, z.ZodNumber>>;
713
- /** Wall-clock timeout per checker, in milliseconds. */
714
- timeoutMs: z.ZodOptional<z.ZodNumber>;
715
- }, "strip", z.ZodTypeAny, {
716
- maxTurns?: Partial<Record<"code-review" | "rules-validator", number>> | undefined;
717
- timeoutMs?: number | undefined;
718
- }, {
719
- maxTurns?: Partial<Record<"code-review" | "rules-validator", number>> | undefined;
720
- timeoutMs?: number | undefined;
721
- }>;
722
- declare const PreferencesSchema: z.ZodObject<{
723
- /** Run analysis automatically for PR webhook events (default: true) */
724
- automatic_analysis: z.ZodOptional<z.ZodBoolean>;
725
- /** Enable sandbox-backed verification for this repository */
726
- sandbox_enabled: z.ZodOptional<z.ZodBoolean>;
727
- /** Enroll submitted PRs in auto-merge by default */
728
- auto_merge: z.ZodOptional<z.ZodBoolean>;
729
- /** Allow Haystack to attempt automatic fixes */
730
- auto_fix: z.ZodOptional<z.ZodBoolean>;
731
- }, "strip", z.ZodTypeAny, {
732
- automatic_analysis?: boolean | undefined;
733
- sandbox_enabled?: boolean | undefined;
734
- auto_merge?: boolean | undefined;
735
- auto_fix?: boolean | undefined;
736
- }, {
737
- automatic_analysis?: boolean | undefined;
738
- sandbox_enabled?: boolean | undefined;
739
- auto_merge?: boolean | undefined;
740
- auto_fix?: boolean | undefined;
741
- }>;
742
- export declare const HaystackConfigSchema: z.ZodObject<{
743
- /** Config version (must be "1") */
744
- version: z.ZodLiteral<"1">;
745
- /** Project name (for display) */
746
- name: z.ZodOptional<z.ZodString>;
747
- /** Repository-level Haystack behavior */
748
- preferences: z.ZodOptional<z.ZodObject<{
749
- /** Run analysis automatically for PR webhook events (default: true) */
750
- automatic_analysis: z.ZodOptional<z.ZodBoolean>;
751
- /** Enable sandbox-backed verification for this repository */
752
- sandbox_enabled: z.ZodOptional<z.ZodBoolean>;
753
- /** Enroll submitted PRs in auto-merge by default */
754
- auto_merge: z.ZodOptional<z.ZodBoolean>;
755
- /** Allow Haystack to attempt automatic fixes */
756
- auto_fix: z.ZodOptional<z.ZodBoolean>;
757
- }, "strip", z.ZodTypeAny, {
758
- automatic_analysis?: boolean | undefined;
759
- sandbox_enabled?: boolean | undefined;
760
- auto_merge?: boolean | undefined;
761
- auto_fix?: boolean | undefined;
762
- }, {
763
- automatic_analysis?: boolean | undefined;
764
- sandbox_enabled?: boolean | undefined;
765
- auto_merge?: boolean | undefined;
766
- auto_fix?: boolean | undefined;
767
- }>>;
768
- /** Package manager override (auto-detected if not specified) */
769
- package_manager: z.ZodOptional<z.ZodEnum<["npm", "pnpm", "yarn", "bun"]>>;
770
- /** Development server configuration */
771
- dev_server: z.ZodOptional<z.ZodObject<{
772
- /** Command to start dev server (e.g., "pnpm dev") */
773
- command: z.ZodString;
774
- /** Port the dev server runs on */
775
- port: z.ZodNumber;
776
- /** Pattern in stdout that indicates server is ready (e.g., "Local:") */
777
- ready_pattern: z.ZodOptional<z.ZodString>;
778
- /** Environment variables to set when starting the server */
779
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
780
- }, "strip", z.ZodTypeAny, {
781
- command: string;
782
- port: number;
783
- ready_pattern?: string | undefined;
784
- env?: Record<string, string> | undefined;
785
- }, {
786
- command: string;
787
- port: number;
788
- ready_pattern?: string | undefined;
789
- env?: Record<string, string> | undefined;
790
- }>>;
791
- /** Multiple services (for monorepos) */
792
- services: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
793
- /** Root directory relative to repo root */
794
- root: z.ZodOptional<z.ZodString>;
795
- /** Command to start the service */
796
- command: z.ZodString;
797
- /** Port the service runs on (not required for batch jobs) */
798
- port: z.ZodOptional<z.ZodNumber>;
799
- /** Pattern in stdout that indicates service is ready */
800
- ready_pattern: z.ZodOptional<z.ZodString>;
801
- /** Environment variables to set */
802
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
803
- /** Service type: 'server' (default) or 'batch' (run once, no port) */
804
- type: z.ZodOptional<z.ZodEnum<["server", "batch"]>>;
805
- /** Services that must be started before this service */
806
- depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
807
- }, "strip", z.ZodTypeAny, {
808
- command: string;
809
- type?: "server" | "batch" | undefined;
810
- port?: number | undefined;
811
- ready_pattern?: string | undefined;
812
- env?: Record<string, string> | undefined;
813
- root?: string | undefined;
814
- depends_on?: string[] | undefined;
815
- }, {
816
- command: string;
817
- type?: "server" | "batch" | undefined;
818
- port?: number | undefined;
819
- ready_pattern?: string | undefined;
820
- env?: Record<string, string> | undefined;
821
- root?: string | undefined;
822
- depends_on?: string[] | undefined;
823
- }>>>;
824
- /** Verification configuration (legacy) */
825
- verification: z.ZodOptional<z.ZodObject<{
826
- /** Commands to run for verification (build, lint, test, etc.) */
827
- commands: z.ZodOptional<z.ZodArray<z.ZodObject<{
828
- /** Human-readable name (e.g., "Build", "Lint", "Typecheck") */
829
- name: z.ZodString;
830
- /** The shell command to run (e.g., "pnpm build", "pnpm lint") */
831
- run: z.ZodString;
832
- }, "strip", z.ZodTypeAny, {
833
- name: string;
834
- run: string;
835
- }, {
836
- name: string;
837
- run: string;
838
- }>, "many">>;
839
- /** Fixture data sources keyed by endpoint pattern */
840
- fixtures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
841
- /** Where to load fixture data from */
842
- source: z.ZodEffects<z.ZodString, string, string>;
843
- /** Headers to include when fetching from remote source */
844
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
845
- /** Cookies to include when fetching from remote source */
846
- cookies: z.ZodOptional<z.ZodString>;
847
- }, "strip", z.ZodTypeAny, {
848
- source: string;
849
- headers?: Record<string, string> | undefined;
850
- cookies?: string | undefined;
851
- }, {
852
- source: string;
853
- headers?: Record<string, string> | undefined;
854
- cookies?: string | undefined;
855
- }>>>;
856
- }, "strip", z.ZodTypeAny, {
857
- commands?: {
858
- name: string;
859
- run: string;
860
- }[] | undefined;
861
- fixtures?: Record<string, {
862
- source: string;
863
- headers?: Record<string, string> | undefined;
864
- cookies?: string | undefined;
865
- }> | undefined;
866
- }, {
867
- commands?: {
868
- name: string;
869
- run: string;
870
- }[] | undefined;
871
- fixtures?: Record<string, {
872
- source: string;
873
- headers?: Record<string, string> | undefined;
874
- cookies?: string | undefined;
875
- }> | undefined;
876
- }>>;
877
- /** Auth configuration (legacy) */
878
- auth: z.ZodOptional<z.ZodObject<{
879
- strategy: z.ZodDefault<z.ZodEnum<["bypass", "fixture", "token", "test_account"]>>;
880
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
881
- fixture: z.ZodOptional<z.ZodObject<{
882
- pattern: z.ZodString;
883
- source: z.ZodString;
884
- }, "strip", z.ZodTypeAny, {
885
- source: string;
886
- pattern: string;
887
- }, {
888
- source: string;
889
- pattern: string;
890
- }>>;
891
- token: z.ZodOptional<z.ZodObject<{
892
- type: z.ZodEnum<["cookie", "localStorage", "sessionStorage", "header"]>;
893
- name: z.ZodString;
894
- secret: z.ZodString;
895
- cookie_options: z.ZodOptional<z.ZodObject<{
896
- path: z.ZodOptional<z.ZodString>;
897
- domain: z.ZodOptional<z.ZodString>;
898
- secure: z.ZodOptional<z.ZodBoolean>;
899
- httpOnly: z.ZodOptional<z.ZodBoolean>;
900
- sameSite: z.ZodOptional<z.ZodEnum<["Strict", "Lax", "None"]>>;
901
- }, "strip", z.ZodTypeAny, {
902
- path?: string | undefined;
903
- domain?: string | undefined;
904
- secure?: boolean | undefined;
905
- httpOnly?: boolean | undefined;
906
- sameSite?: "Strict" | "Lax" | "None" | undefined;
907
- }, {
908
- path?: string | undefined;
909
- domain?: string | undefined;
910
- secure?: boolean | undefined;
911
- httpOnly?: boolean | undefined;
912
- sameSite?: "Strict" | "Lax" | "None" | undefined;
913
- }>>;
914
- }, "strip", z.ZodTypeAny, {
915
- name: string;
916
- type: "cookie" | "localStorage" | "sessionStorage" | "header";
917
- secret: string;
918
- cookie_options?: {
919
- path?: string | undefined;
920
- domain?: string | undefined;
921
- secure?: boolean | undefined;
922
- httpOnly?: boolean | undefined;
923
- sameSite?: "Strict" | "Lax" | "None" | undefined;
924
- } | undefined;
925
- }, {
926
- name: string;
927
- type: "cookie" | "localStorage" | "sessionStorage" | "header";
928
- secret: string;
929
- cookie_options?: {
930
- path?: string | undefined;
931
- domain?: string | undefined;
932
- secure?: boolean | undefined;
933
- httpOnly?: boolean | undefined;
934
- sameSite?: "Strict" | "Lax" | "None" | undefined;
935
- } | undefined;
936
- }>>;
937
- test_account: z.ZodOptional<z.ZodObject<{
938
- credentials_secret: z.ZodString;
939
- login_flow: z.ZodArray<z.ZodObject<{
940
- action: z.ZodEnum<["navigate", "type", "click", "wait", "submit"]>;
941
- url: z.ZodOptional<z.ZodString>;
942
- selector: z.ZodOptional<z.ZodString>;
943
- value: z.ZodOptional<z.ZodString>;
944
- timeout: z.ZodOptional<z.ZodNumber>;
945
- }, "strip", z.ZodTypeAny, {
946
- action: "type" | "navigate" | "click" | "wait" | "submit";
947
- value?: string | undefined;
948
- url?: string | undefined;
949
- selector?: string | undefined;
950
- timeout?: number | undefined;
951
- }, {
952
- action: "type" | "navigate" | "click" | "wait" | "submit";
953
- value?: string | undefined;
954
- url?: string | undefined;
955
- selector?: string | undefined;
956
- timeout?: number | undefined;
957
- }>, "many">;
958
- success_selector: z.ZodOptional<z.ZodString>;
959
- failure_selector: z.ZodOptional<z.ZodString>;
960
- }, "strip", z.ZodTypeAny, {
961
- credentials_secret: string;
962
- login_flow: {
963
- action: "type" | "navigate" | "click" | "wait" | "submit";
964
- value?: string | undefined;
965
- url?: string | undefined;
966
- selector?: string | undefined;
967
- timeout?: number | undefined;
968
- }[];
969
- success_selector?: string | undefined;
970
- failure_selector?: string | undefined;
971
- }, {
972
- credentials_secret: string;
973
- login_flow: {
974
- action: "type" | "navigate" | "click" | "wait" | "submit";
975
- value?: string | undefined;
976
- url?: string | undefined;
977
- selector?: string | undefined;
978
- timeout?: number | undefined;
979
- }[];
980
- success_selector?: string | undefined;
981
- failure_selector?: string | undefined;
982
- }>>;
983
- fallback: z.ZodOptional<z.ZodEnum<["bypass", "fixture", "token", "test_account"]>>;
984
- }, "strip", z.ZodTypeAny, {
985
- strategy: "bypass" | "fixture" | "token" | "test_account";
986
- env?: Record<string, string> | undefined;
987
- fixture?: {
988
- source: string;
989
- pattern: string;
990
- } | undefined;
991
- token?: {
992
- name: string;
993
- type: "cookie" | "localStorage" | "sessionStorage" | "header";
994
- secret: string;
995
- cookie_options?: {
996
- path?: string | undefined;
997
- domain?: string | undefined;
998
- secure?: boolean | undefined;
999
- httpOnly?: boolean | undefined;
1000
- sameSite?: "Strict" | "Lax" | "None" | undefined;
1001
- } | undefined;
1002
- } | undefined;
1003
- test_account?: {
1004
- credentials_secret: string;
1005
- login_flow: {
1006
- action: "type" | "navigate" | "click" | "wait" | "submit";
1007
- value?: string | undefined;
1008
- url?: string | undefined;
1009
- selector?: string | undefined;
1010
- timeout?: number | undefined;
1011
- }[];
1012
- success_selector?: string | undefined;
1013
- failure_selector?: string | undefined;
1014
- } | undefined;
1015
- fallback?: "bypass" | "fixture" | "token" | "test_account" | undefined;
1016
- }, {
1017
- env?: Record<string, string> | undefined;
1018
- fixture?: {
1019
- source: string;
1020
- pattern: string;
1021
- } | undefined;
1022
- token?: {
1023
- name: string;
1024
- type: "cookie" | "localStorage" | "sessionStorage" | "header";
1025
- secret: string;
1026
- cookie_options?: {
1027
- path?: string | undefined;
1028
- domain?: string | undefined;
1029
- secure?: boolean | undefined;
1030
- httpOnly?: boolean | undefined;
1031
- sameSite?: "Strict" | "Lax" | "None" | undefined;
1032
- } | undefined;
1033
- } | undefined;
1034
- test_account?: {
1035
- credentials_secret: string;
1036
- login_flow: {
1037
- action: "type" | "navigate" | "click" | "wait" | "submit";
1038
- value?: string | undefined;
1039
- url?: string | undefined;
1040
- selector?: string | undefined;
1041
- timeout?: number | undefined;
1042
- }[];
1043
- success_selector?: string | undefined;
1044
- failure_selector?: string | undefined;
1045
- } | undefined;
1046
- strategy?: "bypass" | "fixture" | "token" | "test_account" | undefined;
1047
- fallback?: "bypass" | "fixture" | "token" | "test_account" | undefined;
1048
- }>>;
1049
- /** Agentic configuration (project-level override) */
1050
- agentic: z.ZodOptional<z.ZodObject<{
1051
- tool: z.ZodOptional<z.ZodEnum<["opencode", "claude-code", "codex"]>>;
1052
- }, "strip", z.ZodTypeAny, {
1053
- tool?: "opencode" | "claude-code" | "codex" | undefined;
1054
- }, {
1055
- tool?: "opencode" | "claude-code" | "codex" | undefined;
1056
- }>>;
1057
- /** Database configuration (legacy) */
1058
- database: z.ZodOptional<z.ZodObject<{
1059
- strategy: z.ZodDefault<z.ZodEnum<["fixture", "memory", "seed", "docker", "remote"]>>;
1060
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1061
- seed_command: z.ZodOptional<z.ZodString>;
1062
- migrate_command: z.ZodOptional<z.ZodString>;
1063
- services: z.ZodOptional<z.ZodArray<z.ZodObject<{
1064
- image: z.ZodString;
1065
- port: z.ZodNumber;
1066
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1067
- health_check: z.ZodOptional<z.ZodString>;
1068
- health_timeout: z.ZodOptional<z.ZodNumber>;
1069
- }, "strip", z.ZodTypeAny, {
1070
- port: number;
1071
- image: string;
1072
- env?: Record<string, string> | undefined;
1073
- health_check?: string | undefined;
1074
- health_timeout?: number | undefined;
1075
- }, {
1076
- port: number;
1077
- image: string;
1078
- env?: Record<string, string> | undefined;
1079
- health_check?: string | undefined;
1080
- health_timeout?: number | undefined;
1081
- }>, "many">>;
1082
- read_only: z.ZodOptional<z.ZodBoolean>;
1083
- ready_timeout: z.ZodOptional<z.ZodNumber>;
1084
- } & {
1085
- fallback: z.ZodOptional<z.ZodObject<{
1086
- strategy: z.ZodDefault<z.ZodEnum<["fixture", "memory", "seed", "docker", "remote"]>>;
1087
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1088
- seed_command: z.ZodOptional<z.ZodString>;
1089
- migrate_command: z.ZodOptional<z.ZodString>;
1090
- services: z.ZodOptional<z.ZodArray<z.ZodObject<{
1091
- image: z.ZodString;
1092
- port: z.ZodNumber;
1093
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1094
- health_check: z.ZodOptional<z.ZodString>;
1095
- health_timeout: z.ZodOptional<z.ZodNumber>;
1096
- }, "strip", z.ZodTypeAny, {
1097
- port: number;
1098
- image: string;
1099
- env?: Record<string, string> | undefined;
1100
- health_check?: string | undefined;
1101
- health_timeout?: number | undefined;
1102
- }, {
1103
- port: number;
1104
- image: string;
1105
- env?: Record<string, string> | undefined;
1106
- health_check?: string | undefined;
1107
- health_timeout?: number | undefined;
1108
- }>, "many">>;
1109
- read_only: z.ZodOptional<z.ZodBoolean>;
1110
- ready_timeout: z.ZodOptional<z.ZodNumber>;
1111
- }, "strip", z.ZodTypeAny, {
1112
- strategy: "fixture" | "memory" | "seed" | "docker" | "remote";
1113
- env?: Record<string, string> | undefined;
1114
- seed_command?: string | undefined;
1115
- migrate_command?: string | undefined;
1116
- services?: {
1117
- port: number;
1118
- image: string;
1119
- env?: Record<string, string> | undefined;
1120
- health_check?: string | undefined;
1121
- health_timeout?: number | undefined;
1122
- }[] | undefined;
1123
- read_only?: boolean | undefined;
1124
- ready_timeout?: number | undefined;
1125
- }, {
1126
- env?: Record<string, string> | undefined;
1127
- strategy?: "fixture" | "memory" | "seed" | "docker" | "remote" | undefined;
1128
- seed_command?: string | undefined;
1129
- migrate_command?: string | undefined;
1130
- services?: {
1131
- port: number;
1132
- image: string;
1133
- env?: Record<string, string> | undefined;
1134
- health_check?: string | undefined;
1135
- health_timeout?: number | undefined;
1136
- }[] | undefined;
1137
- read_only?: boolean | undefined;
1138
- ready_timeout?: number | undefined;
1139
- }>>;
1140
- }, "strip", z.ZodTypeAny, {
1141
- strategy: "fixture" | "memory" | "seed" | "docker" | "remote";
1142
- env?: Record<string, string> | undefined;
1143
- fallback?: {
1144
- strategy: "fixture" | "memory" | "seed" | "docker" | "remote";
1145
- env?: Record<string, string> | undefined;
1146
- seed_command?: string | undefined;
1147
- migrate_command?: string | undefined;
1148
- services?: {
1149
- port: number;
1150
- image: string;
1151
- env?: Record<string, string> | undefined;
1152
- health_check?: string | undefined;
1153
- health_timeout?: number | undefined;
1154
- }[] | undefined;
1155
- read_only?: boolean | undefined;
1156
- ready_timeout?: number | undefined;
1157
- } | undefined;
1158
- seed_command?: string | undefined;
1159
- migrate_command?: string | undefined;
1160
- services?: {
1161
- port: number;
1162
- image: string;
1163
- env?: Record<string, string> | undefined;
1164
- health_check?: string | undefined;
1165
- health_timeout?: number | undefined;
1166
- }[] | undefined;
1167
- read_only?: boolean | undefined;
1168
- ready_timeout?: number | undefined;
1169
- }, {
1170
- env?: Record<string, string> | undefined;
1171
- strategy?: "fixture" | "memory" | "seed" | "docker" | "remote" | undefined;
1172
- fallback?: {
1173
- env?: Record<string, string> | undefined;
1174
- strategy?: "fixture" | "memory" | "seed" | "docker" | "remote" | undefined;
1175
- seed_command?: string | undefined;
1176
- migrate_command?: string | undefined;
1177
- services?: {
1178
- port: number;
1179
- image: string;
1180
- env?: Record<string, string> | undefined;
1181
- health_check?: string | undefined;
1182
- health_timeout?: number | undefined;
1183
- }[] | undefined;
1184
- read_only?: boolean | undefined;
1185
- ready_timeout?: number | undefined;
1186
- } | undefined;
1187
- seed_command?: string | undefined;
1188
- migrate_command?: string | undefined;
1189
- services?: {
1190
- port: number;
1191
- image: string;
1192
- env?: Record<string, string> | undefined;
1193
- health_check?: string | undefined;
1194
- health_timeout?: number | undefined;
1195
- }[] | undefined;
1196
- read_only?: boolean | undefined;
1197
- ready_timeout?: number | undefined;
1198
- }>>;
1199
- /** Network egress configuration */
1200
- network: z.ZodOptional<z.ZodObject<{
1201
- /** Additional hosts/domains to allow egress to */
1202
- allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1203
- }, "strip", z.ZodTypeAny, {
1204
- allow?: string[] | undefined;
1205
- }, {
1206
- allow?: string[] | undefined;
1207
- }>>;
1208
- /** Secrets required by this project */
1209
- secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1210
- description: z.ZodOptional<z.ZodString>;
1211
- required: z.ZodOptional<z.ZodBoolean>;
1212
- services: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1213
- }, "strip", z.ZodTypeAny, {
1214
- required?: boolean | undefined;
1215
- services?: string[] | undefined;
1216
- description?: string | undefined;
1217
- }, {
1218
- required?: boolean | undefined;
1219
- services?: string[] | undefined;
1220
- description?: string | undefined;
1221
- }>>>;
1222
- /** Merge queue configuration for autonomous PR maintenance */
1223
- merge_queue: z.ZodOptional<z.ZodObject<{
1224
- /** Enable the Haystack auto-merge queue */
1225
- merge_queue: z.ZodOptional<z.ZodBoolean>;
1226
- /** Automatically rebase PRs that develop merge conflicts after pushes to the base branch */
1227
- auto_resolve_conflicts: z.ZodOptional<z.ZodBoolean>;
1228
- /** Dispatch the Haystack agent to fix failing CI checks. Defaults to true; set
1229
- * false to escalate CI failures to the PR author instead of attempting a fix. */
1230
- auto_fix_ci_failures: z.ZodOptional<z.ZodBoolean>;
1231
- /** Grace period configuration before auto-merging */
1232
- merge_debounce: z.ZodOptional<z.ZodObject<{
1233
- /** Default wait time in minutes before auto-merging */
1234
- default_minutes: z.ZodOptional<z.ZodNumber>;
1235
- /** Per-author wait time overrides (author login → minutes) */
1236
- authors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1237
- }, "strip", z.ZodTypeAny, {
1238
- default_minutes?: number | undefined;
1239
- authors?: Record<string, number> | undefined;
1240
- }, {
1241
- default_minutes?: number | undefined;
1242
- authors?: Record<string, number> | undefined;
1243
- }>>;
1244
- /** Batch multiple PRs into one CI run */
1245
- batch_merge: z.ZodOptional<z.ZodObject<{
1246
- /** Enable batch merging */
1247
- enabled: z.ZodOptional<z.ZodBoolean>;
1248
- /** Minimum PRs to form a batch */
1249
- min_batch_size: z.ZodOptional<z.ZodNumber>;
1250
- /** Maximum PRs per batch (cap: 20) */
1251
- max_batch_size: z.ZodOptional<z.ZodNumber>;
1252
- /** Seconds to wait after grace period for more PRs to accumulate (default: 30, 0 to disable) */
1253
- batch_window_seconds: z.ZodOptional<z.ZodNumber>;
1254
- }, "strip", z.ZodTypeAny, {
1255
- enabled?: boolean | undefined;
1256
- min_batch_size?: number | undefined;
1257
- max_batch_size?: number | undefined;
1258
- batch_window_seconds?: number | undefined;
1259
- }, {
1260
- enabled?: boolean | undefined;
1261
- min_batch_size?: number | undefined;
1262
- max_batch_size?: number | undefined;
1263
- batch_window_seconds?: number | undefined;
1264
- }>>;
1265
- /** Wait for external AI code reviewers before merging — all bots must post */
1266
- wait_for_reviewer: z.ZodOptional<z.ZodObject<{
1267
- /** GitHub bot usernames to wait for (e.g. "cursor-bugbot[bot]") */
1268
- bots: z.ZodArray<z.ZodString, "many">;
1269
- /** Give up waiting after this many minutes (default: 30) */
1270
- timeout_minutes: z.ZodOptional<z.ZodNumber>;
1271
- }, "strip", z.ZodTypeAny, {
1272
- bots: string[];
1273
- timeout_minutes?: number | undefined;
1274
- }, {
1275
- bots: string[];
1276
- timeout_minutes?: number | undefined;
1277
- }>>;
1278
- }, "strip", z.ZodTypeAny, {
1279
- merge_queue?: boolean | undefined;
1280
- auto_resolve_conflicts?: boolean | undefined;
1281
- auto_fix_ci_failures?: boolean | undefined;
1282
- merge_debounce?: {
1283
- default_minutes?: number | undefined;
1284
- authors?: Record<string, number> | undefined;
1285
- } | undefined;
1286
- batch_merge?: {
1287
- enabled?: boolean | undefined;
1288
- min_batch_size?: number | undefined;
1289
- max_batch_size?: number | undefined;
1290
- batch_window_seconds?: number | undefined;
1291
- } | undefined;
1292
- wait_for_reviewer?: {
1293
- bots: string[];
1294
- timeout_minutes?: number | undefined;
1295
- } | undefined;
1296
- }, {
1297
- merge_queue?: boolean | undefined;
1298
- auto_resolve_conflicts?: boolean | undefined;
1299
- auto_fix_ci_failures?: boolean | undefined;
1300
- merge_debounce?: {
1301
- default_minutes?: number | undefined;
1302
- authors?: Record<string, number> | undefined;
1303
- } | undefined;
1304
- batch_merge?: {
1305
- enabled?: boolean | undefined;
1306
- min_batch_size?: number | undefined;
1307
- max_batch_size?: number | undefined;
1308
- batch_window_seconds?: number | undefined;
1309
- } | undefined;
1310
- wait_for_reviewer?: {
1311
- bots: string[];
1312
- timeout_minutes?: number | undefined;
1313
- } | undefined;
1314
- }>>;
1315
- /** Pre-PR triage configuration (turn budgets, timeouts) */
1316
- triage: z.ZodOptional<z.ZodObject<{
1317
- /** Per-checker max agentic turns. Unspecified checkers use built-in defaults. */
1318
- maxTurns: z.ZodOptional<z.ZodRecord<z.ZodEnum<["code-review", "rules-validator"]>, z.ZodNumber>>;
1319
- /** Wall-clock timeout per checker, in milliseconds. */
1320
- timeoutMs: z.ZodOptional<z.ZodNumber>;
1321
- }, "strip", z.ZodTypeAny, {
1322
- maxTurns?: Partial<Record<"code-review" | "rules-validator", number>> | undefined;
1323
- timeoutMs?: number | undefined;
1324
- }, {
1325
- maxTurns?: Partial<Record<"code-review" | "rules-validator", number>> | undefined;
1326
- timeoutMs?: number | undefined;
1327
- }>>;
1328
- }, "strip", z.ZodTypeAny, {
1329
- version: "1";
1330
- name?: string | undefined;
1331
- merge_queue?: {
1332
- merge_queue?: boolean | undefined;
1333
- auto_resolve_conflicts?: boolean | undefined;
1334
- auto_fix_ci_failures?: boolean | undefined;
1335
- merge_debounce?: {
1336
- default_minutes?: number | undefined;
1337
- authors?: Record<string, number> | undefined;
1338
- } | undefined;
1339
- batch_merge?: {
1340
- enabled?: boolean | undefined;
1341
- min_batch_size?: number | undefined;
1342
- max_batch_size?: number | undefined;
1343
- batch_window_seconds?: number | undefined;
1344
- } | undefined;
1345
- wait_for_reviewer?: {
1346
- bots: string[];
1347
- timeout_minutes?: number | undefined;
1348
- } | undefined;
1349
- } | undefined;
1350
- services?: Record<string, {
1351
- command: string;
1352
- type?: "server" | "batch" | undefined;
1353
- port?: number | undefined;
1354
- ready_pattern?: string | undefined;
1355
- env?: Record<string, string> | undefined;
1356
- root?: string | undefined;
1357
- depends_on?: string[] | undefined;
1358
- }> | undefined;
1359
- preferences?: {
1360
- automatic_analysis?: boolean | undefined;
1361
- sandbox_enabled?: boolean | undefined;
1362
- auto_merge?: boolean | undefined;
1363
- auto_fix?: boolean | undefined;
1364
- } | undefined;
1365
- package_manager?: "npm" | "pnpm" | "yarn" | "bun" | undefined;
1366
- dev_server?: {
1367
- command: string;
1368
- port: number;
1369
- ready_pattern?: string | undefined;
1370
- env?: Record<string, string> | undefined;
1371
- } | undefined;
1372
- verification?: {
1373
- commands?: {
1374
- name: string;
1375
- run: string;
1376
- }[] | undefined;
1377
- fixtures?: Record<string, {
1378
- source: string;
1379
- headers?: Record<string, string> | undefined;
1380
- cookies?: string | undefined;
1381
- }> | undefined;
1382
- } | undefined;
1383
- auth?: {
1384
- strategy: "bypass" | "fixture" | "token" | "test_account";
1385
- env?: Record<string, string> | undefined;
1386
- fixture?: {
1387
- source: string;
1388
- pattern: string;
1389
- } | undefined;
1390
- token?: {
1391
- name: string;
1392
- type: "cookie" | "localStorage" | "sessionStorage" | "header";
1393
- secret: string;
1394
- cookie_options?: {
1395
- path?: string | undefined;
1396
- domain?: string | undefined;
1397
- secure?: boolean | undefined;
1398
- httpOnly?: boolean | undefined;
1399
- sameSite?: "Strict" | "Lax" | "None" | undefined;
1400
- } | undefined;
1401
- } | undefined;
1402
- test_account?: {
1403
- credentials_secret: string;
1404
- login_flow: {
1405
- action: "type" | "navigate" | "click" | "wait" | "submit";
1406
- value?: string | undefined;
1407
- url?: string | undefined;
1408
- selector?: string | undefined;
1409
- timeout?: number | undefined;
1410
- }[];
1411
- success_selector?: string | undefined;
1412
- failure_selector?: string | undefined;
1413
- } | undefined;
1414
- fallback?: "bypass" | "fixture" | "token" | "test_account" | undefined;
1415
- } | undefined;
1416
- agentic?: {
1417
- tool?: "opencode" | "claude-code" | "codex" | undefined;
1418
- } | undefined;
1419
- database?: {
1420
- strategy: "fixture" | "memory" | "seed" | "docker" | "remote";
1421
- env?: Record<string, string> | undefined;
1422
- fallback?: {
1423
- strategy: "fixture" | "memory" | "seed" | "docker" | "remote";
1424
- env?: Record<string, string> | undefined;
1425
- seed_command?: string | undefined;
1426
- migrate_command?: string | undefined;
1427
- services?: {
1428
- port: number;
1429
- image: string;
1430
- env?: Record<string, string> | undefined;
1431
- health_check?: string | undefined;
1432
- health_timeout?: number | undefined;
1433
- }[] | undefined;
1434
- read_only?: boolean | undefined;
1435
- ready_timeout?: number | undefined;
1436
- } | undefined;
1437
- seed_command?: string | undefined;
1438
- migrate_command?: string | undefined;
1439
- services?: {
1440
- port: number;
1441
- image: string;
1442
- env?: Record<string, string> | undefined;
1443
- health_check?: string | undefined;
1444
- health_timeout?: number | undefined;
1445
- }[] | undefined;
1446
- read_only?: boolean | undefined;
1447
- ready_timeout?: number | undefined;
1448
- } | undefined;
1449
- network?: {
1450
- allow?: string[] | undefined;
1451
- } | undefined;
1452
- secrets?: Record<string, {
1453
- required?: boolean | undefined;
1454
- services?: string[] | undefined;
1455
- description?: string | undefined;
1456
- }> | undefined;
1457
- triage?: {
1458
- maxTurns?: Partial<Record<"code-review" | "rules-validator", number>> | undefined;
1459
- timeoutMs?: number | undefined;
1460
- } | undefined;
1461
- }, {
1462
- version: "1";
1463
- name?: string | undefined;
1464
- merge_queue?: {
1465
- merge_queue?: boolean | undefined;
1466
- auto_resolve_conflicts?: boolean | undefined;
1467
- auto_fix_ci_failures?: boolean | undefined;
1468
- merge_debounce?: {
1469
- default_minutes?: number | undefined;
1470
- authors?: Record<string, number> | undefined;
1471
- } | undefined;
1472
- batch_merge?: {
1473
- enabled?: boolean | undefined;
1474
- min_batch_size?: number | undefined;
1475
- max_batch_size?: number | undefined;
1476
- batch_window_seconds?: number | undefined;
1477
- } | undefined;
1478
- wait_for_reviewer?: {
1479
- bots: string[];
1480
- timeout_minutes?: number | undefined;
1481
- } | undefined;
1482
- } | undefined;
1483
- services?: Record<string, {
1484
- command: string;
1485
- type?: "server" | "batch" | undefined;
1486
- port?: number | undefined;
1487
- ready_pattern?: string | undefined;
1488
- env?: Record<string, string> | undefined;
1489
- root?: string | undefined;
1490
- depends_on?: string[] | undefined;
1491
- }> | undefined;
1492
- preferences?: {
1493
- automatic_analysis?: boolean | undefined;
1494
- sandbox_enabled?: boolean | undefined;
1495
- auto_merge?: boolean | undefined;
1496
- auto_fix?: boolean | undefined;
1497
- } | undefined;
1498
- package_manager?: "npm" | "pnpm" | "yarn" | "bun" | undefined;
1499
- dev_server?: {
1500
- command: string;
1501
- port: number;
1502
- ready_pattern?: string | undefined;
1503
- env?: Record<string, string> | undefined;
1504
- } | undefined;
1505
- verification?: {
1506
- commands?: {
1507
- name: string;
1508
- run: string;
1509
- }[] | undefined;
1510
- fixtures?: Record<string, {
1511
- source: string;
1512
- headers?: Record<string, string> | undefined;
1513
- cookies?: string | undefined;
1514
- }> | undefined;
1515
- } | undefined;
1516
- auth?: {
1517
- env?: Record<string, string> | undefined;
1518
- fixture?: {
1519
- source: string;
1520
- pattern: string;
1521
- } | undefined;
1522
- token?: {
1523
- name: string;
1524
- type: "cookie" | "localStorage" | "sessionStorage" | "header";
1525
- secret: string;
1526
- cookie_options?: {
1527
- path?: string | undefined;
1528
- domain?: string | undefined;
1529
- secure?: boolean | undefined;
1530
- httpOnly?: boolean | undefined;
1531
- sameSite?: "Strict" | "Lax" | "None" | undefined;
1532
- } | undefined;
1533
- } | undefined;
1534
- test_account?: {
1535
- credentials_secret: string;
1536
- login_flow: {
1537
- action: "type" | "navigate" | "click" | "wait" | "submit";
1538
- value?: string | undefined;
1539
- url?: string | undefined;
1540
- selector?: string | undefined;
1541
- timeout?: number | undefined;
1542
- }[];
1543
- success_selector?: string | undefined;
1544
- failure_selector?: string | undefined;
1545
- } | undefined;
1546
- strategy?: "bypass" | "fixture" | "token" | "test_account" | undefined;
1547
- fallback?: "bypass" | "fixture" | "token" | "test_account" | undefined;
1548
- } | undefined;
1549
- agentic?: {
1550
- tool?: "opencode" | "claude-code" | "codex" | undefined;
1551
- } | undefined;
1552
- database?: {
1553
- env?: Record<string, string> | undefined;
1554
- strategy?: "fixture" | "memory" | "seed" | "docker" | "remote" | undefined;
1555
- fallback?: {
1556
- env?: Record<string, string> | undefined;
1557
- strategy?: "fixture" | "memory" | "seed" | "docker" | "remote" | undefined;
1558
- seed_command?: string | undefined;
1559
- migrate_command?: string | undefined;
1560
- services?: {
1561
- port: number;
1562
- image: string;
1563
- env?: Record<string, string> | undefined;
1564
- health_check?: string | undefined;
1565
- health_timeout?: number | undefined;
1566
- }[] | undefined;
1567
- read_only?: boolean | undefined;
1568
- ready_timeout?: number | undefined;
1569
- } | undefined;
1570
- seed_command?: string | undefined;
1571
- migrate_command?: string | undefined;
1572
- services?: {
1573
- port: number;
1574
- image: string;
1575
- env?: Record<string, string> | undefined;
1576
- health_check?: string | undefined;
1577
- health_timeout?: number | undefined;
1578
- }[] | undefined;
1579
- read_only?: boolean | undefined;
1580
- ready_timeout?: number | undefined;
1581
- } | undefined;
1582
- network?: {
1583
- allow?: string[] | undefined;
1584
- } | undefined;
1585
- secrets?: Record<string, {
1586
- required?: boolean | undefined;
1587
- services?: string[] | undefined;
1588
- description?: string | undefined;
1589
- }> | undefined;
1590
- triage?: {
1591
- maxTurns?: Partial<Record<"code-review" | "rules-validator", number>> | undefined;
1592
- timeoutMs?: number | undefined;
1593
- } | undefined;
1594
- }>;
1595
- export type HaystackConfig = z.infer<typeof HaystackConfigSchema>;
1596
- export type VerificationCommand = z.infer<typeof VerificationCommandSchema>;
1597
- export type FixtureEntry = z.infer<typeof FixtureEntrySchema>;
1598
- export type DevServer = z.infer<typeof DevServerSchema>;
1599
- export type Service = z.infer<typeof ServiceSchema>;
1600
- export type Verification = z.infer<typeof VerificationSchema>;
1601
- export type AuthStrategy = z.infer<typeof AuthStrategySchema>;
1602
- export type TokenInjection = z.infer<typeof TokenInjectionSchema>;
1603
- export type LoginStep = z.infer<typeof LoginStepSchema>;
1604
- export type TestAccount = z.infer<typeof TestAccountSchema>;
1605
- export type AuthConfig = z.infer<typeof AuthConfigSchema>;
1606
- export type AgenticTool = z.infer<typeof AgenticToolSchema>;
1607
- export type Agentic = z.infer<typeof AgenticSchema>;
1608
- export type DatabaseStrategy = z.infer<typeof DatabaseStrategySchema>;
1609
- export type DockerService = z.infer<typeof DockerServiceSchema>;
1610
- export type DatabaseConfig = z.infer<typeof DatabaseConfigSchema>;
1611
- export type NetworkConfig = z.infer<typeof NetworkConfigSchema>;
1612
- export type SecretDeclaration = z.infer<typeof SecretDeclarationSchema>;
1613
- export type MergeQueueConfig = z.infer<typeof MergeQueueConfigSchema>;
1614
- export type TriageConfig = z.infer<typeof TriageConfigSchema>;
1615
- export type Preferences = z.infer<typeof PreferencesSchema>;
1616
- /**
1617
- * Project detection results
1618
- */
1619
- export interface DetectedProject {
1620
- /** Detected framework */
1621
- framework?: 'vite' | 'nextjs' | 'remix' | 'nuxt' | 'sveltekit' | 'astro' | 'cra' | 'cloudflare-worker';
1622
- /** Detected package manager */
1623
- packageManager: 'npm' | 'pnpm' | 'yarn' | 'bun';
1624
- /** Whether this is a monorepo */
1625
- isMonorepo: boolean;
1626
- /** Monorepo tool if detected */
1627
- monorepoTool?: 'pnpm-workspaces' | 'lerna' | 'nx' | 'turborepo' | 'rush';
1628
- /** Detected services in monorepo */
1629
- services?: DetectedService[];
1630
- /** Suggested dev command */
1631
- suggestedDevCommand?: string;
1632
- /** Suggested port */
1633
- suggestedPort?: number;
1634
- /** Suggested ready pattern */
1635
- suggestedReadyPattern?: string;
1636
- /** Suggested auth bypass env var */
1637
- suggestedAuthBypass?: string;
1638
- }
1639
- /**
1640
- * Detected service in a monorepo
1641
- */
1642
- export interface DetectedService {
1643
- name: string;
1644
- root: string;
1645
- type: 'server' | 'batch';
1646
- framework?: string;
1647
- suggestedCommand?: string;
1648
- suggestedPort?: number;
1649
- /** Auto-detected dependencies from proxy configuration */
1650
- suggestedDependsOn?: string[];
1651
- }
1652
- /**
1653
- * Proxy dependency detection result
1654
- */
1655
- export interface ProxyDependency {
1656
- /** Proxy path pattern (e.g., "/api/review-chat") */
1657
- path: string;
1658
- /** Target port (e.g., 8787) */
1659
- port: number;
1660
- /** Target host (usually localhost) */
1661
- host: string;
1662
- /** Matched service name if found */
1663
- matchedService?: string;
1664
- }
1665
- /**
1666
- * Auth credentials stored in Haystack
1667
- */
1668
- export interface HaystackCredentials {
1669
- /** GitHub access token */
1670
- token: string;
1671
- /** Token expiration (ISO string) */
1672
- expiresAt?: string;
1673
- /** Associated GitHub username */
1674
- username?: string;
1675
- }
1676
- /**
1677
- * Stored secrets (in Haystack platform)
1678
- */
1679
- export interface StoredSecret {
1680
- key: string;
1681
- createdAt: string;
1682
- updatedAt: string;
1683
- }
1684
- export {};