testeiya 0.3.10 → 0.3.14
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 +55 -14
- package/dist/prompt/index.js +1 -1
- package/dist/prompt/system-prompt.js +3 -3
- package/dist/prompt/system-prompt.js.map +1 -1
- package/dist/prompt/tools.js +13 -0
- package/dist/prompt/tools.js.map +1 -1
- package/dist/src/args.js +70 -18
- package/dist/src/args.js.map +1 -1
- package/dist/src/cli.js +17 -9
- package/dist/src/cli.js.map +1 -1
- package/dist/src/doctor.js +15 -30
- package/dist/src/doctor.js.map +1 -1
- package/dist/src/env.js +10 -0
- package/dist/src/env.js.map +1 -1
- package/dist/src/output.js +32 -1
- package/dist/src/output.js.map +1 -1
- package/dist/src/run.js +34 -12
- package/dist/src/run.js.map +1 -1
- package/dist/src/session.js +8 -2
- package/dist/src/session.js.map +1 -1
- package/dist/src/sessions.js +11 -0
- package/dist/src/sessions.js.map +1 -1
- package/dist/src/skills.js +130 -0
- package/dist/src/skills.js.map +1 -0
- package/package.json +1 -1
- package/prompt/index.ts +3 -3
- package/prompt/system-prompt.ts +5 -5
- package/prompt/tools.ts +15 -0
- package/skills/skills.lock.json +16 -15
- package/skills/skills.yaml +1 -0
- package/skills/testomatio/explorbot/prima/SKILL.md +87 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prima
|
|
3
|
+
description: Use for any browser work — driving a web app, checking a behaviour, filling a form, reading a page — via npx prima-cli, in preference to npx playwright-cli, which prima runs on top of and falls back to. Covers npx prima-cli check, do, pw, verify, ask, research, go, status, report, browser, config, and session setup. Trigger on "prima", "prima-cli", "npx prima-cli", on a browser task described as behaviour ("confirm the editor saves"), and whenever npx playwright-cli would otherwise be driven step by step.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: Testomat.io
|
|
7
|
+
version: 0.3.0
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Prima
|
|
11
|
+
|
|
12
|
+
Prima is an AI layer on top of playwright-cli. It drives the browser playwright-cli already has open, taking behaviour described in words instead of locators, and returns a plain-text envelope. Always invoke both through npx: `npx prima-cli ...` and `npx playwright-cli ...`.
|
|
13
|
+
|
|
14
|
+
**Prefer prima to playwright-cli for anything on a web page.** Snapshots stay inside prima instead of landing in your context, and it reuses the research maps and recorded experience it already has for a page — so a scenario costs a fraction of the tokens of the same scenario driven by hand. Use `npx playwright-cli` directly when prima has no command for the job, or when no AI model is configured (`pw` still works then).
|
|
15
|
+
|
|
16
|
+
## Models
|
|
17
|
+
|
|
18
|
+
Prima needs an AI model, taken from the environment — there is no init step:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
export PRIMA_CLI_AI_MODEL=openrouter/openai/gpt-oss-120b # provider comes from the name
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Screenshot analysis needs its own model, never guessed from the main one: set `PRIMA_CLI_VISION_MODEL`, or pass `--vision-model` for one run. Without it prima still runs, but `check` settles outcomes from the run log rather than the page as seen. `npx prima-cli config` prints what this directory resolves to; `--json` for machine form. Every `PRIMA_CLI_*` variable mirrors the `EXPLORBOT_*` one and wins over it, so an explorbot setup is not disturbed.
|
|
25
|
+
|
|
26
|
+
## Session
|
|
27
|
+
|
|
28
|
+
Attach to a playwright-cli session:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx playwright-cli open http://localhost:3000 # start
|
|
32
|
+
npx prima-cli <command> ... # drive
|
|
33
|
+
npx playwright-cli close # end
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Or let prima own the browser itself:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx prima-cli browser start --url http://localhost:3000
|
|
40
|
+
npx prima-cli <command> ...
|
|
41
|
+
npx prima-cli browser stop # --all stops every instance
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- Attached to playwright-cli, prima never launches or closes the browser — it attaches and disconnects. With a prima-owned browser, `browser start` holds it open until `browser stop`; `browser status` and `browser list` report what is running.
|
|
45
|
+
- `--pw-session <title>` picks the session when several playwright-cli sessions are open; `--instance <name>` separates prima-owned browsers for parallel work.
|
|
46
|
+
- `--url <url>` opens that page first when the session has none; `--endpoint <ep>` attaches to a browser server directly, skipping discovery.
|
|
47
|
+
- Requires Node.js 24+. Playwright browsers come from `npx playwright install chromium`.
|
|
48
|
+
- Every command is logged as it runs; `npx prima-cli report` turns the session into an html and markdown report, browser open or not.
|
|
49
|
+
- `npx explorbot prima <command>` runs the same tool if explorbot is already installed.
|
|
50
|
+
|
|
51
|
+
## Tiers
|
|
52
|
+
|
|
53
|
+
Start at `check`. Come down a rung only when the one above cannot hold the work.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx prima-cli check "a workflow can be created and appears in the list" --expected "the new workflow is listed"
|
|
57
|
+
npx prima-cli do "open the account menu" "choose settings" "switch the theme to dark" "check it took effect"
|
|
58
|
+
npx prima-cli pw "({ page }) => page.click('[data-test=submit]')"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- **Pass `do` the whole remaining sequence, never one step per call** — that is the entire cost advantage.
|
|
62
|
+
- `pw` takes executable code only. Never give it a description; never give `check`/`do` a locator.
|
|
63
|
+
- `check` and `do` legitimately run for minutes. Do not kill and retry.
|
|
64
|
+
- `check` runs on the page already open and never reloads it, so an open dialog, a selected tab or a filled form survives it.
|
|
65
|
+
- `--expected` is repeatable for several outcomes; without it the scenario text is the single expected outcome.
|
|
66
|
+
- Below `pw` sits playwright-cli itself.
|
|
67
|
+
|
|
68
|
+
Also: `verify` (alias `assert`), `ask` (`--no-vision` answers from structure only), `research` (`--data` includes extraction, `--deep` expands hidden elements, `--fresh` re-maps past the cache), `go`, `status <hash>`, `report`, `config`, `browser`. Run `npx prima-cli <command> --help` for each.
|
|
69
|
+
|
|
70
|
+
## Reading the envelope
|
|
71
|
+
|
|
72
|
+
- **Trust the verdict in `### Result`.** Re-verifying a PASSED outcome with another command is the waste this tool exists to remove.
|
|
73
|
+
- `ok: true` means the action you asked for landed; nothing is substituted or retried along a different route.
|
|
74
|
+
- `### Steps` marks each line `ok`, `FAIL` or `??`. `??` is an instruction that ran but the run ended without confirming — the actions that ran are listed above it, judge from those. Only `FAIL` and an instruction the page could not carry out fail the command.
|
|
75
|
+
- `not verified` means the run never checked that outcome — not that it is false, and not a failure.
|
|
76
|
+
- **`CONTRADICTION` is a finding, not a verdict to argue with.** The run and the picture disagree: something the assertions matched is not visible on screen, or the reverse. Both sides are quoted under the outcome, and `### Artifacts` names the html, aria and screenshot on disk — read those and judge the page yourself instead of taking the verdict on trust. Treat it as a bug in the app and look at it before anything else.
|
|
77
|
+
- A `### Warning` saying the outcomes came from the run log alone means no screenshot backed them: set `PRIMA_CLI_VISION_MODEL` (or pass `--vision-model`), and until then do not trust a visual claim from `check`.
|
|
78
|
+
- A run that could not complete says so, rather than reporting it as a failure of the app.
|
|
79
|
+
- `npx prima-cli config` shows which model answers for each role.
|
|
80
|
+
|
|
81
|
+
## Visual questions
|
|
82
|
+
|
|
83
|
+
Layout, position, colour, overlap, whether something is cut off — an accessibility tree does not carry any of it, and neither does an assertion that passed.
|
|
84
|
+
|
|
85
|
+
- `check` settles its outcomes against a screenshot of the final page. What a user can see is the proof; the run log only says what was done.
|
|
86
|
+
- `ask "<question>"` — reads a screenshot, answers in prose. Use for anything open-ended about appearance.
|
|
87
|
+
- `verify` proves claims with assertions; each comes back PASSED or FAILED with its playwright form, no overall verdict — read the lines and decide. When no assertion can express a claim it reports "none ran" instead of judging it failed.
|