@haystackeditor/cli 0.25.1 → 0.27.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 (109) hide show
  1. package/README.md +39 -463
  2. package/dist/capture/app-config.js +30 -6
  3. package/dist/commands/capture-brief.js +45 -35
  4. package/dist/commands/capture-contract.js +4 -4
  5. package/dist/commands/crawl-report.js +196 -0
  6. package/dist/commands/db-profile-upload.js +3 -3
  7. package/dist/commands/feedback.js +66 -0
  8. package/dist/commands/init-telemetry.js +55 -9
  9. package/dist/commands/init.js +8 -3
  10. package/dist/commands/lockfile-pin.js +307 -0
  11. package/dist/commands/telemetry-token.js +3 -3
  12. package/dist/commands/tokens.js +4 -4
  13. package/dist/commands/verify-explore.js +3 -3
  14. package/dist/commands/verify-history.js +2 -2
  15. package/dist/commands/verify-onboarding.js +13 -16
  16. package/dist/commands/verify-precompute.js +3 -4
  17. package/dist/commands/verify.js +31 -118
  18. package/dist/index.js +55 -968
  19. package/dist/schema.js +4 -10
  20. package/dist/utils/haystack-api.js +8 -36
  21. package/package.json +1 -5
  22. package/schemas/feedback.v1.json +13 -0
  23. package/schemas/pre-verify.v2.json +240 -0
  24. package/schemas/verify-raw.v1.json +1132 -0
  25. package/schemas/verify.v2.json +655 -0
  26. package/dist/assets/hooks/agent-context/detect.ts +0 -316
  27. package/dist/assets/hooks/agent-context/format.ts +0 -100
  28. package/dist/assets/hooks/agent-context/index.ts +0 -41
  29. package/dist/assets/hooks/agent-context/parsers/claude.ts +0 -262
  30. package/dist/assets/hooks/agent-context/parsers/codex.ts +0 -416
  31. package/dist/assets/hooks/agent-context/parsers/gemini.ts +0 -155
  32. package/dist/assets/hooks/agent-context/parsers/opencode.ts +0 -174
  33. package/dist/assets/hooks/agent-context/tsconfig.json +0 -14
  34. package/dist/assets/hooks/agent-context/types.ts +0 -58
  35. package/dist/assets/hooks/llm-rules-template.md +0 -59
  36. package/dist/assets/hooks/package-lock.json +0 -598
  37. package/dist/assets/hooks/package.json +0 -12
  38. package/dist/assets/hooks/scripts/commit-msg.sh +0 -5
  39. package/dist/assets/hooks/scripts/post-commit.sh +0 -5
  40. package/dist/assets/hooks/scripts/pre-commit.sh +0 -175
  41. package/dist/assets/hooks/scripts/pre-push.sh +0 -25
  42. package/dist/assets/hooks/scripts/prepare-commit-msg.sh +0 -5
  43. package/dist/assets/hooks/truncation-checker/ast-analyzer.ts +0 -528
  44. package/dist/assets/hooks/truncation-checker/index.ts +0 -595
  45. package/dist/assets/hooks/truncation-checker/tsconfig.json +0 -13
  46. package/dist/assets/skills/map-cloud-verifier-universe/SKILL.md +0 -2051
  47. package/dist/assets/skills/map-cloud-verifier-universe/agents/openai.yaml +0 -4
  48. package/dist/assets/skills/map-cloud-verifier-universe/references/output-contract.md +0 -3411
  49. package/dist/assets/skills/map-your-system.md +0 -143
  50. package/dist/assets/skills/submit.md +0 -200
  51. package/dist/commands/ask.js +0 -20
  52. package/dist/commands/cloud-verifier-behaviors.js +0 -218
  53. package/dist/commands/cloud-verifier-data-store-census.js +0 -539
  54. package/dist/commands/cloud-verifier-data-store-drift.js +0 -158
  55. package/dist/commands/cloud-verifier-identity-census.js +0 -4060
  56. package/dist/commands/cloud-verifier-materialization.js +0 -704
  57. package/dist/commands/cloud-verifier-pascal-selector-census.js +0 -1382
  58. package/dist/commands/cloud-verifier-python-manifest-selector-census.js +0 -2015
  59. package/dist/commands/cloud-verifier-specialized-operational-census.js +0 -11432
  60. package/dist/commands/cloud-verifier-universe.js +0 -10178
  61. package/dist/commands/config.js +0 -549
  62. package/dist/commands/design-verify.js +0 -311
  63. package/dist/commands/dismiss.js +0 -159
  64. package/dist/commands/hooks.js +0 -226
  65. package/dist/commands/inbox.js +0 -137
  66. package/dist/commands/mcp.js +0 -201
  67. package/dist/commands/policy.js +0 -371
  68. package/dist/commands/pr-status.js +0 -207
  69. package/dist/commands/pr.js +0 -105
  70. package/dist/commands/prepare-universe-review.js +0 -1092
  71. package/dist/commands/production-source-deny-policy.js +0 -100
  72. package/dist/commands/request-review.js +0 -74
  73. package/dist/commands/review.js +0 -191
  74. package/dist/commands/rules.js +0 -98
  75. package/dist/commands/scaffold-provisional-universe.js +0 -806
  76. package/dist/commands/setup.js +0 -1170
  77. package/dist/commands/skills.js +0 -447
  78. package/dist/commands/status.js +0 -35
  79. package/dist/commands/submit.js +0 -745
  80. package/dist/commands/system-map.js +0 -228
  81. package/dist/commands/triage.js +0 -598
  82. package/dist/commands/webhooks.js +0 -241
  83. package/dist/states.js +0 -46
  84. package/dist/tools/detect.js +0 -832
  85. package/dist/triage/astra.js +0 -202
  86. package/dist/triage/prompts.js +0 -188
  87. package/dist/triage/runner.js +0 -200
  88. package/dist/triage/types.js +0 -7
  89. package/dist/types.js +0 -326
  90. package/dist/utils/action-output.js +0 -26
  91. package/dist/utils/analysis-api.js +0 -416
  92. package/dist/utils/config.js +0 -54
  93. package/dist/utils/design-verifier-api.js +0 -294
  94. package/dist/utils/design-verifier-history.js +0 -79
  95. package/dist/utils/design-verifier-result.js +0 -424
  96. package/dist/utils/github-api.js +0 -324
  97. package/dist/utils/pending-state.js +0 -86
  98. package/dist/utils/pr-ref.js +0 -56
  99. package/dist/utils/prompter.js +0 -328
  100. package/schemas/action.v1.json +0 -22
  101. package/schemas/ask.v1.json +0 -40
  102. package/schemas/inbox.v1.json +0 -27
  103. package/schemas/pr-status.v1.json +0 -61
  104. package/schemas/pr.v1.json +0 -97
  105. package/schemas/pr.v3.json +0 -45
  106. package/schemas/setup.v1.json +0 -75
  107. package/schemas/submit.v1.json +0 -90
  108. package/schemas/triage.v1.json +0 -103
  109. package/schemas/triage.v2.json +0 -64
