kaloko 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +119 -0
  2. package/bin/kaloko.mjs +4 -0
  3. package/bin/qawalk.mjs +4 -0
  4. package/package.json +42 -0
  5. package/schemas/bundle.v1.json +19 -0
  6. package/schemas/config.v1.json +268 -0
  7. package/schemas/revision.v1.json +36 -0
  8. package/schemas/run.v1.json +549 -0
  9. package/schemas/scenario.v1.json +668 -0
  10. package/schemas/tokens.v1.json +102 -0
  11. package/skills/kaloko/SKILL.md +94 -0
  12. package/skills/kaloko/reference/acceptance.md +208 -0
  13. package/skills/kaloko/reference/apps.md +161 -0
  14. package/skills/kaloko/reference/collaboration.md +218 -0
  15. package/skills/kaloko/reference/design.md +143 -0
  16. package/skills/kaloko/reference/documentation.md +72 -0
  17. package/skills/kaloko/reference/environments.md +140 -0
  18. package/skills/kaloko/reference/evaluation.md +62 -0
  19. package/skills/kaloko/reference/execution.md +75 -0
  20. package/skills/kaloko/reference/mcp.md +69 -0
  21. package/skills/kaloko/reference/stacks.md +122 -0
  22. package/src/cli.mjs +1344 -0
  23. package/src/lib/access.mjs +169 -0
  24. package/src/lib/apps/capture.mjs +59 -0
  25. package/src/lib/apps/drivers.mjs +284 -0
  26. package/src/lib/apps/helper.swift +102 -0
  27. package/src/lib/apps/tree.mjs +222 -0
  28. package/src/lib/browser-daemon.mjs +41 -0
  29. package/src/lib/browser.mjs +161 -0
  30. package/src/lib/build.mjs +149 -0
  31. package/src/lib/calibrate.mjs +97 -0
  32. package/src/lib/capture.mjs +233 -0
  33. package/src/lib/compare.mjs +88 -0
  34. package/src/lib/config.mjs +117 -0
  35. package/src/lib/console.mjs +13 -0
  36. package/src/lib/coverage.mjs +75 -0
  37. package/src/lib/design-cli.mjs +440 -0
  38. package/src/lib/design-core.mjs +163 -0
  39. package/src/lib/design.mjs +164 -0
  40. package/src/lib/doctor.mjs +149 -0
  41. package/src/lib/draft.mjs +76 -0
  42. package/src/lib/drift.mjs +145 -0
  43. package/src/lib/evaluate.mjs +222 -0
  44. package/src/lib/git.mjs +70 -0
  45. package/src/lib/htmlview.mjs +130 -0
  46. package/src/lib/jev.mjs +95 -0
  47. package/src/lib/mail.mjs +182 -0
  48. package/src/lib/manifest-core.mjs +127 -0
  49. package/src/lib/pack-help.mjs +55 -0
  50. package/src/lib/packs.mjs +121 -0
  51. package/src/lib/pr.mjs +78 -0
  52. package/src/lib/probe.mjs +379 -0
  53. package/src/lib/recheck.mjs +70 -0
  54. package/src/lib/run.mjs +85 -0
  55. package/src/lib/scenario.mjs +98 -0
  56. package/src/lib/schema.mjs +25 -0
  57. package/src/lib/secrets.mjs +59 -0
  58. package/src/lib/service.mjs +52 -0
  59. package/src/lib/stack.mjs +130 -0
  60. package/src/lib/tokens.mjs +352 -0
  61. package/src/lib/util.mjs +97 -0
  62. package/templates/ACCEPTANCE.md +55 -0
  63. package/templates/cs/ACCEPTANCE.md +55 -0
  64. package/templates/kaloko.config.yml +76 -0
  65. package/templates/mail/letter-opener.mjs +47 -0
  66. package/templates/scenario.yml +119 -0
  67. package/templates/steps/consent.mjs +33 -0
  68. package/viewer/index.html +2772 -0
