kaloko 0.15.0 → 0.16.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaloko",
3
- "version": "0.15.0",
3
+ "version": "0.16.1",
4
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",
@@ -32,7 +32,8 @@
32
32
  "access": "public"
33
33
  },
34
34
  "scripts": {
35
- "test": "node scripts/test.mjs"
35
+ "test": "node scripts/test.mjs",
36
+ "version": "node scripts/cli-catalogue.mjs && git add worker/src/cli-latest.json"
36
37
  },
37
38
  "dependencies": {
38
39
  "ajv": "^8.20.0",
@@ -8,7 +8,9 @@
8
8
  "properties": {
9
9
  "schema": { "const": "qawalk.config.v1" },
10
10
  "org": { "type": "string", "description": "Organization slug on kaloko.app." },
11
- "project": { "type": "string" },
11
+ "project": { "type": "string", "description": "Slug of the Kaloko project runs of this repository belong to (a scenario's project: wins)." },
12
+ "project_name": { "type": "string", "maxLength": 80, "description": "The name people see for that project on Kaloko (ECO Podcasty). A share creates a missing project with it; kaloko projects sync renames an existing one." },
13
+ "product": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{0,79}$", "description": "Slug of a product on Kaloko the project is part of; kaloko projects sync adds the project to it." },
12
14
  "products": {
13
15
  "type": "object",
14
16
  "description": "Optional: what is released and versioned as a whole and has its own visual changelog (docs/DOCS-CHANGELOG.md). Without it the project is the product. Keys are product slugs.",
@@ -281,6 +281,10 @@
281
281
  "slug": {
282
282
  "type": "string"
283
283
  },
284
+ "name": {
285
+ "type": "string",
286
+ "description": "The project's name from project_name: in kaloko.config.yml; a project that a share creates gets it."
287
+ },
284
288
  "repo": {
285
289
  "type": [
286
290
  "string",
@@ -373,6 +373,24 @@
373
373
  "description": "Regions left out of pixel comparisons (clocks, ads, carousels): a selector, or a rectangle in page pixels of one viewport. kaloko stability suggests them.",
374
374
  "items": { "$ref": "#/$defs/ignoreRegion" }
375
375
  },
376
+ "details": {
377
+ "type": "array",
378
+ "maxItems": 20,
379
+ "description": "Named details for user guides and docs: one element in the part of the page around it (its section or card), outlined, captured in every locale and viewport. Docs show one with ![…](kaloko:<scenario>/<step>#<id>).",
380
+ "items": {
381
+ "type": "object",
382
+ "required": ["id", "name", "selector"],
383
+ "additionalProperties": false,
384
+ "properties": {
385
+ "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,59}$", "description": "Stable id, used in docs references (#add-to-cart) and file names." },
386
+ "name": { "$ref": "#/$defs/localized", "description": "What the reader looks at, e.g. \"Add to cart button\"; one text or one per locale." },
387
+ "selector": { "type": "string", "minLength": 1, "description": "CSS selector of the element; the first match is outlined." },
388
+ "context": { "type": "string", "minLength": 1, "description": "How much of the page around it: section (the nearest section or landmark), card (the nearest card, list item or framed box), page (one screen around it) or a CSS selector of an ancestor. Default: the nearest section or card at least 480 × 240 px, at most one screen." },
389
+ "padding": { "type": "integer", "minimum": 0, "maximum": 200, "description": "Pixels of page around the context (default 16)." },
390
+ "states": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,39}$" }, "description": "Step states to take it in (default: every state the step is captured in)." }
391
+ }
392
+ }
393
+ },
376
394
  "items": {
377
395
  "type": "object",
378
396
  "additionalProperties": false,
@@ -26,9 +26,9 @@ description: >
26
26
  Clef triage findings (experimental) to read, mention or answer, when
27
27
  a run's health (the advisory checks of packs: SEO, accessibility,
28
28
  performance, console) should be checked, fixed or adopted into acceptance,
29
- and when a team's own repository turns runs into regulated documentation
30
- (requirement refs, kaloko evidence, the evidence package, the evidence.ready
31
- webhook).
29
+ and when a team's own repository turns runs into quality evidence for its
30
+ QMS or GxP (requirement refs, kaloko evidence, the evidence package, the
31
+ evidence.ready webhook).
32
32
  ---
33
33
 
34
34
  # Kaloko
@@ -89,7 +89,9 @@ verdict), and run `kaloko prune` without `--yes` to see what a clean-up would do
89
89
  Draft and edit the Unreleased section of the changelog (`kaloko changelog draft
90
90
  --apply`) and add step references to it and to guides. Put the products of the
91
91
  config on Kaloko (`kaloko products sync`: it records no release) and list them
92
- (`kaloko products list`). Write, translate and fix
92
+ (`kaloko products list`). Create the project the config names
93
+ (`kaloko projects sync` or `kaloko projects create` with the name the person
94
+ gave). Write, translate and fix
93
95
  guides in the docs folder, run `kaloko docs check`, and export them for a docs
94
96
  site (`kaloko export docs --format …`) into a local folder.
95
97
 
@@ -105,6 +107,9 @@ design reference or baseline, merging a design branch, keeping your version of
105
107
  a step in a sync conflict (`--mine`), turning on `html_view`, turning on recordings for
106
108
  a whole project (`capture.record` in the config: storage), a real clean-up
107
109
  (`kaloko prune --yes`), trashing someone else's run, archiving a scenario,
110
+ renaming a project or restricting it (`kaloko projects rename`, a `kaloko
111
+ projects sync` that would rename), picking one site of a repository that
112
+ holds several (ask which one before `kaloko init` or a walk),
108
113
  recording a release (`kaloko release`) or asking to publish a changelog,
109
114
  publishing docs (`kaloko docs publish`, `--reviewed` above all: it says a
110
115
  person checked the text), writing a release workflow (`kaloko ci github
@@ -125,7 +130,11 @@ only when a person says that value may be uploaded.
125
130
 
126
131
  - A new project or an organization without runs of its own (install, sign in,
127
132
  the sample run, the first flow from a URL or a task, share, point the person
128
- to the canvas): [reference/first-run.md](reference/first-run.md)
133
+ to the canvas), and naming the project on Kaloko (`project_name:`,
134
+ `kaloko projects create|rename|sync`): [reference/first-run.md](reference/first-run.md)
135
+ - A repository with several sites or apps (monorepo, Rails engines, Folio
136
+ sites): ask which one, then `kaloko init --site … --base-url …`:
137
+ [reference/first-run.md#several-sites-in-one-repository](reference/first-run.md#several-sites-in-one-repository)
129
138
  - Writing or updating the plan and scenario: [reference/acceptance.md](reference/acceptance.md)
130
139
  - Android, iOS (Simulator or a real iPhone), Electron, macOS and Windows apps,
131
140
  several devices of one app, WebViews inside apps, or screens captured by
@@ -169,8 +178,9 @@ only when a person says that value may be uploaded.
169
178
  [reference/collaboration.md](reference/collaboration.md)
170
179
  - Reading runs, feedback and the inbox over MCP instead of the CLI:
171
180
  [reference/mcp.md](reference/mcp.md)
172
- - Evidence for regulated work (GxP): requirement `refs:`, `kaloko evidence`,
173
- the evidence package and its check, the `evidence.ready` webhook, feeding a
181
+ - Quality evidence for a team's QMS (ISO 9001, ISO 13485, IEC 62304, ISO 27001;
182
+ GxP is the strictest case): requirement `refs:`, `kaloko evidence`, the
183
+ evidence package and its check, the `evidence.ready` webhook, feeding a
174
184
  team's own document templates, signatures and what an agent must never do:
175
185
  [reference/evidence.md](reference/evidence.md)
176
186
  - Filing a returned step or a failing criterion in Jira or Linear, issue keys in
@@ -200,9 +210,12 @@ only when a person says that value may be uploaded.
200
210
  tools (relative URLs, no CDNs, state in the URL, deterministic content,
201
211
  links between steps; what `kaloko design lint` checks):
202
212
  [reference/portable-html.md](reference/portable-html.md)
203
- - Command reference: `kaloko help`; when something does not work (Chrome,
213
+ - Command reference: `kaloko help` (`kaloko help --json` lists every command,
214
+ sub-command and option as data); when something does not work (Chrome,
204
215
  token, environment URL, evaluator key), run `kaloko doctor` first and fix
205
- what it marks ✕.
216
+ what it marks ✕. When a command answers "… is in kaloko X (you have Y)",
217
+ the project's kaloko is too old for it: tell the person and suggest the
218
+ update command from that line; change the dependency only when they agree.
206
219
 
207
220
  Project configuration is `kaloko.config.yml` in the repository root.
208
221
  Project skills may add conventions (paths, test data, locales); follow them
@@ -97,8 +97,10 @@ English words; one plain word such as a brand name is left alone).
97
97
  reader announces). `HC313` landmarks (one `main`, labelled repeats) and
98
98
  `HC314` ARIA (unknown roles and attributes, references to missing ids,
99
99
  `aria-hidden` over focusable content) are read from the page. The first
100
- five focus stops are kept as screenshots and the canvas can draw the tab
101
- order on the capture. The walk only moves focus: nothing is clicked or
100
+ five focus stops are kept as screenshots (step attachments of kind
101
+ `focus`, "Keyboard focus · HC309" on the canvas, linked to the check; the
102
+ Health tab shows them under `HC309` and in the tab order) and the canvas
103
+ can draw the tab order on the capture. The walk only moves focus: nothing is clicked or
102
104
  typed, and the page is left unfocused at the top. Stack steps walk the
103
105
  keyboard on their first five pages. Still a subset of WCAG 2.2 AA; it
104
106
  does not replace an audit with a screen reader.
@@ -14,6 +14,7 @@ A picture in Markdown names a step instead of a PNG file:
14
14
  ![Payment](kaloko:checkout/payment?version=prev) the release before the one this entry belongs to
15
15
  ![Payment](kaloko:checkout/payment?locale=cs&viewport=mobile&state=dark)
16
16
  ![Payment](kaloko:checkout/payment?media=video) the step's recording plays on the picture
17
+ ![Pay](kaloko:checkout/payment#pay-button) a named detail of the step (details: in the scenario)
17
18
  ![Payment](kaloko:payment) a step of the product's default_scenario
18
19
  ```
19
20
 
@@ -28,6 +29,29 @@ a dialog, a language switch), not for every step. Check a reference with MCP `re
28
29
  `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
29
30
  (`release`, `app_version`, `reference_env`, `accepted`; `exact: false` means a fallback).
30
31
 
32
+ ## Details for guides
33
+
34
+ When a guide talks about one control, show that control in its part of the page instead of the whole screen. Declare
35
+ it on the step in the scenario and refer to it with `#<id>`:
36
+
37
+ ```yaml
38
+ details:
39
+ - id: pay-button # letters, digits, - and _; used in references and file names
40
+ name: { en: Pay button, cs: Tlačítko Zaplatit } # one text or one per locale
41
+ selector: "#pay" # the first match is outlined
42
+ context: card # optional: section | card | page | a CSS selector of an ancestor
43
+ padding: 24 # optional, px around the context (default 16)
44
+ states: [error] # optional: only in these states of the step
45
+ ```
46
+
47
+ Without `context` the picture is the nearest section, landmark or card around the element that is at least
48
+ 480 × 240 px (90 % of the width on a phone), at most one screen around the element, with a ring drawn around the
49
+ element. Every walk takes each detail in every locale and viewport, masked like the screenshot, as an attachment of
50
+ kind `detail` (canvas: Page tab → Step attachments → Details for guides, with the reference). Only screen steps take
51
+ details. A reference to a detail no accepted run has yet shows the whole screen; `kaloko docs check` warns under
52
+ `missing_details` (the scenario does not declare it) and `no_detail` (no accepted run has it: walk and accept).
53
+ Prefer a detail over a crop when the text names one button, field or message; keep the whole screen for orientation.
54
+
31
55
  Never invent a step id or a version. Use ids from the scenario files and versions from `CHANGELOG.md` or git tags.
32
56
 
33
57
  ## After a user-visible change
@@ -1,12 +1,14 @@
1
- # Evidence for your own documentation (regulated work)
1
+ # Quality evidence for your own documentation
2
2
 
3
3
  Use this when a team's own repository turns Kaloko runs into its documents: test protocols, reports, trace
4
- matrices, release summaries for a quality system. Kaloko provides the evidence and a way to check it; the team's
5
- own templates and skills write the documents. Kaloko never formats anything for a particular QMS, and you do not put
4
+ matrices, release summaries for its quality management system (ISO 9001, ISO 13485, IEC 62304, ISO 27001, or GxP
5
+ under 21 CFR Part 11 and EU GMP Annex 11, the strictest case). Kaloko provides the evidence and a way to check it;
6
+ the team's own templates and skills write the documents. Kaloko never formats anything for a particular QMS, and you do not put
6
7
  the team's SOP structure into Kaloko.
7
8
 
8
9
  The background for people (what a record proves, the two signing paths, known gaps) is in Kaloko's help, page
9
- *Kaloko in regulated work (GxP)*. Evidence is a Business feature.
10
+ *Quality evidence for your QMS* (it maps the frameworks and has a GxP section). Evidence is a Business feature.
11
+ Kaloko provides evidence; it never makes a team compliant or certified, so never write that it does.
10
12
 
11
13
  ## The contract
12
14
 
@@ -24,11 +24,17 @@ with a person who knows where to approve it.
24
24
  ## From zero to a first shared run
25
25
 
26
26
  1. `npm install --save-dev kaloko`, then
27
- `npx kaloko init --agent claude --org <org>` (it prints the sample link
28
- and these steps). Fill `environments` in `kaloko.config.yml` with the URL
29
- the app runs on.
27
+ `npx kaloko init --agent claude --org <org> --project <slug> --project-name "<name>"`
28
+ (it prints the sample link and these steps). Ask the person how the project
29
+ should be called on Kaloko when you do not know; the slug is lowercase
30
+ (`eco-podcasty`), the name is what people see (`ECO Podcasty`). Fill
31
+ `environments` in `kaloko.config.yml` with the URL the app runs on. When
32
+ the repository holds several sites, see [Several sites in one
33
+ repository](#several-sites-in-one-repository) first.
30
34
  2. `npx kaloko login`: the person approves a token in the browser. Ask them
31
- to; never create or paste tokens yourself.
35
+ to; never create or paste tokens yourself. Then `npx kaloko projects sync`
36
+ puts the project of the config on Kaloko with its name (a first
37
+ `kaloko share` would create it too).
32
38
  3. `npx kaloko doctor` and fix what it marks ✕.
33
39
  4. Draft the first scenario:
34
40
  - public pages: `npx kaloko draft <url> [url…]` writes a read-only
@@ -49,3 +55,30 @@ with a person who knows where to approve it.
49
55
  Done means: the scenario validates, the run is shared, its URL and summary
50
56
  line are in your reply (and in the issue or PR the work belongs to), and the
51
57
  person knows whether the sample or this run is what they should open.
58
+
59
+ ## Several sites in one repository
60
+
61
+ A monorepo (`apps/*` with their own dev server), a Rails app with engines or
62
+ several Folio sites, or routes split by host: `kaloko init` lists the sites
63
+ it found and drafts no steps, because routes of the whole repository mix the
64
+ sites (favicons, ad endpoints and API routes of another site end up as
65
+ "pages").
66
+
67
+ 1. Ask the person which site the work is about before `init` or a walk. Do
68
+ not pick one yourself.
69
+ 2. Run init for that site, best against the running site so the pages come
70
+ from its sitemap or its navigation:
71
+ - `npx kaloko init --site eco-podcasty --base-url http://eco-podcasty.localhost:3000`
72
+ - `npx kaloko init --site apps/web` (a workspace app: its own routes and dev
73
+ server; `--base-url` still reads the running site when it is up)
74
+ Only the host of `--base-url` is asked, with short time limits; offline the
75
+ code is read.
76
+ 3. Read the comment at the top of `qa/flows/main-pages.yml`: it says where the
77
+ pages came from and which paths were skipped and why. Sharpen the steps;
78
+ add pages the person names.
79
+ 4. When the site is not running and has no routes of its own (a Folio site),
80
+ `npx kaloko init --site <name> --skeleton` writes a scenario with a TODO;
81
+ fill it with the pages the person names.
82
+
83
+ One config can serve one site. For a second site of the same repository use
84
+ another config (`--config kaloko.<site>.config.yml`) with its own `project:`.
@@ -32,6 +32,7 @@ is null. Projects and products come complete, without pages.
32
32
  | `get_feedback` | run verdict with note, approved steps, unresolved rejections and comments, failed manual criteria (`run_id`, or `scenario` for its latest run) |
33
33
  | `list_notifications` | the token owner's inbox (`unread_only`, `limit`, `cursor`) |
34
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 |
35
+ | `upsert_project` | creates a project (`slug`, `name`, `visibility`, `product`; `create: true` refuses an existing one) or renames it; the same rules as `kaloko projects create\|rename\|sync` (a full token; renaming is for the project's admin). Ask before renaming |
35
36
  | `get_criteria_verdicts` | reviewer verdicts on manual or overridden criteria of a run |
36
37
  | `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 |
37
38
  | `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 |
@@ -42,7 +43,7 @@ is null. Projects and products come complete, without pages.
42
43
  | `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 |
43
44
  | `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) |
44
45
  | `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`) |
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
+ | `resolve_step_image` | one step reference (`ref` = `kaloko:<scenario>/<step>?…[#<detail>]`, `product`, `version`, `locale`, `viewport`, `detail`) 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); with a detail id the detail's picture and `detail` { id, name, box, size }, or the whole screen with `detail_missing` |
46
47
  | `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
48
  | `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 |
48
49
  | `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) |