@haystackeditor/cli 0.18.0 → 0.20.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.
@@ -2,12 +2,33 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://docs.haystackeditor.com/cli/schemas/verify.v1.json",
4
4
  "title": "Haystack verify: the crawl of the current change (CRAWL-V1)",
5
- "description": "Machine-readable output of `haystack verify --json`: 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 amendment 1); that file wins where they differ.",
5
+ "description": "Machine-readable output of `haystack verify --json`: 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
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": ["schema_version", "crawl"],
9
9
  "properties": {
10
- "schema_version": { "const": "1.0.0" },
10
+ "onboarding": {
11
+ "oneOf": [
12
+ {
13
+ "type": "null"
14
+ },
15
+ {
16
+ "$ref": "#/$defs/onboardingStatus"
17
+ }
18
+ ]
19
+ },
20
+ "schema_version": { "const": "1.0.2" },
21
+ "change": {
22
+ "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.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["baseCommit", "workCommit", "files"],
26
+ "properties": {
27
+ "baseCommit": { "$ref": "#/$defs/commit" },
28
+ "workCommit": { "$ref": "#/$defs/commit" },
29
+ "files": { "type": "array", "items": { "type": "string" } }
30
+ }
31
+ },
11
32
  "crawl": {
12
33
  "oneOf": [
13
34
  { "type": "null" },
@@ -16,6 +37,253 @@
16
37
  }
17
38
  },
18
39
  "$defs": {
40
+ "onboardingBlock": {
41
+ "type": "object",
42
+ "required": [
43
+ "kind",
44
+ "stage",
45
+ "reason",
46
+ "evidence",
47
+ "ask"
48
+ ],
49
+ "properties": {
50
+ "kind": {
51
+ "enum": [
52
+ "not-enabled",
53
+ "no-web-app",
54
+ "unsupported",
55
+ "question",
56
+ "outside-credential",
57
+ "outside-dependency",
58
+ "evidence-too-large",
59
+ "budget",
60
+ "proof-failed"
61
+ ]
62
+ },
63
+ "stage": {
64
+ "enum": [
65
+ "admission",
66
+ "inventory",
67
+ "plan",
68
+ "runtime",
69
+ "boot",
70
+ "data",
71
+ "accounts",
72
+ "workflow",
73
+ "publish",
74
+ "cleanup"
75
+ ]
76
+ },
77
+ "reason": {
78
+ "type": "string"
79
+ },
80
+ "evidence": {
81
+ "$ref": "#/$defs/strings"
82
+ },
83
+ "names": {
84
+ "$ref": "#/$defs/strings"
85
+ },
86
+ "ask": {
87
+ "oneOf": [
88
+ {
89
+ "type": "null"
90
+ },
91
+ {
92
+ "type": "object",
93
+ "required": [
94
+ "message"
95
+ ],
96
+ "properties": {
97
+ "message": {
98
+ "type": "string"
99
+ },
100
+ "command": {
101
+ "type": "string"
102
+ },
103
+ "question": {
104
+ "type": "object",
105
+ "required": [
106
+ "id",
107
+ "choices"
108
+ ],
109
+ "properties": {
110
+ "id": {
111
+ "type": "string"
112
+ },
113
+ "choices": {
114
+ "$ref": "#/$defs/strings"
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ ]
121
+ }
122
+ }
123
+ },
124
+ "onboardingStatus": {
125
+ "type": "object",
126
+ "required": [
127
+ "version",
128
+ "repository",
129
+ "baseCommit",
130
+ "state",
131
+ "onboardRunId",
132
+ "recordDigest",
133
+ "checkpoint",
134
+ "block",
135
+ "dataAbsences",
136
+ "versionChoices"
137
+ ],
138
+ "properties": {
139
+ "version": {
140
+ "const": "app-onboarding-v1"
141
+ },
142
+ "repository": {
143
+ "type": "string"
144
+ },
145
+ "baseCommit": {
146
+ "$ref": "#/$defs/commit"
147
+ },
148
+ "state": {
149
+ "enum": [
150
+ "ready",
151
+ "onboarding",
152
+ "blocked",
153
+ "incomplete",
154
+ "cancelled",
155
+ "not-started"
156
+ ]
157
+ },
158
+ "onboardRunId": {
159
+ "oneOf": [
160
+ {
161
+ "type": "null"
162
+ },
163
+ {
164
+ "type": "string",
165
+ "pattern": "^ob_[0-9a-f]{48}$"
166
+ }
167
+ ]
168
+ },
169
+ "recordDigest": {
170
+ "oneOf": [
171
+ {
172
+ "type": "null"
173
+ },
174
+ {
175
+ "type": "string",
176
+ "pattern": "^[0-9a-f]{64}$"
177
+ }
178
+ ]
179
+ },
180
+ "checkpoint": {
181
+ "oneOf": [
182
+ {
183
+ "type": "null"
184
+ },
185
+ {
186
+ "type": "object",
187
+ "required": [
188
+ "status",
189
+ "stage",
190
+ "execution",
191
+ "owned"
192
+ ],
193
+ "properties": {
194
+ "status": {
195
+ "enum": [
196
+ "queued",
197
+ "running",
198
+ "cleanup-pending",
199
+ "published",
200
+ "reused",
201
+ "blocked",
202
+ "incomplete",
203
+ "cancelled"
204
+ ]
205
+ },
206
+ "stage": {
207
+ "enum": [
208
+ "inventory",
209
+ "plan",
210
+ "runtime",
211
+ "boot",
212
+ "data",
213
+ "accounts",
214
+ "workflow",
215
+ "publish",
216
+ "cleanup"
217
+ ]
218
+ },
219
+ "owned": {
220
+ "$ref": "#/$defs/strings"
221
+ },
222
+ "execution": {
223
+ "type": "object",
224
+ "required": [
225
+ "stages"
226
+ ],
227
+ "properties": {
228
+ "stages": {
229
+ "type": "array",
230
+ "items": {
231
+ "type": "object",
232
+ "required": [
233
+ "stage",
234
+ "status"
235
+ ],
236
+ "properties": {
237
+ "stage": {
238
+ "enum": [
239
+ "inventory",
240
+ "plan",
241
+ "runtime",
242
+ "boot",
243
+ "data",
244
+ "accounts",
245
+ "workflow",
246
+ "publish",
247
+ "cleanup"
248
+ ]
249
+ },
250
+ "status": {
251
+ "enum": [
252
+ "pending",
253
+ "running",
254
+ "ok",
255
+ "reused",
256
+ "failed",
257
+ "blocked"
258
+ ]
259
+ }
260
+ }
261
+ }
262
+ }
263
+ }
264
+ }
265
+ }
266
+ }
267
+ ]
268
+ },
269
+ "block": {
270
+ "oneOf": [
271
+ {
272
+ "type": "null"
273
+ },
274
+ {
275
+ "$ref": "#/$defs/onboardingBlock"
276
+ }
277
+ ]
278
+ },
279
+ "dataAbsences": {
280
+ "$ref": "#/$defs/strings"
281
+ },
282
+ "versionChoices": {
283
+ "$ref": "#/$defs/strings"
284
+ }
285
+ }
286
+ },
19
287
  "runId": { "type": "string", "pattern": "^cv_[0-9a-f]{48}$" },
20
288
  "commit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
21
289
  "count": { "type": "integer", "minimum": 0 },
@@ -97,8 +365,8 @@
97
365
  "findingIds": { "$ref": "#/$defs/strings" }
98
366
  }
99
367
  },
100
- "manifest": {
101
- "description": "Present once the crawl is terminal and published.",
368
+ "results": {
369
+ "description": "The published results' shape, shared by the sealed manifest and an answer; each sets its own status.",
102
370
  "type": "object",
103
371
  "required": ["schemaVersion", "runId", "attemptId", "repository", "baseCommit", "workCommit", "treeSha",
104
372
  "changeTitle", "status", "worlds", "reuse", "timings", "bugs", "findings", "reach", "notFinishedInTime", "error"],
@@ -111,7 +379,6 @@
111
379
  "workCommit": { "$ref": "#/$defs/commit" },
112
380
  "treeSha": { "$ref": "#/$defs/commit" },
113
381
  "changeTitle": { "type": "string", "maxLength": 200 },
114
- "status": { "enum": ["completed", "incomplete", "cancelled"] },
115
382
  "worlds": {
116
383
  "oneOf": [
117
384
  { "type": "null" },
@@ -157,10 +424,27 @@
157
424
  "error": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/error" }] }
158
425
  }
159
426
  },
427
+ "manifest": {
428
+ "description": "Present once the crawl is terminal and published.",
429
+ "allOf": [{ "$ref": "#/$defs/results" }],
430
+ "properties": {
431
+ "status": { "enum": ["completed", "incomplete", "cancelled"] }
432
+ }
433
+ },
434
+ "answer": {
435
+ "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.",
436
+ "allOf": [{ "$ref": "#/$defs/results" }],
437
+ "required": ["n", "atSeconds"],
438
+ "properties": {
439
+ "status": { "enum": ["exploring", "answered"] },
440
+ "n": { "type": "integer", "minimum": 1, "description": "The attempt's answers are numbered from 1." },
441
+ "atSeconds": { "type": "integer", "minimum": 0, "description": "How far into the crawl stage it was written." }
442
+ }
443
+ },
160
444
  "crawlView": {
161
445
  "type": "object",
162
- "required": ["runId", "repository", "baseCommit", "workCommit", "treeSha", "changeTitle", "observedAt",
163
- "createdAt", "updatedAt", "supersededBy", "cancelRequested", "manifest", "status", "stage", "clocks",
446
+ "required": ["runId", "repository", "baseCommit", "workCommit", "treeSha", "changeTitle", "budgetMs", "observedAt",
447
+ "createdAt", "updatedAt", "supersededBy", "cancelRequested", "manifest", "answer", "status", "stage", "clocks",
164
448
  "reuse", "worlds", "totals"],
165
449
  "properties": {
166
450
  "runId": { "$ref": "#/$defs/runId" },
@@ -169,6 +453,8 @@
169
453
  "workCommit": { "$ref": "#/$defs/commit" },
170
454
  "treeSha": { "$ref": "#/$defs/commit" },
171
455
  "changeTitle": { "type": "string", "maxLength": 200 },
456
+ "budgetMs": { "description": "The time the crawl was asked for (ms), or null for the service's default.",
457
+ "oneOf": [{ "type": "null" }, { "type": "integer", "minimum": 60000, "maximum": 1800000 }] },
172
458
  "observedAt": { "$ref": "#/$defs/count" },
173
459
  "createdAt": { "type": "string", "format": "date-time" },
174
460
  "updatedAt": { "type": "string", "format": "date-time" },
@@ -210,7 +496,9 @@
210
496
  }
211
497
  },
212
498
  "error": { "$ref": "#/$defs/error" },
213
- "manifest": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/manifest" }] }
499
+ "manifest": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/manifest" }] },
500
+ "answer": { "description": "Null once the sealed manifest exists, and before the crawl's first answer.",
501
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/answer" }] }
214
502
  }
215
503
  }
216
504
  }