@@ -0,0 +1,549 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://qawalk.com/schemas/run.v1.json",
4
+ "title": "Kaloko run manifest (run.json)",
5
+ "type": "object",
6
+ "required": [
7
+ "schema",
8
+ "id",
9
+ "scenario",
10
+ "environment",
11
+ "started_at",
12
+ "scope",
13
+ "nodes",
14
+ "edges",
15
+ "summary"
16
+ ],
17
+ "properties": {
18
+ "schema": {
19
+ "const": "qawalk.run.v1"
20
+ },
21
+ "id": {
22
+ "type": "string",
23
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}-[a-z0-9-]+$"
24
+ },
25
+ "org": {
26
+ "type": "string"
27
+ },
28
+ "scenario": {
29
+ "type": "object",
30
+ "required": [
31
+ "id",
32
+ "title"
33
+ ],
34
+ "properties": {
35
+ "id": {
36
+ "type": "string"
37
+ },
38
+ "title": {
39
+ "type": "string"
40
+ },
41
+ "kind": {
42
+ "type": "string"
43
+ },
44
+ "version": {
45
+ "type": [
46
+ "integer",
47
+ "null"
48
+ ]
49
+ },
50
+ "file": {
51
+ "type": "string"
52
+ },
53
+ "source": {
54
+ "type": [
55
+ "string",
56
+ "null"
57
+ ]
58
+ },
59
+ "archived": {
60
+ "type": "boolean"
61
+ }
62
+ }
63
+ },
64
+ "git": {
65
+ "type": [
66
+ "object",
67
+ "null"
68
+ ],
69
+ "properties": {
70
+ "branch": {
71
+ "type": "string"
72
+ },
73
+ "commit": {
74
+ "type": "string"
75
+ },
76
+ "message": {
77
+ "type": "string"
78
+ },
79
+ "author": {
80
+ "type": "string"
81
+ },
82
+ "pr": {
83
+ "type": [
84
+ "object",
85
+ "null"
86
+ ],
87
+ "properties": {
88
+ "number": {
89
+ "type": "integer"
90
+ },
91
+ "url": {
92
+ "type": "string"
93
+ },
94
+ "state": {
95
+ "type": "string"
96
+ }
97
+ }
98
+ },
99
+ "sha": {
100
+ "type": "string",
101
+ "description": "Full commit hash (GitHub check runs need it)."
102
+ }
103
+ }
104
+ },
105
+ "environment": {
106
+ "type": "object",
107
+ "required": [
108
+ "name",
109
+ "readonly"
110
+ ],
111
+ "properties": {
112
+ "name": {
113
+ "type": "string"
114
+ },
115
+ "base_url": {},
116
+ "readonly": {
117
+ "type": "boolean"
118
+ }
119
+ }
120
+ },
121
+ "executor": {
122
+ "type": [
123
+ "object",
124
+ "null"
125
+ ]
126
+ },
127
+ "started_at": {
128
+ "type": "string"
129
+ },
130
+ "finished_at": {
131
+ "type": [
132
+ "string",
133
+ "null"
134
+ ]
135
+ },
136
+ "scope": {
137
+ "type": "object",
138
+ "required": [
139
+ "locales",
140
+ "viewports"
141
+ ],
142
+ "properties": {
143
+ "locales": {
144
+ "type": "array",
145
+ "items": {
146
+ "type": "string"
147
+ }
148
+ },
149
+ "viewports": {
150
+ "type": "object"
151
+ },
152
+ "note": {
153
+ "type": "string"
154
+ }
155
+ }
156
+ },
157
+ "lanes": {
158
+ "type": "array",
159
+ "items": {
160
+ "type": "string"
161
+ }
162
+ },
163
+ "nodes": {
164
+ "type": "array",
165
+ "items": {
166
+ "$ref": "#/$defs/node"
167
+ }
168
+ },
169
+ "edges": {
170
+ "type": "array"
171
+ },
172
+ "summary": {
173
+ "type": "object",
174
+ "required": [
175
+ "pass",
176
+ "partial",
177
+ "fail",
178
+ "skip"
179
+ ],
180
+ "properties": {
181
+ "pass": {
182
+ "type": "integer"
183
+ },
184
+ "partial": {
185
+ "type": "integer"
186
+ },
187
+ "fail": {
188
+ "type": "integer"
189
+ },
190
+ "skip": {
191
+ "type": "integer"
192
+ },
193
+ "criteria": {
194
+ "type": "object"
195
+ }
196
+ }
197
+ },
198
+ "history": {
199
+ "type": "array",
200
+ "description": "Other runs of the same scenario known at build time."
201
+ },
202
+ "version": {
203
+ "type": [
204
+ "integer",
205
+ "string",
206
+ "null"
207
+ ],
208
+ "description": "Number of a design version (#42, integer). Manifests from before #42 used it for the application version (a string); read those as app_version."
209
+ },
210
+ "project": {
211
+ "type": [
212
+ "object",
213
+ "null"
214
+ ],
215
+ "properties": {
216
+ "slug": {
217
+ "type": "string"
218
+ },
219
+ "repo": {
220
+ "type": [
221
+ "string",
222
+ "null"
223
+ ]
224
+ },
225
+ "source": {
226
+ "type": "string"
227
+ }
228
+ }
229
+ },
230
+ "issue": {
231
+ "type": [
232
+ "object",
233
+ "null"
234
+ ],
235
+ "properties": {
236
+ "repo": {
237
+ "type": [
238
+ "string",
239
+ "null"
240
+ ]
241
+ },
242
+ "number": {
243
+ "type": "integer"
244
+ },
245
+ "url": {
246
+ "type": [
247
+ "string",
248
+ "null"
249
+ ]
250
+ },
251
+ "title": {
252
+ "type": [
253
+ "string",
254
+ "null"
255
+ ]
256
+ }
257
+ }
258
+ },
259
+ "sessions": {
260
+ "type": [
261
+ "object",
262
+ "null"
263
+ ],
264
+ "description": "Sessions declared by the scenario (key → { title, mailbox, account, blocked_on })."
265
+ },
266
+ "source": {
267
+ "enum": [
268
+ "capture",
269
+ "design"
270
+ ],
271
+ "description": "design: a version of a design draft (#42)."
272
+ },
273
+ "version_name": {
274
+ "type": [
275
+ "string",
276
+ "null"
277
+ ]
278
+ },
279
+ "parent_version": {
280
+ "type": [
281
+ "string",
282
+ "null"
283
+ ],
284
+ "description": "Run id of the version this one follows."
285
+ },
286
+ "design_branch": {
287
+ "type": [
288
+ "string",
289
+ "null"
290
+ ]
291
+ },
292
+ "changed_steps": {
293
+ "type": "array",
294
+ "items": {
295
+ "type": "string"
296
+ },
297
+ "description": "Steps whose revision differs from the parent version."
298
+ },
299
+ "draft": {
300
+ "type": "object",
301
+ "description": "Present when the manifest is a live draft, not a run."
302
+ },
303
+ "revisions": {
304
+ "type": "object",
305
+ "description": "node|locale → revision, entry, status and author of a draft head."
306
+ },
307
+ "app_version": {
308
+ "type": [
309
+ "string",
310
+ "null"
311
+ ],
312
+ "description": "Version of the application under test (git tag on HEAD or --app-version); documentation captures carry it."
313
+ }
314
+ },
315
+ "$defs": {
316
+ "status": {
317
+ "enum": [
318
+ "pass",
319
+ "partial",
320
+ "fail",
321
+ "skip"
322
+ ]
323
+ },
324
+ "verdict": {
325
+ "enum": [
326
+ "pass",
327
+ "fail",
328
+ "needs_review",
329
+ "not_evaluated",
330
+ "not_reached"
331
+ ]
332
+ },
333
+ "node": {
334
+ "type": "object",
335
+ "required": [
336
+ "id",
337
+ "kind",
338
+ "title",
339
+ "status"
340
+ ],
341
+ "properties": {
342
+ "id": {
343
+ "type": "string"
344
+ },
345
+ "kind": {
346
+ "enum": [
347
+ "screen",
348
+ "email",
349
+ "external",
350
+ "decision",
351
+ "stack"
352
+ ]
353
+ },
354
+ "title": {},
355
+ "path": {},
356
+ "purpose": {
357
+ "type": "string"
358
+ },
359
+ "col": {
360
+ "type": "integer"
361
+ },
362
+ "lane": {
363
+ "type": "integer"
364
+ },
365
+ "status": {
366
+ "anyOf": [
367
+ {
368
+ "$ref": "#/$defs/status"
369
+ },
370
+ {
371
+ "type": "null"
372
+ }
373
+ ]
374
+ },
375
+ "by_locale": {
376
+ "type": "object",
377
+ "additionalProperties": {
378
+ "$ref": "#/$defs/status"
379
+ }
380
+ },
381
+ "captures": {
382
+ "type": "object",
383
+ "description": "locale -> viewport -> files",
384
+ "additionalProperties": {
385
+ "type": "object",
386
+ "additionalProperties": {
387
+ "type": "object",
388
+ "properties": {
389
+ "png": {
390
+ "type": "string"
391
+ },
392
+ "html": {
393
+ "type": ["string", "null"],
394
+ "description": "Null for app captures (they carry a UI tree instead)."
395
+ },
396
+ "state": {
397
+ "type": "string"
398
+ },
399
+ "eval": {
400
+ "type": [
401
+ "string",
402
+ "null"
403
+ ]
404
+ },
405
+ "url": {
406
+ "type": ["string", "null"]
407
+ },
408
+ "platform": { "type": "string", "description": "App captures: android, ios, electron or desktop." },
409
+ "device": { "type": ["string", "null"] },
410
+ "tree": { "type": ["string", "null"], "description": "UI tree of an app capture (qawalk.tree.v1)." },
411
+ "http_status": {
412
+ "type": "integer",
413
+ "description": "HTTP status of the captured document (error pages show it on the canvas)."
414
+ },
415
+ "size": {
416
+ "type": "array"
417
+ },
418
+ "boxes": {
419
+ "type": "object"
420
+ },
421
+ "captured_at": {
422
+ "type": "string"
423
+ },
424
+ "image": {
425
+ "type": "string",
426
+ "description": "Full-page screenshot (webp or png)."
427
+ },
428
+ "thumb": {
429
+ "type": [
430
+ "string",
431
+ "null"
432
+ ],
433
+ "description": "Small WebP preview for canvas cards."
434
+ },
435
+ "quality": {
436
+ "type": "object",
437
+ "description": "Capture quality when not the canvas default: format, scale, masked (count), annotations [{n, criterion, x, y}]"
438
+ }
439
+ }
440
+ }
441
+ }
442
+ },
443
+ "criteria": {
444
+ "type": "array",
445
+ "items": {
446
+ "type": "object",
447
+ "required": [
448
+ "id",
449
+ "text",
450
+ "verdict"
451
+ ],
452
+ "properties": {
453
+ "id": {
454
+ "type": "string"
455
+ },
456
+ "text": {
457
+ "type": "string"
458
+ },
459
+ "type": {
460
+ "type": "string"
461
+ },
462
+ "verdict": {
463
+ "$ref": "#/$defs/verdict"
464
+ },
465
+ "by_locale": {
466
+ "type": "object"
467
+ },
468
+ "evidence": {
469
+ "type": [
470
+ "string",
471
+ "null"
472
+ ]
473
+ },
474
+ "score": {
475
+ "type": [
476
+ "number",
477
+ "null"
478
+ ],
479
+ "description": "Semantic evaluator probability (0–1) when the criterion is semantic."
480
+ },
481
+ "target": {
482
+ "type": [
483
+ "object",
484
+ "null"
485
+ ]
486
+ },
487
+ "check": {
488
+ "type": "object"
489
+ }
490
+ }
491
+ }
492
+ },
493
+ "attachments": {
494
+ "type": "array"
495
+ },
496
+ "semantic": {
497
+ "type": [
498
+ "object",
499
+ "null"
500
+ ],
501
+ "description": "Semantic evaluator output per 'locale|viewport' (provider, model, answers). The provider is replaceable; JEV is the default."
502
+ },
503
+ "metadata": {
504
+ "type": "object",
505
+ "description": "Page metadata per locale (meta, links, JSON-LD, microdata, headings)."
506
+ },
507
+ "session": {
508
+ "type": [
509
+ "string",
510
+ "null"
511
+ ]
512
+ },
513
+ "stack": {
514
+ "type": "object",
515
+ "description": "Stack steps: many pages of one template. The pages are in the items file (qawalk.stack.v1); the node carries the counts.",
516
+ "properties": {
517
+ "count": {
518
+ "type": "integer"
519
+ },
520
+ "items": {
521
+ "type": "string"
522
+ },
523
+ "summary": {
524
+ "type": "object"
525
+ },
526
+ "fields": {
527
+ "type": "array"
528
+ },
529
+ "sample": {
530
+ "type": "array"
531
+ },
532
+ "semantic_sample": {
533
+ "type": [
534
+ "integer",
535
+ "null"
536
+ ]
537
+ },
538
+ "source": {
539
+ "type": [
540
+ "string",
541
+ "null"
542
+ ]
543
+ }
544
+ }
545
+ }
546
+ }
547
+ }
548
+ }
549
+ }