@@ -0,0 +1,1132 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://docs.haystackeditor.com/cli/schemas/verify-raw.v1.json",
4
+ "title": "Haystack verify --raw: the service's whole crawl record (CRAWL-V1)",
5
+ "description": "Machine-readable output of `haystack verify --raw`, for scripts. the caller's crawl of the exact captured checkout (its code and its change title), as GET /api/agent/cloud-verifier/crawls?repository=&workCommit= or, for a crawl the command just submitted, GET /api/agent/cloud-verifier/crawls/:runId?repository= returns it, or null when no crawl of the capture could be started. The crawl shapes mirror infra/lambda/haystack-design-verifier-shared/crawl_contracts.ts (with amendments 1, 8, 9, 10 and 11); that file wins where they differ. Crawl amendment 11 (schema 1.0.1): when the capture's base is not onboarded yet, `onboarding` is the base's OnboardingStatusV1 (onboarding_contracts.ts, APP-ONBOARDING-V1) and `crawl` is null until the app is ready; it is null when onboarding was not involved.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "crawl"
11
+ ],
12
+ "properties": {
13
+ "onboarding": {
14
+ "oneOf": [
15
+ {
16
+ "type": "null"
17
+ },
18
+ {
19
+ "$ref": "#/$defs/onboardingStatus"
20
+ }
21
+ ]
22
+ },
23
+ "schema_version": {
24
+ "const": "1.0.0"
25
+ },
26
+ "change": {
27
+ "description": "Schema 1.0.2: what this verify checked: the capture's base commit (where HEAD meets origin's default branch), its work commit (committed and uncommitted changes), and the files that differ between them.",
28
+ "type": "object",
29
+ "additionalProperties": false,
30
+ "required": [
31
+ "baseCommit",
32
+ "workCommit",
33
+ "files"
34
+ ],
35
+ "properties": {
36
+ "baseCommit": {
37
+ "$ref": "#/$defs/commit"
38
+ },
39
+ "workCommit": {
40
+ "$ref": "#/$defs/commit"
41
+ },
42
+ "files": {
43
+ "type": "array",
44
+ "items": {
45
+ "type": "string"
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "crawl": {
51
+ "oneOf": [
52
+ {
53
+ "type": "null"
54
+ },
55
+ {
56
+ "$ref": "#/$defs/crawlView"
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ "$defs": {
62
+ "onboardingBlock": {
63
+ "type": "object",
64
+ "required": [
65
+ "kind",
66
+ "stage",
67
+ "reason",
68
+ "evidence",
69
+ "ask"
70
+ ],
71
+ "properties": {
72
+ "kind": {
73
+ "enum": [
74
+ "not-enabled",
75
+ "no-web-app",
76
+ "unsupported",
77
+ "question",
78
+ "outside-credential",
79
+ "outside-dependency",
80
+ "evidence-too-large",
81
+ "budget",
82
+ "proof-failed"
83
+ ]
84
+ },
85
+ "stage": {
86
+ "enum": [
87
+ "admission",
88
+ "inventory",
89
+ "plan",
90
+ "runtime",
91
+ "boot",
92
+ "data",
93
+ "accounts",
94
+ "workflow",
95
+ "publish",
96
+ "cleanup"
97
+ ]
98
+ },
99
+ "reason": {
100
+ "type": "string"
101
+ },
102
+ "evidence": {
103
+ "$ref": "#/$defs/strings"
104
+ },
105
+ "names": {
106
+ "$ref": "#/$defs/strings"
107
+ },
108
+ "ask": {
109
+ "oneOf": [
110
+ {
111
+ "type": "null"
112
+ },
113
+ {
114
+ "type": "object",
115
+ "required": [
116
+ "message"
117
+ ],
118
+ "properties": {
119
+ "message": {
120
+ "type": "string"
121
+ },
122
+ "command": {
123
+ "type": "string"
124
+ },
125
+ "question": {
126
+ "type": "object",
127
+ "required": [
128
+ "id",
129
+ "choices"
130
+ ],
131
+ "properties": {
132
+ "id": {
133
+ "type": "string"
134
+ },
135
+ "choices": {
136
+ "$ref": "#/$defs/strings"
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
142
+ ]
143
+ }
144
+ }
145
+ },
146
+ "onboardingStatus": {
147
+ "type": "object",
148
+ "required": [
149
+ "version",
150
+ "repository",
151
+ "baseCommit",
152
+ "state",
153
+ "onboardRunId",
154
+ "recordDigest",
155
+ "checkpoint",
156
+ "block",
157
+ "dataAbsences",
158
+ "versionChoices"
159
+ ],
160
+ "properties": {
161
+ "version": {
162
+ "const": "app-onboarding-v1"
163
+ },
164
+ "repository": {
165
+ "type": "string"
166
+ },
167
+ "baseCommit": {
168
+ "$ref": "#/$defs/commit"
169
+ },
170
+ "state": {
171
+ "enum": [
172
+ "ready",
173
+ "onboarding",
174
+ "blocked",
175
+ "incomplete",
176
+ "cancelled",
177
+ "not-started"
178
+ ]
179
+ },
180
+ "onboardRunId": {
181
+ "oneOf": [
182
+ {
183
+ "type": "null"
184
+ },
185
+ {
186
+ "type": "string",
187
+ "pattern": "^ob_[0-9a-f]{48}$"
188
+ }
189
+ ]
190
+ },
191
+ "recordDigest": {
192
+ "oneOf": [
193
+ {
194
+ "type": "null"
195
+ },
196
+ {
197
+ "type": "string",
198
+ "pattern": "^[0-9a-f]{64}$"
199
+ }
200
+ ]
201
+ },
202
+ "checkpoint": {
203
+ "oneOf": [
204
+ {
205
+ "type": "null"
206
+ },
207
+ {
208
+ "type": "object",
209
+ "required": [
210
+ "status",
211
+ "stage",
212
+ "execution",
213
+ "owned"
214
+ ],
215
+ "properties": {
216
+ "status": {
217
+ "enum": [
218
+ "queued",
219
+ "running",
220
+ "cleanup-pending",
221
+ "published",
222
+ "reused",
223
+ "blocked",
224
+ "incomplete",
225
+ "cancelled"
226
+ ]
227
+ },
228
+ "stage": {
229
+ "enum": [
230
+ "inventory",
231
+ "plan",
232
+ "runtime",
233
+ "boot",
234
+ "data",
235
+ "accounts",
236
+ "workflow",
237
+ "publish",
238
+ "cleanup"
239
+ ]
240
+ },
241
+ "owned": {
242
+ "$ref": "#/$defs/strings"
243
+ },
244
+ "execution": {
245
+ "type": "object",
246
+ "required": [
247
+ "stages"
248
+ ],
249
+ "properties": {
250
+ "stages": {
251
+ "type": "array",
252
+ "items": {
253
+ "type": "object",
254
+ "required": [
255
+ "stage",
256
+ "status"
257
+ ],
258
+ "properties": {
259
+ "stage": {
260
+ "enum": [
261
+ "inventory",
262
+ "plan",
263
+ "runtime",
264
+ "boot",
265
+ "data",
266
+ "accounts",
267
+ "workflow",
268
+ "publish",
269
+ "cleanup"
270
+ ]
271
+ },
272
+ "status": {
273
+ "enum": [
274
+ "pending",
275
+ "running",
276
+ "ok",
277
+ "reused",
278
+ "failed",
279
+ "blocked"
280
+ ]
281
+ }
282
+ }
283
+ }
284
+ }
285
+ }
286
+ }
287
+ }
288
+ }
289
+ ]
290
+ },
291
+ "block": {
292
+ "oneOf": [
293
+ {
294
+ "type": "null"
295
+ },
296
+ {
297
+ "$ref": "#/$defs/onboardingBlock"
298
+ }
299
+ ]
300
+ },
301
+ "dataAbsences": {
302
+ "$ref": "#/$defs/strings"
303
+ },
304
+ "versionChoices": {
305
+ "$ref": "#/$defs/strings"
306
+ }
307
+ }
308
+ },
309
+ "runId": {
310
+ "type": "string",
311
+ "pattern": "^cv_[0-9a-f]{48}$"
312
+ },
313
+ "commit": {
314
+ "type": "string",
315
+ "pattern": "^[0-9a-f]{40}$"
316
+ },
317
+ "count": {
318
+ "type": "integer",
319
+ "minimum": 0
320
+ },
321
+ "timestamp": {
322
+ "type": [
323
+ "string",
324
+ "null"
325
+ ],
326
+ "format": "date-time"
327
+ },
328
+ "status": {
329
+ "enum": [
330
+ "queued",
331
+ "preparing",
332
+ "crawling",
333
+ "draining",
334
+ "completed",
335
+ "prepared",
336
+ "incomplete",
337
+ "cancelled"
338
+ ]
339
+ },
340
+ "stage": {
341
+ "enum": [
342
+ "reconcile",
343
+ "source",
344
+ "worlds",
345
+ "blast",
346
+ "knobs",
347
+ "prepare",
348
+ "crawl",
349
+ "publish",
350
+ "cleanup"
351
+ ]
352
+ },
353
+ "spotStage": {
354
+ "enum": [
355
+ "resolved",
356
+ "loaded",
357
+ "exposed",
358
+ "activated",
359
+ "pressed",
360
+ "observed",
361
+ "confirmed",
362
+ "judged"
363
+ ]
364
+ },
365
+ "reuseValue": {
366
+ "enum": [
367
+ "hit",
368
+ "miss",
369
+ null
370
+ ]
371
+ },
372
+ "reuse": {
373
+ "type": "object",
374
+ "required": [
375
+ "baseWorld",
376
+ "headWorld",
377
+ "prepare",
378
+ "routes"
379
+ ],
380
+ "properties": {
381
+ "baseWorld": {
382
+ "$ref": "#/$defs/reuseValue"
383
+ },
384
+ "headWorld": {
385
+ "$ref": "#/$defs/reuseValue"
386
+ },
387
+ "prepare": {
388
+ "$ref": "#/$defs/reuseValue"
389
+ },
390
+ "routes": {
391
+ "$ref": "#/$defs/reuseValue"
392
+ }
393
+ }
394
+ },
395
+ "error": {
396
+ "type": "object",
397
+ "required": [
398
+ "code",
399
+ "stage",
400
+ "message"
401
+ ],
402
+ "properties": {
403
+ "code": {
404
+ "enum": [
405
+ "source-mismatch",
406
+ "blast-unavailable",
407
+ "world-build-failed",
408
+ "prepare-failed",
409
+ "crawl-failed",
410
+ "no-capacity",
411
+ "stalled",
412
+ "lease-lost",
413
+ "cancelled"
414
+ ]
415
+ },
416
+ "stage": {
417
+ "$ref": "#/$defs/stage"
418
+ },
419
+ "message": {
420
+ "type": "string"
421
+ }
422
+ }
423
+ },
424
+ "strings": {
425
+ "type": "array",
426
+ "items": {
427
+ "type": "string"
428
+ }
429
+ },
430
+ "finding": {
431
+ "type": "object",
432
+ "required": [
433
+ "id",
434
+ "verdict",
435
+ "why",
436
+ "start",
437
+ "steps",
438
+ "observed",
439
+ "codeThatRan",
440
+ "confirmedAtSeconds",
441
+ "images"
442
+ ],
443
+ "properties": {
444
+ "id": {
445
+ "type": "string"
446
+ },
447
+ "verdict": {
448
+ "enum": [
449
+ "bug",
450
+ "not-a-bug",
451
+ "cant-tell",
452
+ "being-judged"
453
+ ]
454
+ },
455
+ "why": {
456
+ "type": [
457
+ "string",
458
+ "null"
459
+ ]
460
+ },
461
+ "start": {
462
+ "type": "string",
463
+ "description": "Where the replay starts."
464
+ },
465
+ "steps": {
466
+ "type": "array",
467
+ "maxItems": 64,
468
+ "items": {
469
+ "type": "string"
470
+ }
471
+ },
472
+ "observed": {
473
+ "type": "object"
474
+ },
475
+ "codeThatRan": {
476
+ "type": "object"
477
+ },
478
+ "confirmedAtSeconds": {
479
+ "type": "number",
480
+ "minimum": 0
481
+ },
482
+ "images": {
483
+ "type": "object",
484
+ "required": [
485
+ "old",
486
+ "new"
487
+ ],
488
+ "properties": {
489
+ "old": {
490
+ "type": [
491
+ "string",
492
+ "null"
493
+ ]
494
+ },
495
+ "new": {
496
+ "type": [
497
+ "string",
498
+ "null"
499
+ ]
500
+ }
501
+ }
502
+ },
503
+ "standIns": {
504
+ "description": "CRAWL-V1 amendment 13, only when the app's copies answer outside services (sign-in, mail, payments...) with Haystack stand-ins: the calls to them on the path this finding was judged on, per build, one line per distinct call ('<unsupported|mutates> <provider>: <operation>', the phase added in parentheses when not run). 'unsupported': the stand-in could not serve the call, so the copy did not behave as production would there.",
505
+ "type": "object",
506
+ "required": [
507
+ "old",
508
+ "new"
509
+ ],
510
+ "properties": {
511
+ "old": {
512
+ "type": "array",
513
+ "maxItems": 20,
514
+ "items": {
515
+ "type": "string"
516
+ }
517
+ },
518
+ "new": {
519
+ "type": "array",
520
+ "maxItems": 20,
521
+ "items": {
522
+ "type": "string"
523
+ }
524
+ }
525
+ }
526
+ }
527
+ }
528
+ },
529
+ "standInRow": {
530
+ "description": "CRAWL-V1 amendment 13: one distinct outside-service call the crawl's stand-ins logged, with its count in each build: how many times the copy's calls reached the stand-in across the crawl's preparation and all its replays (double-checks and re-walks included), not how many user actions did.",
531
+ "type": "object",
532
+ "required": [
533
+ "provider",
534
+ "operation",
535
+ "kind",
536
+ "phase",
537
+ "old",
538
+ "new"
539
+ ],
540
+ "properties": {
541
+ "provider": {
542
+ "type": "string"
543
+ },
544
+ "operation": {
545
+ "type": "string"
546
+ },
547
+ "kind": {
548
+ "enum": [
549
+ "unsupported",
550
+ "mutates"
551
+ ]
552
+ },
553
+ "phase": {
554
+ "enum": [
555
+ "build",
556
+ "boot",
557
+ "run"
558
+ ]
559
+ },
560
+ "old": {
561
+ "$ref": "#/$defs/count"
562
+ },
563
+ "new": {
564
+ "$ref": "#/$defs/count"
565
+ }
566
+ }
567
+ },
568
+ "spot": {
569
+ "description": "One changed spot (one hunk of a changed file) and how far the crawl got with it: the change's product blast radius.",
570
+ "type": "object",
571
+ "required": [
572
+ "id",
573
+ "file",
574
+ "line",
575
+ "furthest",
576
+ "reachedBy",
577
+ "shows",
578
+ "findingIds"
579
+ ],
580
+ "properties": {
581
+ "id": {
582
+ "type": "string",
583
+ "description": "<file>#<n>: the file's n-th hunk, 1-based."
584
+ },
585
+ "file": {
586
+ "type": "string"
587
+ },
588
+ "line": {
589
+ "type": "integer",
590
+ "minimum": 1
591
+ },
592
+ "furthest": {
593
+ "oneOf": [
594
+ {
595
+ "type": "null"
596
+ },
597
+ {
598
+ "$ref": "#/$defs/spotStage"
599
+ }
600
+ ]
601
+ },
602
+ "reachedBy": {
603
+ "oneOf": [
604
+ {
605
+ "type": "null"
606
+ },
607
+ {
608
+ "type": "object",
609
+ "required": [
610
+ "stage",
611
+ "start",
612
+ "steps",
613
+ "page"
614
+ ],
615
+ "properties": {
616
+ "stage": {
617
+ "$ref": "#/$defs/spotStage"
618
+ },
619
+ "start": {
620
+ "type": "string"
621
+ },
622
+ "steps": {
623
+ "$ref": "#/$defs/strings"
624
+ },
625
+ "page": {
626
+ "type": [
627
+ "string",
628
+ "null"
629
+ ]
630
+ }
631
+ }
632
+ }
633
+ ]
634
+ },
635
+ "shows": {
636
+ "type": "array",
637
+ "maxItems": 5,
638
+ "items": {
639
+ "type": "string"
640
+ }
641
+ },
642
+ "findingIds": {
643
+ "$ref": "#/$defs/strings"
644
+ }
645
+ }
646
+ },
647
+ "results": {
648
+ "description": "The published results' shape, shared by the sealed manifest and an answer; each sets its own status.",
649
+ "type": "object",
650
+ "required": [
651
+ "schemaVersion",
652
+ "runId",
653
+ "attemptId",
654
+ "repository",
655
+ "baseCommit",
656
+ "workCommit",
657
+ "treeSha",
658
+ "changeTitle",
659
+ "status",
660
+ "worlds",
661
+ "reuse",
662
+ "timings",
663
+ "bugs",
664
+ "findings",
665
+ "reach",
666
+ "notFinishedInTime",
667
+ "error"
668
+ ],
669
+ "properties": {
670
+ "schemaVersion": {
671
+ "const": 1
672
+ },
673
+ "runId": {
674
+ "$ref": "#/$defs/runId"
675
+ },
676
+ "attemptId": {
677
+ "type": "string"
678
+ },
679
+ "repository": {
680
+ "type": "string"
681
+ },
682
+ "baseCommit": {
683
+ "$ref": "#/$defs/commit"
684
+ },
685
+ "workCommit": {
686
+ "$ref": "#/$defs/commit"
687
+ },
688
+ "treeSha": {
689
+ "$ref": "#/$defs/commit"
690
+ },
691
+ "changeTitle": {
692
+ "type": "string",
693
+ "maxLength": 200
694
+ },
695
+ "worlds": {
696
+ "oneOf": [
697
+ {
698
+ "type": "null"
699
+ },
700
+ {
701
+ "type": "object",
702
+ "required": [
703
+ "base",
704
+ "head"
705
+ ],
706
+ "properties": {
707
+ "base": {
708
+ "type": "string"
709
+ },
710
+ "head": {
711
+ "type": "string"
712
+ }
713
+ }
714
+ }
715
+ ]
716
+ },
717
+ "reuse": {
718
+ "$ref": "#/$defs/reuse"
719
+ },
720
+ "timings": {
721
+ "description": "Milliseconds per stage, as measured.",
722
+ "type": "object",
723
+ "additionalProperties": {
724
+ "type": "number",
725
+ "minimum": 0
726
+ }
727
+ },
728
+ "bugs": {
729
+ "$ref": "#/$defs/count"
730
+ },
731
+ "findings": {
732
+ "type": "array",
733
+ "maxItems": 50,
734
+ "items": {
735
+ "$ref": "#/$defs/finding"
736
+ }
737
+ },
738
+ "reach": {
739
+ "type": "object",
740
+ "required": [
741
+ "spots",
742
+ "unreachedChangedFiles",
743
+ "blast"
744
+ ],
745
+ "properties": {
746
+ "spots": {
747
+ "type": "array",
748
+ "items": {
749
+ "$ref": "#/$defs/spot"
750
+ }
751
+ },
752
+ "unreachedChangedFiles": {
753
+ "$ref": "#/$defs/strings"
754
+ },
755
+ "blast": {
756
+ "oneOf": [
757
+ {
758
+ "type": "null"
759
+ },
760
+ {
761
+ "type": "object",
762
+ "required": [
763
+ "functions",
764
+ "ran",
765
+ "unreached",
766
+ "nearestUnreached"
767
+ ],
768
+ "properties": {
769
+ "functions": {
770
+ "$ref": "#/$defs/count"
771
+ },
772
+ "ran": {
773
+ "$ref": "#/$defs/count"
774
+ },
775
+ "unreached": {
776
+ "$ref": "#/$defs/count"
777
+ },
778
+ "nearestUnreached": {
779
+ "$ref": "#/$defs/strings"
780
+ }
781
+ }
782
+ }
783
+ ]
784
+ }
785
+ }
786
+ },
787
+ "standIns": {
788
+ "description": "CRAWL-V1 amendment 13, only when the app's copies answer outside services with Haystack stand-ins: every distinct call the crawl's stand-ins logged, both builds alike (at most 200 rows, the rest counted in omittedRows), and each call a stand-in could not serve as a gap line ('<provider>: <operation> (only without your change|only with your change|with and without your change)'). Gaps are missing coverage of the copy, never findings.",
789
+ "type": "object",
790
+ "required": [
791
+ "coverage",
792
+ "omittedRows",
793
+ "gaps"
794
+ ],
795
+ "properties": {
796
+ "coverage": {
797
+ "type": "array",
798
+ "maxItems": 200,
799
+ "items": {
800
+ "$ref": "#/$defs/standInRow"
801
+ }
802
+ },
803
+ "omittedRows": {
804
+ "$ref": "#/$defs/count"
805
+ },
806
+ "gaps": {
807
+ "type": "array",
808
+ "maxItems": 200,
809
+ "items": {
810
+ "type": "string"
811
+ }
812
+ }
813
+ }
814
+ },
815
+ "ideas": {
816
+ "description": "CRAWL-V1 amendment 17, only when `--idea` or `--ideas-file` gave ideas: one entry per idea in the order given. 'covered': an independent review saw it done in both builds; 'blocked': it could not be done in this copy (reason says why); 'unfinished': the crawl's time ended first. findingIds names the findings found while exploring it.",
817
+ "type": "array",
818
+ "maxItems": 64,
819
+ "items": {
820
+ "type": "object",
821
+ "required": [
822
+ "id",
823
+ "text",
824
+ "state",
825
+ "reason",
826
+ "findingIds"
827
+ ],
828
+ "properties": {
829
+ "id": {
830
+ "type": "string",
831
+ "pattern": "^idea-[1-9][0-9]*$"
832
+ },
833
+ "text": {
834
+ "type": "string"
835
+ },
836
+ "state": {
837
+ "enum": [
838
+ "covered",
839
+ "blocked",
840
+ "unfinished"
841
+ ]
842
+ },
843
+ "reason": {
844
+ "type": "string"
845
+ },
846
+ "findingIds": {
847
+ "$ref": "#/$defs/strings"
848
+ }
849
+ }
850
+ }
851
+ },
852
+ "brief": {
853
+ "description": "CRAWL-V1 amendment 18: what Haystack knew of the change before exploring it (see `haystack schema pre-verify`, $defs.brief); absent when the run ended before its prepare.",
854
+ "type": "object",
855
+ "required": [
856
+ "functions",
857
+ "leftOut",
858
+ "planning"
859
+ ]
860
+ },
861
+ "notFinishedInTime": {
862
+ "$ref": "#/$defs/count"
863
+ },
864
+ "error": {
865
+ "oneOf": [
866
+ {
867
+ "type": "null"
868
+ },
869
+ {
870
+ "$ref": "#/$defs/error"
871
+ }
872
+ ]
873
+ }
874
+ }
875
+ },
876
+ "manifest": {
877
+ "description": "Present once the crawl is terminal and published. 'prepared' (CRAWL-V1 amendment 12): the change was built and frozen by the turn-end hook and not crawled.",
878
+ "allOf": [
879
+ {
880
+ "$ref": "#/$defs/results"
881
+ }
882
+ ],
883
+ "properties": {
884
+ "status": {
885
+ "enum": [
886
+ "completed",
887
+ "prepared",
888
+ "incomplete",
889
+ "cancelled"
890
+ ]
891
+ }
892
+ }
893
+ },
894
+ "answer": {
895
+ "description": "CRAWL-V1 amendment 9: the current attempt's latest answer while no sealed manifest exists: what the crawl found so far (exploring), or its answer once its time is up (answered), with the same findings and reach the sealed manifest will carry. Its findings carry no images.",
896
+ "allOf": [
897
+ {
898
+ "$ref": "#/$defs/results"
899
+ }
900
+ ],
901
+ "required": [
902
+ "n",
903
+ "atSeconds"
904
+ ],
905
+ "properties": {
906
+ "status": {
907
+ "enum": [
908
+ "exploring",
909
+ "answered"
910
+ ]
911
+ },
912
+ "n": {
913
+ "type": "integer",
914
+ "minimum": 1,
915
+ "description": "The attempt's answers are numbered from 1."
916
+ },
917
+ "atSeconds": {
918
+ "type": "integer",
919
+ "minimum": 0,
920
+ "description": "How far into the crawl stage it was written."
921
+ }
922
+ }
923
+ },
924
+ "crawlView": {
925
+ "type": "object",
926
+ "required": [
927
+ "runId",
928
+ "repository",
929
+ "baseCommit",
930
+ "workCommit",
931
+ "treeSha",
932
+ "changeTitle",
933
+ "budgetMs",
934
+ "observedAt",
935
+ "createdAt",
936
+ "updatedAt",
937
+ "supersededBy",
938
+ "cancelRequested",
939
+ "manifest",
940
+ "answer",
941
+ "status",
942
+ "stage",
943
+ "clocks",
944
+ "reuse",
945
+ "worlds",
946
+ "totals"
947
+ ],
948
+ "properties": {
949
+ "runId": {
950
+ "$ref": "#/$defs/runId"
951
+ },
952
+ "repository": {
953
+ "type": "string",
954
+ "pattern": "^[A-Za-z0-9_.-]{1,100}/[A-Za-z0-9_.-]{1,100}$"
955
+ },
956
+ "baseCommit": {
957
+ "$ref": "#/$defs/commit"
958
+ },
959
+ "workCommit": {
960
+ "$ref": "#/$defs/commit"
961
+ },
962
+ "treeSha": {
963
+ "$ref": "#/$defs/commit"
964
+ },
965
+ "changeTitle": {
966
+ "type": "string",
967
+ "maxLength": 200
968
+ },
969
+ "budgetMs": {
970
+ "description": "The time the crawl was asked for (ms), or null for the service's default.",
971
+ "oneOf": [
972
+ {
973
+ "type": "null"
974
+ },
975
+ {
976
+ "type": "integer",
977
+ "minimum": 60000,
978
+ "maximum": 1800000
979
+ }
980
+ ]
981
+ },
982
+ "observedAt": {
983
+ "$ref": "#/$defs/count"
984
+ },
985
+ "createdAt": {
986
+ "type": "string",
987
+ "format": "date-time"
988
+ },
989
+ "updatedAt": {
990
+ "type": "string",
991
+ "format": "date-time"
992
+ },
993
+ "supersededBy": {
994
+ "oneOf": [
995
+ {
996
+ "type": "null"
997
+ },
998
+ {
999
+ "$ref": "#/$defs/runId"
1000
+ }
1001
+ ]
1002
+ },
1003
+ "cancelRequested": {
1004
+ "type": "boolean"
1005
+ },
1006
+ "mode": {
1007
+ "enum": [
1008
+ "prepare",
1009
+ "crawl"
1010
+ ],
1011
+ "description": "CRAWL-V1 amendment 12: 'prepare' builds and freezes only (the turn-end hook); 'crawl' checks the change."
1012
+ },
1013
+ "status": {
1014
+ "$ref": "#/$defs/status"
1015
+ },
1016
+ "stage": {
1017
+ "$ref": "#/$defs/stage"
1018
+ },
1019
+ "clocks": {
1020
+ "type": "object",
1021
+ "required": [
1022
+ "startedAt",
1023
+ "stageStartedAt",
1024
+ "crawlStartedAt",
1025
+ "finishedAt",
1026
+ "crawlBudgetMs"
1027
+ ],
1028
+ "properties": {
1029
+ "startedAt": {
1030
+ "$ref": "#/$defs/timestamp"
1031
+ },
1032
+ "stageStartedAt": {
1033
+ "$ref": "#/$defs/timestamp"
1034
+ },
1035
+ "crawlStartedAt": {
1036
+ "$ref": "#/$defs/timestamp"
1037
+ },
1038
+ "finishedAt": {
1039
+ "$ref": "#/$defs/timestamp"
1040
+ },
1041
+ "crawlBudgetMs": {
1042
+ "$ref": "#/$defs/count"
1043
+ }
1044
+ }
1045
+ },
1046
+ "reuse": {
1047
+ "$ref": "#/$defs/reuse"
1048
+ },
1049
+ "worlds": {
1050
+ "type": "object",
1051
+ "required": [
1052
+ "base",
1053
+ "head"
1054
+ ],
1055
+ "properties": {
1056
+ "base": {
1057
+ "type": [
1058
+ "string",
1059
+ "null"
1060
+ ]
1061
+ },
1062
+ "head": {
1063
+ "type": [
1064
+ "string",
1065
+ "null"
1066
+ ]
1067
+ }
1068
+ }
1069
+ },
1070
+ "totals": {
1071
+ "type": "object",
1072
+ "required": [
1073
+ "clicks",
1074
+ "differing",
1075
+ "confirmed",
1076
+ "bugs",
1077
+ "vmsLaunched",
1078
+ "cleanupProven",
1079
+ "cleanupUnproven"
1080
+ ],
1081
+ "properties": {
1082
+ "clicks": {
1083
+ "$ref": "#/$defs/count"
1084
+ },
1085
+ "differing": {
1086
+ "$ref": "#/$defs/count"
1087
+ },
1088
+ "confirmed": {
1089
+ "$ref": "#/$defs/count"
1090
+ },
1091
+ "bugs": {
1092
+ "$ref": "#/$defs/count"
1093
+ },
1094
+ "vmsLaunched": {
1095
+ "$ref": "#/$defs/count"
1096
+ },
1097
+ "cleanupProven": {
1098
+ "$ref": "#/$defs/count"
1099
+ },
1100
+ "cleanupUnproven": {
1101
+ "$ref": "#/$defs/count"
1102
+ }
1103
+ }
1104
+ },
1105
+ "error": {
1106
+ "$ref": "#/$defs/error"
1107
+ },
1108
+ "manifest": {
1109
+ "oneOf": [
1110
+ {
1111
+ "type": "null"
1112
+ },
1113
+ {
1114
+ "$ref": "#/$defs/manifest"
1115
+ }
1116
+ ]
1117
+ },
1118
+ "answer": {
1119
+ "description": "Null once the sealed manifest exists, and before the crawl's first answer.",
1120
+ "oneOf": [
1121
+ {
1122
+ "type": "null"
1123
+ },
1124
+ {
1125
+ "$ref": "#/$defs/answer"
1126
+ }
1127
+ ]
1128
+ }
1129
+ }
1130
+ }
1131
+ }
1132
+ }