kaloko 0.4.9 → 0.4.11

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 (39) hide show
  1. package/README.md +88 -4
  2. package/package.json +1 -1
  3. package/schemas/config.v1.json +35 -0
  4. package/schemas/scenario.v1.json +30 -1
  5. package/skills/kaloko/SKILL.md +22 -4
  6. package/skills/kaloko/reference/acceptance.md +16 -0
  7. package/skills/kaloko/reference/ci.md +70 -0
  8. package/skills/kaloko/reference/collaboration.md +9 -1
  9. package/skills/kaloko/reference/environments.md +5 -0
  10. package/skills/kaloko/reference/execution.md +56 -0
  11. package/skills/kaloko/reference/import.md +66 -0
  12. package/skills/kaloko/reference/mcp.md +2 -0
  13. package/skills/kaloko/reference/recording.md +95 -0
  14. package/src/cli.mjs +467 -100
  15. package/src/lib/affected-core.mjs +242 -0
  16. package/src/lib/affected.mjs +233 -0
  17. package/src/lib/anim.mjs +125 -0
  18. package/src/lib/apps/recording-native.mjs +212 -0
  19. package/src/lib/build.mjs +60 -4
  20. package/src/lib/ci.mjs +207 -0
  21. package/src/lib/config.mjs +2 -0
  22. package/src/lib/doctor.mjs +5 -1
  23. package/src/lib/evaluate.mjs +4 -2
  24. package/src/lib/git.mjs +6 -2
  25. package/src/lib/heal.mjs +207 -0
  26. package/src/lib/import.mjs +374 -0
  27. package/src/lib/init-detect.mjs +219 -0
  28. package/src/lib/onboarding.mjs +15 -8
  29. package/src/lib/pr.mjs +24 -2
  30. package/src/lib/recording.mjs +373 -0
  31. package/src/lib/scenario.mjs +2 -1
  32. package/src/lib/service.mjs +7 -1
  33. package/src/lib/trace.mjs +109 -0
  34. package/src/lib/unzip.mjs +31 -0
  35. package/src/lib/upload.mjs +114 -0
  36. package/src/lib/video-cli.mjs +209 -0
  37. package/src/lib/video.mjs +427 -0
  38. package/src/lib/webm.mjs +144 -0
  39. package/viewer/index.html +186 -7
@@ -0,0 +1,95 @@
1
+ # Recordings, traces and the walkthrough video
2
+
3
+ A screenshot shows where a step ended. A recording shows how it got there:
4
+ the clicks, the spinner that never stopped, the menu that opened twice. A trace
5
+ lists what happened meanwhile: actions, network requests with status, size and
6
+ timing, and console messages.
7
+
8
+ ## When to record
9
+
10
+ Record when a screenshot cannot show the problem or the behaviour a reviewer
11
+ has to judge:
12
+
13
+ - a flaky step (passes, then fails on the same commit): `--record failed` keeps
14
+ only the attempts that fail;
15
+ - animations, transitions, loading states, drag and drop, menus and dialogs
16
+ that open and close;
17
+ - a bug report or a PR where the person needs to see the interaction once;
18
+ - a demo for a client or a release note (`kaloko video export`).
19
+
20
+ Do not record every walk by default. Recordings are much larger than
21
+ screenshots, count in the organization's storage and expire after 30 days on
22
+ Business. Traces are small and are kept for every walked web step anyway.
23
+
24
+ ## Commands
25
+
26
+ ```bash
27
+ kaloko walk --record # each step: from the previous screen to its capture
28
+ kaloko walk --record flow # the whole walk per locale, a chapter per step
29
+ kaloko walk --record failed # only steps whose script fails or whose checks fail
30
+ kaloko walk --record --record-quality low --steps checkout
31
+ kaloko walk --no-trace # no trace either
32
+ kaloko video list # what was recorded and traced, with sizes
33
+ kaloko video trace --step checkout # the step's trace as a timeline in the terminal
34
+ kaloko video export --format mp4 # the run's recordings with a title card per step
35
+ kaloko video tools # ffmpeg, adb, simctl on this machine
36
+ ```
37
+
38
+ In a scenario, or in `kaloko.config.yml` for the whole project:
39
+
40
+ ```yaml
41
+ capture:
42
+ record: { mode: failed, quality: low, max_seconds: 45 } # or true, step, flow, failed, false
43
+ trace: true
44
+ nodes:
45
+ - id: checkout
46
+ record: true # this step always; record: false never
47
+ ```
48
+
49
+ Quality presets: `low` 8 fps up to 960 px, `medium` (default) 12 fps up to
50
+ 1280 px, `high` 24 fps up to 1920 px. A step keeps its last 60 seconds and a
51
+ flow its last 15 minutes unless `max_seconds` says otherwise.
52
+
53
+ ## What you get
54
+
55
+ Per recorded step under `steps/<step>/<locale>/<viewport>.`: `rec.webm` (VP9
56
+ from Chrome, no extra tools), `rec.mp4` (H.264, when ffmpeg is installed; Safari
57
+ before iOS 17.4 needs it), `rec.poster.webp`, `rec.webp` (a few-second animated
58
+ preview; `rec.gif` where the browser cannot encode WebP) and `trace.json`. The
59
+ pointer and clicks are drawn into web recordings. A flow recording is
60
+ `attachments/flow/<locale>.rec.*`; the walkthrough is
61
+ `attachments/walkthrough.rec.<format>`.
62
+
63
+ Web and Electron record through Chrome's screencast; walks in Firefox or WebKit
64
+ are neither recorded nor traced. Apps: Android with `adb shell screenrecord`
65
+ (segments, touches shown), the iOS Simulator with `simctl io recordVideo`,
66
+ macOS desktop apps with `screencapture` (Screen Recording permission). App
67
+ recordings need ffmpeg for the poster and preview; `kaloko doctor` lists what is
68
+ missing with the install command for the OS.
69
+
70
+ ## On the canvas
71
+
72
+ The step detail gets Video next to Screenshot: the poster first, nothing loads
73
+ until played, markers for the start, the capture, actions and failed requests.
74
+ Technical shows the trace; a click on a row moves the video there. Cards play
75
+ the preview on hover. Replay plays the flow recording with its chapters. The
76
+ walkthrough video is in the top bar.
77
+
78
+ ## Plans and sharing
79
+
80
+ Recording is local and works on every plan. `kaloko share` uploads recordings
81
+ on Business and Enterprise; on Free and Team it says they stay in the local
82
+ preview and shares screenshots and traces. A recording over the service's file
83
+ limit (25 MB) stays local too: lower the quality or `max_seconds`. Recordings
84
+ expire 30 days after the run is shared (Enterprise chooses in Settings →
85
+ Storage); the screenshots stay as long as the run. Uploading is still "ask
86
+ first", and so is turning recordings on for a whole project.
87
+
88
+ ## Reading them as an agent
89
+
90
+ `kaloko video trace --step <id>` locally, or MCP `get_step_recording`
91
+ (`run_id`, `step`; `trace: true` adds the full trace) on a shared run. It
92
+ answers the video URLs, duration, the step's chapter of a flow recording,
93
+ failed attempts and the trace summary: failed requests with status, console
94
+ errors, the slowest request. Fetch the URLs with the same token. Start there
95
+ when a step failed and the evidence in the criteria is not enough.