kaloko 0.12.2 → 0.14.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.
- package/README.md +11 -5
- package/bin/qawalk.mjs +2 -1
- package/package.json +2 -2
- package/schemas/changelog.v1.json +5 -0
- package/schemas/config.v1.json +2 -1
- package/skills/kaloko/SKILL.md +11 -2
- package/skills/kaloko/reference/ci.md +40 -5
- package/skills/kaloko/reference/collaboration.md +8 -1
- package/skills/kaloko/reference/design.md +9 -8
- package/skills/kaloko/reference/docs.md +9 -3
- package/skills/kaloko/reference/documentation.md +6 -4
- package/skills/kaloko/reference/integrations.md +18 -4
- package/skills/kaloko/reference/mcp.md +22 -9
- package/skills/kaloko/reference/portable-html.md +1 -1
- package/skills/kaloko/reference/recording.md +4 -2
- package/src/cli.mjs +301 -107
- package/src/lib/changelog-core.mjs +11 -8
- package/src/lib/ci.mjs +1 -1
- package/src/lib/cli-args.mjs +144 -0
- package/src/lib/config.mjs +25 -1
- package/src/lib/design-cli.mjs +9 -9
- package/src/lib/design-export.mjs +1 -1
- package/src/lib/docs-export.mjs +44 -10
- package/src/lib/docs.mjs +3 -2
- package/src/lib/doctor.mjs +3 -1
- package/src/lib/integrations-cli.mjs +15 -6
- package/src/lib/legacy.mjs +28 -0
- package/src/lib/login.mjs +1 -1
- package/src/lib/screens-cli.mjs +4 -2
- package/src/lib/service.mjs +52 -15
- package/src/lib/signoff.mjs +2 -2
- package/src/lib/spec-cli.mjs +3 -3
- package/src/lib/upload.mjs +1 -1
- package/src/lib/util.mjs +40 -1
- package/src/lib/video-cli.mjs +3 -3
- package/viewer/index.html +36 -28
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Kaloko
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Your AI agents build; Kaloko walks every screen, puts it on one canvas and
|
|
4
|
+
records who approved what.
|
|
4
5
|
|
|
5
6
|
Your coding agent (Claude Code, Codex or any LLM with a shell) walks your
|
|
6
7
|
acceptance plan with the `kaloko` skill. Kaloko captures every screen and
|
|
@@ -169,6 +170,9 @@ messages. Click a row and the video jumps there. Web recordings need nothing
|
|
|
169
170
|
but Chrome (WebM with VP9); with ffmpeg installed you also get MP4 for Safari,
|
|
170
171
|
app recordings (Android `screenrecord`, iOS Simulator, macOS) and the
|
|
171
172
|
walkthrough export. `npx kaloko video tools` says what this machine has.
|
|
173
|
+
Videos play on: when one ends, the next step's video starts, and replay moves
|
|
174
|
+
to the next step by itself; a step that needs a decision waits for you, and a
|
|
175
|
+
step without video shows its screenshot for three seconds.
|
|
172
176
|
Recordings stay in the local preview on Free and Team; Business and Enterprise
|
|
173
177
|
share them with the run.
|
|
174
178
|
|
|
@@ -219,10 +223,12 @@ Every AI verdict comes with one sentence saying why. Criteria marked
|
|
|
219
223
|
`vision: true`, and answers the text evaluator is unsure about, get a second
|
|
220
224
|
look at the screenshot from a vision model (`ANTHROPIC_API_KEY`, or through
|
|
221
225
|
Kaloko); `kaloko build` lists what to act on with the score and the reason.
|
|
222
|
-
As an experiment
|
|
223
|
-
the kind of problem each screen and its recording
|
|
224
|
-
a raw translation key, an endless spinner);
|
|
225
|
-
into comments with one click, and findings
|
|
226
|
+
As an experiment an admin switches on under Settings → Security → Experiments,
|
|
227
|
+
Clef on Cloudflare also names the kind of problem each screen and its recording
|
|
228
|
+
show (overlap, cut-off text, a raw translation key, an endless spinner);
|
|
229
|
+
reviewers turn the right findings into comments with one click, and findings
|
|
230
|
+
never change a verdict. Triage counts against the hosted-evaluation allowance,
|
|
231
|
+
so it needs the Team plan or higher.
|
|
226
232
|
The `a11y` pack walks the page with Tab (order, visible focus, traps, skip
|
|
227
233
|
link) and reads names from the accessibility tree. Pixel diffs skip the
|
|
228
234
|
regions a step ignores; `kaloko walk --stability 3` and `kaloko stability`
|
package/bin/qawalk.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kaloko",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.14.0",
|
|
4
|
+
"description": "Your AI agents build; Kaloko walks every screen, puts it on one canvas and records who approved what.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"qa",
|
|
7
7
|
"acceptance-testing",
|
|
@@ -57,6 +57,11 @@
|
|
|
57
57
|
"run": { "type": ["string", "null"] },
|
|
58
58
|
"version": { "type": ["string", "null"], "description": "The release the picture belongs to (null: the newest accepted)." },
|
|
59
59
|
"image": { "type": ["string", "null"] },
|
|
60
|
+
"video": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"description": "Present when the accepted run has a recording of the step and the reference does not say media=image: links like image, and the length.",
|
|
63
|
+
"properties": { "mp4": { "type": ["string", "null"] }, "webm": { "type": ["string", "null"] }, "duration_ms": { "type": ["number", "null"] } }
|
|
64
|
+
},
|
|
60
65
|
"canvas": { "type": ["string", "null"] }
|
|
61
66
|
}
|
|
62
67
|
}
|
package/schemas/config.v1.json
CHANGED
|
@@ -226,7 +226,8 @@
|
|
|
226
226
|
"serve": { "type": "string", "description": "kind: design. Folder with one sub-folder per step (<step>/index.html, optional <step>/<locale>/index.html) and shared files in _shared/; relative to the config." },
|
|
227
227
|
"fixtures": { "type": "string", "description": "kind: design. Folder of JSON fixtures live steps may fetch instead of real APIs; relative to the config." },
|
|
228
228
|
"origins": { "type": "array", "maxItems": 20, "items": { "type": "string", "pattern": "^https://(\\*\\.)?[A-Za-z0-9.-]+(:[0-9]{1,5})?/?$" }, "description": "kind: design. Origins the design loads fonts, stylesheets and images from (https://fonts.googleapis.com, https://*.cdn.example.com). The organization allows them in Settings → Security; kaloko design lint warns about one it does not allow. Scripts never load from them." },
|
|
229
|
-
"
|
|
229
|
+
"default_token_mode": { "type": "string", "description": "kind: design. Token mode (e.g. light, dark) steps are rendered in and the checks use; default: the token set's first mode. tokens_mode is its older name." },
|
|
230
|
+
"tokens_mode": { "type": "string", "description": "kind: design. The older name of default_token_mode; still read." },
|
|
230
231
|
"token_modes": { "oneOf": [{ "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,39}$" } }, { "const": false }], "description": "kind: design. Token modes of the token set to render every step in, one capture per mode (keys <viewport>.mode-<name>); tokens_mode is the default and has the plain key. Not set: every mode of the set when it has two or more, except a set of only light and dark (left to color_schemes). false: only tokens_mode." },
|
|
231
232
|
"html_view": { "type": "boolean", "default": false, "description": "Experimental (#42): keep a static HTML view of every capture (assets rehosted, scripts removed, secrets scrubbed). Refused on production unless the environment is readonly." },
|
|
232
233
|
"base_url": {
|
package/skills/kaloko/SKILL.md
CHANGED
|
@@ -20,7 +20,10 @@ description: >
|
|
|
20
20
|
trace read (actions, requests, console), and when a user-visible change
|
|
21
21
|
should land in the visual changelog (CHANGELOG.md with step references,
|
|
22
22
|
kaloko changelog draft, kaloko release) or a guide should show a step or
|
|
23
|
-
be written, translated or checked (kaloko docs check)
|
|
23
|
+
be written, translated or checked (kaloko docs check), when screenshots,
|
|
24
|
+
HTML or recordings must hide personal data (capture masks, pii: redact or
|
|
25
|
+
pseudonymize, kaloko share stopping on unmasked data), and when a run has
|
|
26
|
+
Clef triage findings (experimental) to read, mention or answer.
|
|
24
27
|
---
|
|
25
28
|
|
|
26
29
|
# Kaloko
|
|
@@ -80,7 +83,7 @@ Draft and edit the Unreleased section of the changelog (`kaloko changelog draft
|
|
|
80
83
|
config on Kaloko (`kaloko products sync`: it records no release) and list them
|
|
81
84
|
(`kaloko products list`). Write, translate and fix
|
|
82
85
|
guides in the docs folder, run `kaloko docs check`, and export them for a docs
|
|
83
|
-
site (`kaloko export --format …`) into a local folder.
|
|
86
|
+
site (`kaloko export docs --format …`) into a local folder.
|
|
84
87
|
|
|
85
88
|
## Ask first
|
|
86
89
|
|
|
@@ -128,6 +131,12 @@ only when a person says that value may be uploaded.
|
|
|
128
131
|
(`--heal`): [reference/execution.md](reference/execution.md)
|
|
129
132
|
- Evaluation, JEV thresholds, the vision evaluator and its reasons, reading
|
|
130
133
|
results: [reference/evaluation.md](reference/evaluation.md)
|
|
134
|
+
- Clef triage findings (experimental): what they are, how to report them apart
|
|
135
|
+
from the verdicts, `get_findings` and `answer_finding`:
|
|
136
|
+
[reference/evaluation.md#triage-findings-experimental](reference/evaluation.md#triage-findings-experimental)
|
|
137
|
+
- Hiding personal data in captures (`capture.mask`, `pii: redact`,
|
|
138
|
+
`pseudonymize`, `pii: required` on an environment, the check before sharing):
|
|
139
|
+
[reference/acceptance.md#capture-quality](reference/acceptance.md#capture-quality)
|
|
131
140
|
- Screenshots, walkthroughs, Playwright reports and traces that an agent or a
|
|
132
141
|
tool already produced, laid out as a run: [reference/import.md](reference/import.md)
|
|
133
142
|
- Video of a step or a whole flow, traces (actions, requests, console) and the
|
|
@@ -24,8 +24,9 @@ the deployment):
|
|
|
24
24
|
2. `kaloko ci preview-url --wait 600 --github-env` finds the preview URL, the
|
|
25
25
|
pull request and its base branch and puts them into `KALOKO_PREVIEW_URL`,
|
|
26
26
|
`KALOKO_PR`, `KALOKO_BASE`;
|
|
27
|
-
3. for each scenario: `kaloko affected --
|
|
28
|
-
not reach any of its steps
|
|
27
|
+
3. for each scenario: `kaloko affected --fail-if-none` skips it when the change
|
|
28
|
+
does not reach any of its steps (workflows written earlier say `--check`,
|
|
29
|
+
which works the same and prints a note), otherwise `start --env preview`,
|
|
29
30
|
`walk --ephemeral --affected` and `share --pr` (one comment per scenario,
|
|
30
31
|
updated on later pushes).
|
|
31
32
|
|
|
@@ -52,9 +53,10 @@ include `preview`, or `start` refuses them; the command says which.
|
|
|
52
53
|
`deployment_status` event; `VERCEL_BRANCH_URL`/`VERCEL_URL`,
|
|
53
54
|
`DEPLOY_PRIME_URL`/`DEPLOY_URL` (Netlify), `CF_PAGES_URL`,
|
|
54
55
|
`CI_ENVIRONMENT_URL` (GitLab), `RENDER_EXTERNAL_URL`; then the commit's GitHub
|
|
55
|
-
deployments, skipping production, polled every 10 s up to `--wait` seconds
|
|
56
|
-
Only the URL goes to stdout, so
|
|
57
|
-
works in any CI
|
|
56
|
+
deployments, skipping production, polled every 10 s up to `--wait` (seconds,
|
|
57
|
+
or with a unit: `--wait 10m`). Only the URL goes to stdout, so
|
|
58
|
+
`export KALOKO_PREVIEW_URL="$(kaloko ci preview-url)"` works in any CI;
|
|
59
|
+
`--json` prints the URL, its source and the pull request as one JSON object.
|
|
58
60
|
|
|
59
61
|
## Affected steps in CI
|
|
60
62
|
|
|
@@ -65,6 +67,39 @@ in the newest shared run of the scenario count too, so a fresh CI checkout
|
|
|
65
67
|
maps routes as well as a laptop with earlier runs. See
|
|
66
68
|
[execution.md](execution.md#only-what-changed).
|
|
67
69
|
|
|
70
|
+
## Exit codes
|
|
71
|
+
|
|
72
|
+
| Code | Meaning |
|
|
73
|
+
|---|---|
|
|
74
|
+
| `0` | done |
|
|
75
|
+
| `1` | checks found problems, or the command failed (an HTTP error from the service other than 401 too) |
|
|
76
|
+
| `2` | usage error: unknown command or option, missing argument |
|
|
77
|
+
| `3` | the Kaloko service cannot be reached (no connection: offline, DNS, refused, cut off); retrying may help |
|
|
78
|
+
| `4` | no token, or an invalid, expired or revoked one: `kaloko login`, or a new `KALOKO_TOKEN` secret |
|
|
79
|
+
|
|
80
|
+
A CI step can tell a broken workflow line (2) or a missing secret (4) from a
|
|
81
|
+
failing check (1), and retry only on 3. Checks keep 1: `docs check`, `drift`,
|
|
82
|
+
`design lint`, `affected --fail-if-none`, `validate`. `kaloko help <command>`
|
|
83
|
+
or `kaloko <command> --help` shows the options of one command.
|
|
84
|
+
|
|
85
|
+
## Machine output
|
|
86
|
+
|
|
87
|
+
`--json` on a command that prints data makes stdout one JSON document and
|
|
88
|
+
nothing else: progress, notes and warnings go to stderr. An error is one line
|
|
89
|
+
on stderr, `{"error":{"message":"…","code":"…","next":"…"}}`, with the exit
|
|
90
|
+
code above (`code` is `usage`, `unreachable`, `no_token`, `unauthorized`, a
|
|
91
|
+
service reason such as `plan`, or `failed`). Commands with `--json` include
|
|
92
|
+
`start`, `status`, `evaluate`, `build`, `share` (run id and canvas URL),
|
|
93
|
+
`validate`, `scenarios`, `runs`, `review`, `feedback`, `auth list`,
|
|
94
|
+
`browser status`, `ci preview-url` and `affected`.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
url=$(npx kaloko share --json | jq -r .url)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`kaloko runs --all` follows the service's pages to the last run; `--limit N`
|
|
101
|
+
stops after N and prints the cursor to go on with (`--cursor`) on stderr.
|
|
102
|
+
|
|
68
103
|
## Done means
|
|
69
104
|
|
|
70
105
|
The workflow file and the config change are committed after the person agreed,
|
|
@@ -197,7 +197,8 @@ e-mail works too). Use it when a step needs a decision from a specific person
|
|
|
197
197
|
- Admins may name **required approvers** per scenario (Settings). Such a
|
|
198
198
|
run stays `pending` until every one of them approved; `kaloko feedback`
|
|
199
199
|
prints `awaiting approval from: …`, so do not treat a single approval as
|
|
200
|
-
acceptance there.
|
|
200
|
+
acceptance there. Those approvers are asked on their own (mail, inbox,
|
|
201
|
+
Slack or Teams, one reminder); do not ping them again.
|
|
201
202
|
- An accepted run has a **signed acceptance record** (Business and up): the
|
|
202
203
|
run, scenario, commit and environment, who approved what and when (people
|
|
203
204
|
apart from tokens and agents, approvals carried over unchanged steps with
|
|
@@ -278,6 +279,12 @@ Everything above is available over the API with an organization token:
|
|
|
278
279
|
`{"read": "all"}` or `{"read": [ids]}`
|
|
279
280
|
- `GET /api/v1/orgs/<org>/runs[?project=&scenario=&kind=&verdict=&author=&environment=&branch=&q=][&latest=1]`
|
|
280
281
|
(`latest=1`: the newest run per scenario with `older`), `GET /api/v1/orgs/<org>/runs/<id>`
|
|
282
|
+
- Paging: runs, `comments`, `notifications`, `tokens` and `audit` take
|
|
283
|
+
`?limit=` and `?cursor=`. The body keeps its shape (an array stays an
|
|
284
|
+
array); the next page is named in the `X-Next-Cursor` header and in
|
|
285
|
+
`Link: <…?cursor=…>; rel="next"`, and object answers (`notifications`,
|
|
286
|
+
`audit`) also carry `next`. No header, no next page. `projects` and
|
|
287
|
+
`products` answer the complete list.
|
|
281
288
|
- Clean-up: `DELETE …/runs/<id>` (trash), `POST …/runs/<id>/restore`,
|
|
282
289
|
`POST …/runs/<id>/keep` with `{"keep": true|false}`,
|
|
283
290
|
`POST /api/v1/orgs/<org>/runs/prune` with `{ scenario?, project?, environment?, keep_latest: 3, older_than_days?, dry_run: true }`
|
|
@@ -83,7 +83,7 @@ design/credit/late/index.html
|
|
|
83
83
|
- `kaloko sync` sends the variants' captures with the step; the published version shows the stack index with every
|
|
84
84
|
variant and its verdict, and each variant opens live in the lightbox.
|
|
85
85
|
- `kaloko design lint` reports a variant folder without its `index.html` as an error.
|
|
86
|
-
- `kaloko export
|
|
86
|
+
- `kaloko export live` and `export design` write the variant folders; the design export adds
|
|
87
87
|
`screenshots/<step>/<variant>/<locale>/<viewport>.webp`.
|
|
88
88
|
- Not for steps whose variants are different screens of a flow: those stay separate steps.
|
|
89
89
|
|
|
@@ -126,7 +126,7 @@ and `_` works). Draw each one so it can be reviewed and built:
|
|
|
126
126
|
Token modes: when the token set has two or more modes (resolver contexts or mode groups), every step renders in each
|
|
127
127
|
mode. The walk sets the mode's tokens as custom properties on `:root` after the page's own styles and
|
|
128
128
|
`data-kaloko-mode="<mode>"` on `<html>`; a page that switches themes by class can read the attribute. Captures are
|
|
129
|
-
keyed `<viewport>.mode-<name>`; the environment's `
|
|
129
|
+
keyed `<viewport>.mode-<name>`; the environment's `default_token_mode` (older name `tokens_mode`; else the first mode) is the default with the plain
|
|
130
130
|
key, and the canvas switches modes like colour schemes. A set with only `light`/`dark` modes follows the colour
|
|
131
131
|
scheme instead (`color_schemes: [light, dark]`), unless `token_modes` names them. `token_modes: [brand-a, brand-b]` (environment, scenario or `kaloko start
|
|
132
132
|
--token-modes`) picks modes; `false` turns it off. Live view shows the default mode; other modes are screenshots.
|
|
@@ -279,7 +279,7 @@ link the screens you reuse in your notes.
|
|
|
279
279
|
|
|
280
280
|
Development builds from the design reference:
|
|
281
281
|
|
|
282
|
-
- `kaloko export
|
|
282
|
+
- `kaloko export live [--version n] --out design/` writes the live files into a folder.
|
|
283
283
|
- MCP `get_step` (scenario, step, `ref: design`) returns the file list, a signed entry URL, the token set, the
|
|
284
284
|
page structure and open comments; `list_step_changes` names the steps that changed since the last reference.
|
|
285
285
|
- MCP `get_step_spec` (or `kaloko spec <step>`) returns what to build, element by element, with tokens; see
|
|
@@ -321,10 +321,11 @@ Everything exports in open formats, readable without Kaloko:
|
|
|
321
321
|
|
|
322
322
|
| What | Command | Contents |
|
|
323
323
|
|---|---|---|
|
|
324
|
-
| a design version (or `--draft`, default the design reference) | `kaloko export
|
|
325
|
-
| the live files only (the handoff) | `kaloko export
|
|
326
|
-
| a shared run | `kaloko export --run <id>` | `run.json`, every capture, the live HTML of design steps (per revision and merged in `live/site/`), comments and verdicts, and `index.html`: the canvas, offline from `file://` |
|
|
324
|
+
| a design version (or `--draft`, default the design reference) | `kaloko export design [--version n] --out dir/` or `--out v4.zip` | the live files in the folder layout, `tokens.json` (DTCG), `scenario.yml` (`qawalk.scenario.v1`), `screenshots/<step>/<locale>/<viewport>.webp`, `kaloko.json` (what is where) and `index.html`, a start page that opens from disk |
|
|
325
|
+
| the live files only (the handoff) | `kaloko export live [--version n] --out design/` | the design folder as the designer wrote it |
|
|
326
|
+
| a shared run | `kaloko export run --run <id>` | `run.json`, every capture, the live HTML of design steps (per revision and merged in `live/site/`), comments and verdicts, and `index.html`: the canvas, offline from `file://` |
|
|
327
327
|
|
|
328
|
+
The flag forms from before (`kaloko export --design`, `--live`, `--run <id>`) still work.
|
|
328
329
|
When someone asks for the design or the evidence outside Kaloko, export; do not screenshot the canvas.
|
|
329
330
|
|
|
330
331
|
## Tokens
|
|
@@ -335,7 +336,7 @@ When someone asks for the design or the evidence outside Kaloko, export; do not
|
|
|
335
336
|
`{ "$ref": "#/json/pointer" }`, `$extends`, `$root` and `$deprecated`. New sets: prefer the object values.
|
|
336
337
|
- Modes (light, dark): a DTCG resolver `design/tokens.resolver.json` (sets plus a `theme` modifier whose
|
|
337
338
|
contexts point at files) wins over `tokens.json`; `push` inlines its files. Older sets with top-level
|
|
338
|
-
`light`/`dark` groups still work. `tokens_mode` in the environment picks the mode the checks use.
|
|
339
|
+
`light`/`dark` groups still work. `default_token_mode` (or `tokens_mode`) in the environment picks the mode the checks use.
|
|
339
340
|
- `kaloko tokens validate` reports names with `{`, `}` or `.`, references that point nowhere and values that
|
|
340
341
|
cannot be read; `push` refuses a set with problems, so does the service.
|
|
341
342
|
- `kaloko tokens push` stores the set as the project's next token set version; `pull` gets it.
|
|
@@ -377,7 +378,7 @@ the step, then sync.
|
|
|
377
378
|
|
|
378
379
|
Experimental, Business plan. `html_view: true` on an app environment keeps a static, script-free copy of each
|
|
379
380
|
captured page (secrets and hidden values removed) that opens in the canvas like a live step, so the inspector
|
|
380
|
-
works on the real product. It is refused on production pages behind a sign-in. `kaloko export
|
|
381
|
+
works on the real product. It is refused on production pages behind a sign-in. `kaloko export live --views
|
|
381
382
|
--run <id> --out design/` turns those copies into design steps: a redesign that starts from the product.
|
|
382
383
|
|
|
383
384
|
## Bring your own design skill
|
|
@@ -13,13 +13,19 @@ A picture in Markdown names a step instead of a PNG file:
|
|
|
13
13
|
 the capture of release 2.4.0
|
|
14
14
|
 the release before the one this entry belongs to
|
|
15
15
|

|
|
16
|
+
 the step's recording plays on the picture
|
|
16
17
|
 a step of the product's default_scenario
|
|
17
18
|
```
|
|
18
19
|
|
|
19
20
|
`<scenario>` is the scenario id, `<step>` the node id. Without `locale` and `viewport` the reader's language and
|
|
20
21
|
the product's default screen are used. `state` picks a capture variant (`dark`, `webkit`, `reduce`: the values in
|
|
21
|
-
capture keys like `mobile.webkit.dark`).
|
|
22
|
-
|
|
22
|
+
capture keys like `mobile.webkit.dark`). When the accepted run has a recording of the step (`kaloko walk --record`),
|
|
23
|
+
docs, changelog and training mode show the picture with a play button and play the recording on a click; exports
|
|
24
|
+
carry it, the PDF and the "What's new" mail show the picture. `media=video` says the step needs its recording
|
|
25
|
+
(`kaloko docs check` warns under `no_recording` when the run has none: walk the step with `--record` and have the
|
|
26
|
+
run accepted); `media=image` never plays it. Use `media=video` for interactions a picture cannot show (drag and drop,
|
|
27
|
+
a dialog, a language switch), not for every step. Check a reference with MCP `resolve_step_image` or
|
|
28
|
+
`GET /api/v1/orgs/<org>/steps/resolve?ref=…`: it answers the signed image URL (and `video` with `mp4`, `webm` and `duration_ms` when it plays), the run and how the version was found
|
|
23
29
|
(`release`, `app_version`, `reference_env`, `accepted`; `exact: false` means a fallback).
|
|
24
30
|
|
|
25
31
|
Never invent a step id or a version. Use ids from the scenario files and versions from `CHANGELOG.md` or git tags.
|
|
@@ -176,7 +182,7 @@ stale sections and training steps).
|
|
|
176
182
|
|
|
177
183
|
### Exports
|
|
178
184
|
|
|
179
|
-
`kaloko export --format md|docusaurus|vitepress|mkdocs|html|pdf|json [--product p] [--version v] [--lang cs]`
|
|
185
|
+
`kaloko export docs --format md|docusaurus|vitepress|mkdocs|html|pdf|json [--product p] [--version v] [--lang cs]`
|
|
180
186
|
writes the docs and the changelog with the pictures as files: Markdown with an `assets/` folder (any static site),
|
|
181
187
|
a Docusaurus, VitePress or MkDocs folder with sidebars and front matter, offline HTML, a PDF (printed by the
|
|
182
188
|
browser), or the changelog as JSON (`schemas/changelog.v1.json`). `--local` exports the files in the repository
|
|
@@ -17,7 +17,7 @@ rebuilt from the newest accepted run instead of screenshotting by hand.
|
|
|
17
17
|
|
|
18
18
|
## Stable URLs
|
|
19
19
|
|
|
20
|
-
With an organization token (`Authorization: Bearer
|
|
20
|
+
With an organization token (`Authorization: Bearer kal_…`, a read-only
|
|
21
21
|
viewer token is enough):
|
|
22
22
|
|
|
23
23
|
```
|
|
@@ -47,8 +47,10 @@ scenarios.
|
|
|
47
47
|
Settings → Integrations → Webhooks (admin): an https URL and the events
|
|
48
48
|
`run.accepted` and/or `run.shared`. Each call is a JSON POST
|
|
49
49
|
`{ id, type, created_at, org, data: { run, steps, steps_url, changes_url } }`
|
|
50
|
-
with `
|
|
51
|
-
signed with the webhook's secret (copy it from Settings).
|
|
50
|
+
with `Kaloko-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of "<t>.<body>">`
|
|
51
|
+
signed with the webhook's secret (copy it from Settings). The old
|
|
52
|
+
`QAwalk-Signature` header is still sent with the same value, so existing
|
|
53
|
+
receivers keep working; read `Kaloko-Signature` in new code. Verify the
|
|
52
54
|
signature and the time (reject older than 5 minutes), answer 2xx within 5
|
|
53
55
|
seconds, and do the work asynchronously. Also over the API:
|
|
54
56
|
`GET|POST /api/v1/orgs/<org>/webhooks`, `DELETE …/webhooks/<id>`.
|
|
@@ -56,7 +58,7 @@ seconds, and do the work asynchronously. Also over the API:
|
|
|
56
58
|
## Export into a folder
|
|
57
59
|
|
|
58
60
|
```bash
|
|
59
|
-
npx kaloko export --scenario checkout --accepted --out docs/assets/checkout
|
|
61
|
+
npx kaloko export steps --scenario checkout --accepted --out docs/assets/checkout
|
|
60
62
|
```
|
|
61
63
|
|
|
62
64
|
writes `steps/<step>/<locale>/<viewport>.<ext>` and `.html` plus
|
|
@@ -33,10 +33,17 @@ Ask before filing issues in bulk; one issue per real problem, not per criterion.
|
|
|
33
33
|
## Channels per project
|
|
34
34
|
|
|
35
35
|
Slack and Teams channels are chosen per project by an admin, with the events
|
|
36
|
-
each wants (new run, returned, accepted, comment, mention, release recorded
|
|
37
|
-
quiet hours. Nothing to do from the CLI: sharing,
|
|
38
|
-
release reach the right channels. Restricted projects
|
|
39
|
-
name them.
|
|
36
|
+
each wants (new run, returned, accepted, comment, mention, release recorded,
|
|
37
|
+
waiting for approval) and quiet hours. Nothing to do from the CLI: sharing,
|
|
38
|
+
returning and recording a release reach the right channels. Restricted projects
|
|
39
|
+
reach only channels that name them.
|
|
40
|
+
|
|
41
|
+
Required approvers are asked by name: a run that waits for them sends each one a
|
|
42
|
+
Slack direct message (when their e-mail is in the workspace) with a link into
|
|
43
|
+
review mode, names them in channels that take "waiting for approval" (the Teams
|
|
44
|
+
route), and reminds them once after 24 hours by default. Do not message
|
|
45
|
+
approvers yourself after sharing; tell the person the run is waiting and give
|
|
46
|
+
the review link.
|
|
40
47
|
|
|
41
48
|
## Hosted runs
|
|
42
49
|
|
|
@@ -49,8 +56,15 @@ kaloko schedule add --scenario qa/flows/account.yml --env staging --every week -
|
|
|
49
56
|
kaloko schedule list # next and last run, pages used this month
|
|
50
57
|
kaloko schedule run <id> # starts within 15 minutes
|
|
51
58
|
kaloko schedule pause|resume|remove <id>
|
|
59
|
+
kaloko schedule hook <id> # URL + secret that start the run after a deploy (secret shown once)
|
|
52
60
|
```
|
|
53
61
|
|
|
62
|
+
- Run after a deploy: `kaloko schedule hook <id>` prints a trigger URL and a
|
|
63
|
+
secret. A deploy (Vercel through a `deployment_status` workflow, Netlify's
|
|
64
|
+
outgoing webhook with the secret as JWS token) or any CI job calls
|
|
65
|
+
`curl -X POST <url> -H "Authorization: Bearer <secret>"`. Put the secret in the
|
|
66
|
+
CI or hosting secrets, never in a file you commit, and do not echo it into logs.
|
|
67
|
+
|
|
54
68
|
- Works for: public pages, pages behind HTTP Basic (the environment's
|
|
55
69
|
`access.basic` variables are sent once and stored encrypted), and signed-in
|
|
56
70
|
pages through a session saved with `kaloko auth save` (`--account`, cookies only).
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
`https://kaloko.app/mcp` speaks MCP over Streamable HTTP (JSON-RPC 2.0,
|
|
4
4
|
POST only, one message per request). Authenticate with an organization API
|
|
5
|
-
token as `Authorization: Bearer
|
|
6
|
-
|
|
5
|
+
token as `Authorization: Bearer kal_…`. The server is part of the Team plan
|
|
6
|
+
and up. A read-only token is enough to read; tools that write need a token
|
|
7
|
+
with that scope, as noted below. Nothing binary crosses MCP: summaries carry the URLs of
|
|
7
8
|
screenshots and files, which the same token can fetch over HTTPS.
|
|
8
9
|
|
|
9
10
|
## Configure
|
|
@@ -20,14 +21,19 @@ file.
|
|
|
20
21
|
|
|
21
22
|
## Tools
|
|
22
23
|
|
|
24
|
+
List tools (`list_runs`, `list_notifications`, `list_comments`) answer one page: when more match than `limit`, the
|
|
25
|
+
answer's `next` holds a cursor (also as a second text block). Call the tool again with `cursor: <next>` until `next`
|
|
26
|
+
is null. Projects and products come complete, without pages.
|
|
27
|
+
|
|
23
28
|
| Tool | Use it for |
|
|
24
29
|
|---|---|
|
|
25
|
-
| `list_runs` | published runs, newest first; filters `scenario`, `project`, `verdict`, `author`, `environment`, `branch`, `limit` |
|
|
30
|
+
| `list_runs` | published runs, newest first; filters `scenario`, `project`, `verdict`, `author`, `environment`, `branch`, `limit`; `cursor` for the next page |
|
|
26
31
|
| `get_run_summary` | one run: statuses per step and locale, criteria that need attention with evidence (semantic ones with score and the evaluator's one-sentence `reason` per locale and viewport), regions ignored in pixel diffs and regions seen moving (`ignored_regions`, `unstable_regions`), screenshot URLs, verdict, baseline, canvas URL, open feedback |
|
|
27
32
|
| `get_feedback` | run verdict with note, approved steps, unresolved rejections and comments, failed manual criteria (`run_id`, or `scenario` for its latest run) |
|
|
28
|
-
| `list_notifications` | the token owner's inbox (`unread_only`, `limit`) |
|
|
33
|
+
| `list_notifications` | the token owner's inbox (`unread_only`, `limit`, `cursor`) |
|
|
29
34
|
| `list_projects` | projects of the organization with counts; the slug is the `project` filter of `list_runs` and the value for `project:` in a scenario |
|
|
30
35
|
| `get_criteria_verdicts` | reviewer verdicts on manual or overridden criteria of a run |
|
|
36
|
+
| `get_stack_items` | the pages of a stack step (`run_id`, `step`; filters `status`, `criterion`, text): path, URL, title, status and failing criteria with evidence, screenshot URLs |
|
|
31
37
|
| `get_step_recording` | a step's recording and trace (`run_id`, `step`, `locale`, `viewport`, `trace: true` for the full trace): video URLs, duration, its chapter of a flow recording, failed attempts, the trace summary (failed requests, console errors, slowest request); see [recording.md](recording.md). `get_run_summary` lists trace summaries per step too |
|
|
32
38
|
| `get_review_queue` | what a person still has to decide in a run (`run_id`, or `scenario` / nothing for the newest run): steps in review order with reasons, decisions, approvals carried over unchanged steps with their origin, counts and `review_url` to give the person |
|
|
33
39
|
| `decide_step` | records your (the agent's) decision on a step: `approve`, or `return` with a `note`; marked as an agent's and not counted as a person's. Never use it to approve for a person |
|
|
@@ -36,7 +42,9 @@ file.
|
|
|
36
42
|
| `list_products` | the products the caller reads: name, modules, the projects it maps that the caller sees, the newest release, published docs (versions, languages), who reads it (and the public link), whether the caller manages it, links to its page, changelog and docs |
|
|
37
43
|
| `get_changelog` | the visual changelog of a product (`product`, `version`, `resolve: true` for the pictures, `limit`): releases newest first with the entry as written and its groups; see [docs.md](docs.md) |
|
|
38
44
|
| `draft_changelog_entry` | what accepted runs since the last release (or `since`) show differently, as a Keep a Changelog draft with before/after step references (`product`, `since`) |
|
|
39
|
-
| `resolve_step_image` | one step reference (`ref` = `kaloko:<scenario>/<step>?…`, `product`, `version`, `locale`, `viewport`) as a signed image URL with its run, how the version was found and canvas links |
|
|
45
|
+
| `resolve_step_image` | one step reference (`ref` = `kaloko:<scenario>/<step>?…`, `product`, `version`, `locale`, `viewport`) as a signed image URL with its run, how the version was found and canvas links; `video` (mp4, webm, duration_ms) when the step's recording plays (`media=video` / `media=image` in the ref) |
|
|
46
|
+
| `get_docs` | a product's published docs (`product`; without `path` the versions, languages and sidebar; with `path` one page with its Markdown, sections, stale sections and, with `resolve: true`, its pictures) |
|
|
47
|
+
| `docs_check` | what needs attention in the published docs of a version: broken step references, references without an accepted picture, stale sections, missing or outdated translations, release items without a picture |
|
|
40
48
|
| `list_step_changes` | documentation layer: steps whose capture or status changed since the previous accepted run or `since` (`scenario`, `since`, `accepted`); see [documentation.md](documentation.md) |
|
|
41
49
|
| `get_started` | where the organization stands (`empty`, `sample`, `active`), its sample run, the next steps and a prompt; call it in a new project, see [first-run.md](first-run.md) |
|
|
42
50
|
| `add_sample_run` | adds the sample run (or returns the one there is); needs an upload or full token and the Developer / Tester role |
|
|
@@ -47,10 +55,13 @@ file.
|
|
|
47
55
|
|
|
48
56
|
| Tool | Use |
|
|
49
57
|
|---|---|
|
|
50
|
-
| `list_comments` | open threads (or `state: all`) across the organization, filtered by `scenario` or `run_id`, with replies, pins, anchors, drawn regions (`region.px`: CSS pixels of the page in `region.viewport`), attached images with URLs, and who wrote them |
|
|
58
|
+
| `list_comments` | open threads (or `state: all`) across the organization, filtered by `scenario` or `run_id`, with replies, pins, anchors, drawn regions (`region.px`: CSS pixels of the page in `region.viewport`), attached images with URLs, and who wrote them; `limit`, `cursor` |
|
|
51
59
|
| `add_comment` | comment on a step (`run_id` + `step`), the whole run (`run_id`) or the whole flow (`scenario`); `parent_id` replies; optional `pin` `{ x, y, viewport }` or `shape` (box or arrow in fractions, with `viewport` and `size`) |
|
|
52
60
|
| `list_ignore_regions` | regions people drew to leave out of pixel diffs, per step, with the `ignore:` entry each becomes (`kaloko stability --pull` writes them) |
|
|
53
61
|
| `add_ignore_region` | suggest such a region (`run_id`, `step`, `viewport`, `rect` in CSS px); Developer / Tester, scope upload or full |
|
|
62
|
+
| `get_findings` | experimental Clef triage findings of a run (`run_id`): the kind of problem on each screen or in recording frames, with probability, severity and box, and the answers testers gave. Findings never change a verdict |
|
|
63
|
+
| `answer_finding` | answers a finding (`run_id`, `node`, `locale`, `viewport`, `finding`, `kind`, `answer`: right, wrong or comment with the `comment_id` from `add_comment`); scope comment |
|
|
64
|
+
| `get_triage_report` | the organization's Clef numbers of the last 90 days (read-only): findings shown and answered, precision and calibration per kind, findings turned into comments, median hours to the first review with and without findings, triage requests per useful finding. Report them as they are; the go/no-go is a person's |
|
|
54
65
|
| `get_signoff_record` | the signed acceptance record of an accepted run (Business): approvals with provenance, criteria, capture hashes, signature |
|
|
55
66
|
| `resolve_comment` | close a thread with a `note` that says what changed (it becomes the last reply) |
|
|
56
67
|
| `reopen_comment`, `edit_comment`, `delete_comment` | reopen; edit or delete your own comment |
|
|
@@ -58,14 +69,16 @@ file.
|
|
|
58
69
|
| `list_issues` | issues created from steps with key, URL and state (`run_id`, `scenario`, `state`) |
|
|
59
70
|
| `list_schedules`, `run_schedule` | hosted runs: schedules of read-only scenarios on Kaloko's browsers with the month's page budget; start one now (`id`) |
|
|
60
71
|
|
|
61
|
-
Writes need a token with
|
|
72
|
+
Writes here need a token with the `comment` scope (or full); `add_ignore_region`
|
|
73
|
+
and `run_schedule` need upload or full. Follow *Processing feedback* in
|
|
62
74
|
[collaboration.md](collaboration.md).
|
|
63
75
|
|
|
64
76
|
Typical loop for an agent that owns a task: `list_runs` with the scenario →
|
|
65
77
|
`get_feedback` for the latest run → fix what was returned → new run with the
|
|
66
78
|
CLI (`kaloko start … share`) → post the canvas URL in the issue. Capturing,
|
|
67
|
-
evaluating and uploading stay in the CLI; MCP reads,
|
|
68
|
-
|
|
79
|
+
evaluating and uploading stay in the CLI; MCP reads, comments, records
|
|
80
|
+
decisions and answers to findings, creates issues, and for design drafts also
|
|
81
|
+
publishes versions and sets references and step status (below).
|
|
69
82
|
|
|
70
83
|
Errors come back as tool results with `isError: true` (unknown run, expired
|
|
71
84
|
run, missing argument); an invalid token is HTTP 401.
|
|
@@ -5,7 +5,7 @@ Design steps are live pages. The same files have to work in three places:
|
|
|
5
5
|
- **on the live origin** of the canvas (`<revision>.kaloko-usercontent.com`): a sandboxed frame with an opaque origin and
|
|
6
6
|
`Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; connect-src 'self'; frame-src 'none';
|
|
7
7
|
worker-src 'none'; form-action 'none'` (no popups, no modals, no service workers);
|
|
8
|
-
- **from disk** (`file://`): the local preview, `kaloko export
|
|
8
|
+
- **from disk** (`file://`): the local preview, `kaloko export design`, and anyone who unzips an export;
|
|
9
9
|
- **in another tool**: the export is the handoff and the way out of Kaloko.
|
|
10
10
|
|
|
11
11
|
`kaloko design lint` checks a design folder against the rules below; `kaloko sync` runs it first and stops on errors
|
|
@@ -72,8 +72,10 @@ missing with the install command for the OS.
|
|
|
72
72
|
The step detail gets Video next to Screenshot: the poster first, nothing loads
|
|
73
73
|
until played, markers for the start, the capture, actions and failed requests.
|
|
74
74
|
Technical shows the trace; a click on a row moves the video there. Cards play
|
|
75
|
-
the preview on hover.
|
|
76
|
-
|
|
75
|
+
the preview on hover. Videos play on: after one ends, the next step's video
|
|
76
|
+
starts by itself, and replay with video moves to the next step on its own; a
|
|
77
|
+
step that needs a decision waits, a step without video shows its screenshot for
|
|
78
|
+
three seconds. The walkthrough video is in the top bar.
|
|
77
79
|
|
|
78
80
|
## Plans and sharing
|
|
79
81
|
|