@ia-qa/pal 0.2.0 → 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.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  **A QA pal next to your team — not instead of it.**
4
4
 
5
- One command walks your web app, maps every page, checks it, and compares it with the last tour. Then it tells you four things, in the order you act on them: what is **broken**, what **needs a decision**, what is **ready to repair**, and what it **could not see**.
5
+ One command walks your web app, maps every page, checks it, and compares it with the last tour — and, when you declare your end-to-end suite, reads it too. Then it tells you four things, in the order you act on them: what is **broken**, what **needs a decision**, what is **ready to repair**, and what it **could not see**.
6
6
 
7
7
  - **Local.** A headless browser on your machine. Nothing is uploaded, no account, no LLM.
8
8
  - **Deterministic.** Verdicts come from [`@ia-qa/self-healing`](https://www.npmjs.com/package/@ia-qa/self-healing) — the same engine as `ia-qa-heal diff` and `ia-qa-heal check`, so the two can never disagree.
@@ -23,7 +23,7 @@ npx playwright install chromium
23
23
  npx ia-qa-pal tour
24
24
  ```
25
25
 
26
- **Not set up yet?** In a terminal, the first `tour` asks two questions — where the app lives, and how it logs in — then reads its pages from `sitemap.xml` (or, without one, follows its links: same host, GET only, at most 50 pages), shows you exactly what it will write, and writes it only when you say yes. Nothing it asks takes a password.
26
+ **Not set up yet?** In a terminal, the first `tour` asks where the app lives and how it logs in — and, when it finds a test suite in the project, whether to read it — then reads its pages from `sitemap.xml` (or, without one, follows its links: same host, GET only, at most 50 pages), shows you exactly what it will write, and writes it only when you say yes. Nothing it asks takes a password.
27
27
 
28
28
  From CI or an agent, the same setup with flags:
29
29
 
@@ -60,11 +60,42 @@ ia-qa-pal tour — https://app.example · level 1 (with a login)
60
60
 
61
61
  The time estimate only appears once a batch has been explored on your app: it is the pace measured there, never a constant.
62
62
 
63
+ ## With your test suite
64
+
65
+ Declare it at setup (`--tests tests/`, or answer yes when the tour finds it) and every tour also reads it:
66
+
67
+ - **🔧 Ready to repair** — when a selector your tests write stops reaching its element while the element is still there, the rewrite is listed with `file:line` and the command that applies it after you review it. pal never edits your tests.
68
+ - **⛔ To decide** — locator names your tests use that nothing on the mapped pages carries, and renamed labels your tests locate by name.
69
+ - **🔍 Not seen** — `ia-qa-pal tour --suite` runs the `testCommand` from your config once, with the capture hook, and names the pages your suite **never visits**. The capture is kept apart from the tour's contracts. Your specs need the hook for this — one import:
70
+
71
+ ```js
72
+ import { test, expect } from '@ia-qa/self-healing/capture';
73
+ ```
74
+
75
+ Without it, the report says the suite ran but recorded no page — never that it visits nothing.
76
+
77
+ ## In the background, and for agents
78
+
79
+ ```bash
80
+ npx ia-qa-pal tour --background # returns at once
81
+ npx ia-qa-pal status # phase and progress, then the report
82
+ ```
83
+
84
+ One tour runs per project; a second is refused while the first is alive, and a tour whose process died is reported as interrupted, never as running.
85
+
86
+ `ia-qa-pal-mcp` is the same thing as a local stdio MCP server — `pal_project`, `pal_setup`, `pal_tour` (always in the background, so no client times out) and `pal_status`. No tool takes a command, and there is no login tool.
87
+
88
+ ```json
89
+ { "mcpServers": { "ia-qa-pal": { "command": "npx", "args": ["-y", "-p", "@ia-qa/pal", "ia-qa-pal-mcp"] } } }
90
+ ```
91
+
63
92
  ### Options
64
93
 
65
94
  | flag | |
66
95
  |---|---|
67
96
  | `--more` | explore the next batch in depth instead of a regression tour |
97
+ | `--suite` | also run your test command once, with the capture hook |
98
+ | `--background` | start detached and return at once |
68
99
  | `--batch <n>` | pages per depth batch (default 10) |
69
100
  | `--json` | the whole report as one JSON document on stdout; progress stays on stderr |
70
101
  | `--session <file>` | a Playwright `storageState` to reuse |
@@ -74,9 +105,9 @@ The time estimate only appears once a batch has been explored on your app: it is
74
105
 
75
106
  | code | meaning |
76
107
  |---|---|
77
- | `0` | nothing needs a decision (warnings never fail a tour) |
78
- | `1` | a dead link, or drift that blocks (an element lost, ambiguous, or a selector now pointing at another element) |
79
- | `2` | could not answer: not set up, nothing could be mapped, or the tour refused to run |
108
+ | `0` | nothing needs a decision (warnings and proposed repairs never fail a tour) |
109
+ | `1` | a dead link, drift that blocks (an element lost, ambiguous, or a selector now pointing at another element), or your suite failed when run with `--suite` |
110
+ | `2` | could not answer: not set up, nothing could be mapped, the tour refused to run, or one is already running |
80
111
 
81
112
  Read `2` as "no answer", never as "the app is broken".
82
113
 
@@ -85,8 +116,5 @@ Read `2` as "no answer", never as "the app is broken".
85
116
  - **Only your app.** Its pages load whatever they load in any browser.
86
117
  - **Exploration is read-only.** While menus, tabs and dialogs are opened, every non-GET request is blocked, and controls named like actions (log out, delete, pay…) are never clicked.
87
118
  - **The link check** requests your app's own links with GET, skipping any URL that acts (`/logout`, `/delete`…).
88
- - **Files** live in `.ia-qa/`: contracts, baseline, and `pal/state.json` (pace and already-reported findings). A saved session there holds live cookies — it is gitignored and never leaves your machine.
89
-
90
- ## Not yet
91
-
92
- Reading your test suite (coverage of what it does not test, repairs proposed as a patch), a local MCP server for agents, and background exploration are planned next.
119
+ - **Your test command** runs only with `--suite` (or `suite: true` from an agent), and it is always the one in your config — never a string passed on the call.
120
+ - **Files** live in `.ia-qa/`: contracts, baseline, `usage.json` (your suite's locators), and `pal/` (the measured pace, findings already reported, the current run and its log). A saved session there holds live cookies — it is gitignored and never leaves your machine.
package/TUTORIAL.md CHANGED
@@ -33,10 +33,10 @@ In your project folder:
33
33
  npx ia-qa-pal tour
34
34
  ```
35
35
 
36
- The project is not set up yet, so the tour asks two questions first.
36
+ The project is not set up yet, so the tour asks first: where the app lives, how it logs in, and — only when it finds a test suite in the folder — whether to read it (section 7).
37
37
 
38
38
  ```
39
- This project is not set up yet — two questions first.
39
+ This project is not set up yet — a few questions first.
40
40
 
41
41
  Where does the app live? (https://…) https://www.ia-qa.com
42
42
  Does the app ask you to log in?
@@ -217,12 +217,78 @@ npx ia-qa-pal setup --url https://staging.shop.example --login session --session
217
217
 
218
218
  ---
219
219
 
220
- ## 7. In CI
220
+ ## 7. With your test suite
221
+
222
+ A tour already tells you what changed in the app. With your end-to-end suite declared, it also tells you what that change does to **your tests**.
223
+
224
+ Declare it once — the setup offers it when it finds a `tests/`, `e2e/` or `cypress/e2e/` folder with specs, or with flags:
225
+
226
+ ```bash
227
+ npx ia-qa-pal setup --url https://staging.shop.example --login none --tests tests --yes
228
+ ```
229
+
230
+ The command that runs the suite is detected from `package.json` (`test:e2e`, `e2e`…) or a `playwright.config`; set it yourself with `--test-command "npm run test:e2e"`.
231
+
232
+ From then on, every tour reads the suite's locators before capturing, and the report gains three things.
233
+
234
+ **🔧 Ready to repair.** A selector your tests write stopped reaching its element — the class changed, a `data-testid` was added — while the element itself is still on the page (illustrative):
235
+
236
+ ```
237
+ 🔧 Ready to repair (1 replacement in 1 file)
238
+ tests/settings.spec.js:17 .btn-primary → #prefs > button:nth-of-type(1)
239
+ Apply after review: npx -p @ia-qa/self-healing ia-qa-heal fix (pal never edits your tests)
240
+ ```
241
+
242
+ pal only lists it. `ia-qa-heal fix` computes the same rewrite and applies it — review it with `git diff` before committing. A rewrite that could break a passing test (two pages wanting the same string to become two different things, an XPath inside `By.xpath`) is left out and named, never guessed.
243
+
244
+ **⛔ To decide.** Locator names your tests use that nothing on the mapped pages carries — `getByRole('button', { name: 'Save' })` when no button is called Save anymore — with `file:line`. It is advisory: the name may live on a page or in a state the tour did not map. And when a label your tests locate by name was renamed, the tour says so.
245
+
246
+ **🔍 Which pages your suite never visits.** This one needs the suite to run:
247
+
248
+ ```bash
249
+ npx ia-qa-pal tour --suite
250
+ ```
251
+
252
+ It runs the `testCommand` from your config once, with the capture hook armed, and keeps only the list of pages the suite really opened — its capture never mixes with the tour's contracts. The answer stays in the report until the next `--suite` (illustrative):
253
+
254
+ ```
255
+ 🔍 Not seen
256
+ your suite never visits 14 of 17 pages (run of 2026-09-15): faq, jeu-galaxie, jeu-classement, …
257
+ ```
258
+
259
+ Your specs need the capture hook — one import, a drop-in for Playwright's own:
260
+
261
+ ```js
262
+ import { test, expect } from '@ia-qa/self-healing/capture';
263
+ ```
264
+
265
+ Without it, the report says the suite ran but recorded no page, and names the import. It never says your suite visits nothing. If the suite fails during `--suite`, the tour reports it under **Broken** and exits `1`.
266
+
267
+ ---
268
+
269
+ ## 8. In the background
270
+
271
+ A tour on a large app takes a while. Start it and get your terminal back:
272
+
273
+ ```bash
274
+ npx ia-qa-pal tour --background
275
+ npx ia-qa-pal status
276
+ ```
277
+
278
+ ```
279
+ ⏳ A tour is running (pid 34136, since 2026-09-15T14:04:32Z) — depth 4/10 · jeu-planete
280
+ ```
281
+
282
+ When it is done, `status` prints the report. Only one tour runs per project: a second is refused while the first is alive, because two tours would write the same contracts. A tour whose process died before finishing is reported as **interrupted** — never as still running, never as a result. Its output is in `.ia-qa/pal/run.log`.
283
+
284
+ ---
285
+
286
+ ## 9. In CI
221
287
 
222
288
  Build the baseline on your machine, commit it, and let CI compare.
223
289
 
224
290
  ```bash
225
- git add .ia-qa/config.json .ia-qa/baseline .ia-qa/pal
291
+ git add .ia-qa/config.json .ia-qa/baseline .ia-qa/pal/state.json
226
292
  git commit -m "ia-qa-pal baseline"
227
293
  ```
228
294
 
@@ -241,13 +307,29 @@ Never commit `.ia-qa/session.json`.
241
307
 
242
308
  ---
243
309
 
244
- ## 8. With an AI agent
310
+ ## 10. With an AI agent
311
+
312
+ An agent can drive `ia-qa-pal` from a shell, or through its local MCP server:
313
+
314
+ ```json
315
+ { "mcpServers": { "ia-qa-pal": { "command": "npx", "args": ["-y", "-p", "@ia-qa/pal", "ia-qa-pal-mcp"] } } }
316
+ ```
317
+
318
+ | tool | what it does |
319
+ |---|---|
320
+ | `pal_project` | is the project set up, its level, its baseline, a tour running? |
321
+ | `pal_setup` | writes the config from **your** answers — never overwrites one |
322
+ | `pal_tour` | starts a tour in the background and returns at once, so no client times out |
323
+ | `pal_status` | progress, then the full report |
324
+
325
+ No tool takes a command — your test command comes from your config, which you wrote — and there is no login tool.
245
326
 
246
- An agent can drive `ia-qa-pal` from a shell. Three rules it must follow — they are also in `ia-qa-pal --help`:
327
+ The rules the agent must follow are also in `ia-qa-pal --help`:
247
328
 
248
329
  - **Read "Not seen".** A clean tour over part of an app is not a clean app, and the agent must say which part was not seen.
249
330
  - **A first tour is not a pass.** It established the baseline.
250
331
  - **Never answer a setup question for you, and never run `ia-qa-heal login`.** That command waits for a person at a browser; the agent gives it to you instead.
332
+ - **Never apply a proposed repair without your review, and never add `--suite` without asking** — it runs your suite on your machine.
251
333
 
252
334
  Asked to tour a project that is not set up, `ia-qa-pal tour --json` answers with what is missing rather than guessing:
253
335
 
@@ -264,16 +346,17 @@ Asked to tour a project that is not set up, `ia-qa-pal tour --json` answers with
264
346
 
265
347
  ---
266
348
 
267
- ## 9. What it touches
349
+ ## 11. What it touches
268
350
 
269
351
  - **Only your app.** Its pages load whatever they load in any browser (fonts, analytics…).
270
352
  - **Exploration is read-only.** While menus, tabs and dialogs are opened, every non-GET request is blocked, and controls named like actions (log out, delete, pay, send…) are never clicked.
271
353
  - **The link check** requests your app's own links with GET and skips any URL that acts.
272
- - **Files** live in `.ia-qa/`: `config.json`, `mapping/` (today), `baseline/` (the reference), `pal/state.json` (the measured pace and the findings already reported).
354
+ - **Your test files are read, never written.** Your test command runs only with `--suite`.
355
+ - **Files** live in `.ia-qa/`: `config.json`, `mapping/` (today), `baseline/` (the reference), `usage.json` (your suite's locators), `pal/state.json` (the measured pace, the findings already reported, the last `--suite` run), `pal/run.json` and `pal/run.log` (the current or last tour).
273
356
 
274
357
  ---
275
358
 
276
- ## 10. When something looks wrong
359
+ ## 12. When something looks wrong
277
360
 
278
361
  **A page is "not mapped" with a timeout.** One slow page costs that page, not the tour. It stays in **Not seen**; if its drift is shown, the report marks it as an older capture.
279
362
 
@@ -283,12 +366,10 @@ Asked to tour a project that is not set up, `ia-qa-pal tour --json` answers with
283
366
 
284
367
  **"only partly explored (click budget reached)".** The page has more closed controls than one exploration opens (150 clicks). Its contract covers part of the page, and the report says so.
285
368
 
286
- ---
369
+ **"A tour is already running" but nothing is.** Run `ia-qa-pal status`: a tour whose process died shows as interrupted, and the next tour starts normally.
287
370
 
288
- ## 11. Coming next
371
+ **"your suite ran but recorded no page".** Your specs do not import the capture hook (section 7).
289
372
 
290
- - **Your test suite**: which pages it never visits, and repairs to its selectors proposed as a patch — never applied without you.
291
- - **A local MCP server** so agents call `tour` as a tool.
292
- - **Background exploration**, followed from the local console.
373
+ ---
293
374
 
294
375
  `ia-qa-pal` is built on [`@ia-qa/self-healing`](https://www.npmjs.com/package/@ia-qa/self-healing): the verdicts it prints are the ones `ia-qa-heal diff` and `ia-qa-heal check` compute, so the two never disagree.
package/dist/cli/index.js CHANGED
@@ -35,9 +35,10 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  })();
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  const readline = __importStar(require("readline/promises"));
38
- const tour_1 = require("../tour");
38
+ const path = __importStar(require("path"));
39
39
  const report_1 = require("../report");
40
40
  const setup_1 = require("../setup");
41
+ const run_1 = require("../run");
41
42
  const VERSION = require('../../package.json').version;
42
43
  const HELP = `ia-qa-pal — a QA pal next to your team
43
44
 
@@ -49,34 +50,50 @@ Runs entirely on your machine with a local browser. No LLM, nothing uploaded.
49
50
  "Not seen" section included: a clean tour over part of an app is not a clean
50
51
  app, and you must say which part was not seen. A first tour establishes the
51
52
  baseline — never report it as a pass. Set a project up with flags only
52
- (\`setup --url … --login … --yes\`), never by guessing an answer for the human.
53
- Never run \`ia-qa-heal login\`: it waits for a human at a browser; ask them.
53
+ (\`setup --url … --login … --yes\`), with answers the human gave you — never
54
+ guessed. Never run \`ia-qa-heal login\`: it waits for a human at a browser; ask
55
+ them. Never apply the repairs a tour proposes without the human's review.
54
56
 
55
57
  Usage:
56
58
  ia-qa-pal tour First run: every page on the surface, the first
57
59
  batch in depth, checks, baseline.
58
60
  Next runs: re-capture, compare, check.
61
+ With a test suite declared: its selectors are
62
+ read, repairs are proposed (never applied).
59
63
  No config yet: asks the setup questions first
60
64
  (in a terminal), otherwise says what is missing.
61
65
  --more explore the next batch in depth instead
66
+ --suite also run the testCommand from config.json once,
67
+ with the capture hook, to learn which pages
68
+ the suite never visits
69
+ --background start the tour detached and return at once;
70
+ follow it with \`ia-qa-pal status\`
62
71
  --batch <n> pages per depth batch (default 10)
63
72
  --json the report as one JSON document on stdout
64
73
  --session <file> a Playwright storageState to reuse
65
74
  --config <dir> project holding .ia-qa/ (default: here)
66
75
 
76
+ ia-qa-pal status The tour running now (phase, progress) or the
77
+ last one (its report).
78
+ --json as one JSON document
79
+ --config <dir> project folder (default: here)
80
+
67
81
  ia-qa-pal setup Write .ia-qa/config.json: the app address, how it
68
- logs in, and its pages (from sitemap.xml, else by
69
- following its links). Never overwrites a config.
82
+ logs in, its pages (from sitemap.xml, else by
83
+ following its links), and your test suite.
84
+ Never overwrites a config.
70
85
  --url <https://…> the app
71
86
  --login none|browser|session none; by hand in a browser (then run
72
87
  ${setup_1.LOGIN_COMMAND});
73
88
  or a storageState your suite already writes
74
89
  --session <file> that storageState (with --login session)
90
+ --tests <dir>[,<dir>…] folders of your end-to-end suite
91
+ --test-command "<cmd>" the command that runs it (else detected)
75
92
  --yes write without asking
76
93
  --config <dir> project folder (default: here)
77
94
 
78
95
  Exit codes: 0 nothing to decide · 1 something broke or needs a decision ·
79
- 2 could not answer (not set up, nothing mapped, refused).
96
+ 2 could not answer (not set up, nothing mapped, refused, already running).
80
97
  `;
81
98
  function valueOf(args, flag) {
82
99
  const i = args.indexOf(flag);
@@ -127,6 +144,21 @@ function printSetup(outcome, json) {
127
144
  process.stderr.write(`\nNext:\n ia-qa-pal tour\n`);
128
145
  }
129
146
  }
147
+ function renderStatus(run, dir) {
148
+ if (!run)
149
+ return 'No tour has run on this project yet. Start one: ia-qa-pal tour\n';
150
+ if (run.status === 'running') {
151
+ const p = run.progress;
152
+ const where = p ? `${p.phase}${p.total ? ` ${p.done ?? 0}/${p.total}` : ''}${p.page ? ` · ${p.page}` : ''}` : 'starting';
153
+ return `⏳ A tour is running (pid ${run.pid}, since ${run.startedAt}) — ${where}\n log: ${(0, run_1.logFile)(dir)}\n`;
154
+ }
155
+ if (run.status === 'interrupted') {
156
+ return `⚠ The last tour stopped before finishing (pid ${run.pid}, started ${run.startedAt}, last seen ${run.updatedAt}). Nothing it did after that is reported. Run it again: ia-qa-pal tour\n`;
157
+ }
158
+ if (run.status === 'failed')
159
+ return `❌ The last tour failed (${run.finishedAt}): ${run.error}\n`;
160
+ return `Last tour finished ${run.finishedAt}.\n\n${run.report ? (0, report_1.renderReport)(run.report) : ''}`;
161
+ }
130
162
  async function main() {
131
163
  const args = process.argv.slice(2);
132
164
  const command = args[0];
@@ -140,21 +172,29 @@ async function main() {
140
172
  }
141
173
  const json = args.includes('--json');
142
174
  try {
175
+ const dir = path.resolve(valueOf(args, '--config') ?? process.cwd());
143
176
  if (command === 'setup') {
177
+ const tests = valueOf(args, '--tests');
144
178
  const options = {
145
- dir: valueOf(args, '--config'),
179
+ dir,
146
180
  url: valueOf(args, '--url'),
147
181
  login: loginFlag(args),
148
182
  session: valueOf(args, '--session'),
183
+ tests: tests ? tests.split(',') : undefined,
184
+ testCommand: valueOf(args, '--test-command'),
149
185
  yes: args.includes('--yes'),
150
186
  };
151
- const outcome = interactive() && !json
152
- ? await withPrompt((ask) => (0, setup_1.runSetup)({ ...options, ask }))
153
- : await (0, setup_1.runSetup)(options);
187
+ const outcome = interactive() && !json ? await withPrompt((ask) => (0, setup_1.runSetup)({ ...options, ask })) : await (0, setup_1.runSetup)(options);
154
188
  printSetup(outcome, json);
155
189
  process.exitCode = outcome.written ? 0 : 2;
156
190
  return;
157
191
  }
192
+ if (command === 'status') {
193
+ const run = (0, run_1.readRun)(dir);
194
+ process.stdout.write(json ? `${JSON.stringify({ schema: 'ia-qa-pal/status@1', run }, null, 2)}\n` : renderStatus(run, dir));
195
+ process.exitCode = run?.status === 'done' ? run.exitCode ?? 0 : run ? 0 : 2;
196
+ return;
197
+ }
158
198
  if (command !== 'tour') {
159
199
  process.stderr.write(`Unknown command "${command}". Run ia-qa-pal help.\n`);
160
200
  process.exitCode = 2;
@@ -164,10 +204,21 @@ async function main() {
164
204
  const batch = batchRaw === undefined ? undefined : Number(batchRaw);
165
205
  if (batch !== undefined && (!Number.isInteger(batch) || batch < 1))
166
206
  throw new Error('--batch needs a positive whole number.');
167
- const dir = valueOf(args, '--config');
168
- if (!(0, setup_1.configExists)(dir ?? process.cwd()) && interactive() && !json) {
169
- process.stderr.write('This project is not set up yet — two questions first.\n\n');
170
- const outcome = await withPrompt((ask) => (0, setup_1.runSetup)({ dir, session: valueOf(args, '--session'), ask }));
207
+ const tourOptions = { more: args.includes('--more'), suite: args.includes('--suite'), batch, session: valueOf(args, '--session') };
208
+ if (args.includes('--background')) {
209
+ const started = (0, run_1.startBackground)(dir, tourOptions);
210
+ if (json)
211
+ process.stdout.write(`${JSON.stringify({ schema: 'ia-qa-pal/background@1', ...started }, null, 2)}\n`);
212
+ else if (started.started)
213
+ process.stderr.write(`⏳ Tour started in the background (pid ${started.pid}). Follow it: ia-qa-pal status\n log: ${started.log}\n`);
214
+ else
215
+ process.stderr.write(`❌ ${started.reason}\n`);
216
+ process.exitCode = started.started ? 0 : 2;
217
+ return;
218
+ }
219
+ if (!(0, setup_1.configExists)(dir) && interactive() && !json) {
220
+ process.stderr.write('This project is not set up yet — a few questions first.\n\n');
221
+ const outcome = await withPrompt((ask) => (0, setup_1.runSetup)({ dir, session: tourOptions.session, ask }));
171
222
  printSetup(outcome, false);
172
223
  if (!outcome.written || outcome.next !== 'ia-qa-pal tour') {
173
224
  process.exitCode = outcome.written ? 0 : 2;
@@ -175,16 +226,18 @@ async function main() {
175
226
  }
176
227
  process.stderr.write('\n');
177
228
  }
178
- const result = await (0, tour_1.runTour)({ dir, batch, more: args.includes('--more'), session: valueOf(args, '--session') });
229
+ const result = await (0, run_1.trackedTour)({ dir, ...tourOptions });
179
230
  process.stdout.write(json ? `${JSON.stringify(result, null, 2)}\n` : (0, report_1.renderReport)(result));
180
231
  process.exitCode = result.exitCode;
181
232
  }
182
233
  catch (err) {
183
234
  const message = err instanceof Error ? err.message : String(err);
184
- if (json)
185
- process.stdout.write(`${JSON.stringify({ error: message, exitCode: 2 }, null, 2)}\n`);
186
- else
235
+ if (json) {
236
+ process.stdout.write(`${JSON.stringify({ error: message, ...(err instanceof run_1.TourAlreadyRunning ? { running: err.run } : {}), exitCode: 2 }, null, 2)}\n`);
237
+ }
238
+ else {
187
239
  process.stderr.write(`❌ ${message}\n`);
240
+ }
188
241
  process.exitCode = 2;
189
242
  }
190
243
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4DAA8C;AAC9C,kCAAkC;AAClC,sCAAyC;AACzC,oCAAiE;AAGjE,MAAM,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAiB,CAAC;AAEhE,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCA8BsB,qBAAa;;;;;;;;CAQ/C,CAAC;AAEF,SAAS,OAAO,CAAC,IAAc,EAAE,IAAY;IAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,KAAK,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,iBAAiB,CAAC,CAAC;IACrF,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAM,WAAW,GAAG,GAAY,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,GAA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AW,EAAE,CAAC,CAAC;QAC1D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,qBAAY,EAAC,MAAM,CAAC,CAAC,CAAC;QAC3F,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IACrC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG,YAAY,wBAAkB,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAC5J,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,OAAO,IAAI,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,KAAK,IAAI,EAAE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  export { runTour } from './tour';
2
- export type { TourOptions, TourResult } from './tour';
2
+ export type { TourOptions, TourResult, TourEvent } from './tour';
3
+ export { trackedTour, startBackground, readRun, activeRun, TourAlreadyRunning } from './run';
4
+ export type { RunRecord, RunView, BackgroundStart } from './run';
5
+ export type { SuiteInventory, RepairPlan, SuiteAudit, SuiteRun } from './suite';
3
6
  export { renderReport } from './report';
4
7
  export { runSetup, LOGIN_COMMAND } from './setup';
5
8
  export type { SetupOptions, SetupOutcome, PalLogin } from './setup';
package/dist/index.js CHANGED
@@ -1,8 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_BATCH = exports.exitCodeFor = exports.splitFindings = exports.estimate = exports.needingDepth = exports.selectBatch = exports.LOGIN_COMMAND = exports.runSetup = exports.renderReport = exports.runTour = void 0;
3
+ exports.DEFAULT_BATCH = exports.exitCodeFor = exports.splitFindings = exports.estimate = exports.needingDepth = exports.selectBatch = exports.LOGIN_COMMAND = exports.runSetup = exports.renderReport = exports.TourAlreadyRunning = exports.activeRun = exports.readRun = exports.startBackground = exports.trackedTour = exports.runTour = void 0;
4
4
  var tour_1 = require("./tour");
5
5
  Object.defineProperty(exports, "runTour", { enumerable: true, get: function () { return tour_1.runTour; } });
6
+ var run_1 = require("./run");
7
+ Object.defineProperty(exports, "trackedTour", { enumerable: true, get: function () { return run_1.trackedTour; } });
8
+ Object.defineProperty(exports, "startBackground", { enumerable: true, get: function () { return run_1.startBackground; } });
9
+ Object.defineProperty(exports, "readRun", { enumerable: true, get: function () { return run_1.readRun; } });
10
+ Object.defineProperty(exports, "activeRun", { enumerable: true, get: function () { return run_1.activeRun; } });
11
+ Object.defineProperty(exports, "TourAlreadyRunning", { enumerable: true, get: function () { return run_1.TourAlreadyRunning; } });
6
12
  var report_1 = require("./report");
7
13
  Object.defineProperty(exports, "renderReport", { enumerable: true, get: function () { return report_1.renderReport; } });
8
14
  var setup_1 = require("./setup");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+BAAiC;AAAxB,+FAAA,OAAO,OAAA;AAEhB,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,iCAAkD;AAAzC,iGAAA,QAAQ,OAAA;AAAE,sGAAA,aAAa,OAAA;AAEhC,+BAAwG;AAA/F,mGAAA,WAAW,OAAA;AAAE,oGAAA,YAAY,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAAE,qGAAA,aAAa,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,qGAAA,aAAa,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+BAAiC;AAAxB,+FAAA,OAAO,OAAA;AAEhB,6BAA6F;AAApF,kGAAA,WAAW,OAAA;AAAE,sGAAA,eAAe,OAAA;AAAE,8FAAA,OAAO,OAAA;AAAE,gGAAA,SAAS,OAAA;AAAE,yGAAA,kBAAkB,OAAA;AAG7E,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,iCAAkD;AAAzC,iGAAA,QAAQ,OAAA;AAAE,sGAAA,aAAa,OAAA;AAEhC,+BAAwG;AAA/F,mGAAA,WAAW,OAAA;AAAE,oGAAA,YAAY,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAAE,qGAAA,aAAa,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,qGAAA,aAAa,OAAA"}
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env node
2
+ export declare const TOOLS: ({
3
+ name: string;
4
+ description: string;
5
+ inputSchema: {
6
+ type: string;
7
+ properties: {
8
+ project_dir: {
9
+ type: string;
10
+ description: string;
11
+ };
12
+ url?: undefined;
13
+ login?: undefined;
14
+ session_file?: undefined;
15
+ tests?: undefined;
16
+ more?: undefined;
17
+ suite?: undefined;
18
+ batch?: undefined;
19
+ };
20
+ required?: undefined;
21
+ };
22
+ } | {
23
+ name: string;
24
+ description: string;
25
+ inputSchema: {
26
+ type: string;
27
+ properties: {
28
+ url: {
29
+ type: string;
30
+ description: string;
31
+ };
32
+ login: {
33
+ type: string;
34
+ enum: string[];
35
+ description: string;
36
+ };
37
+ session_file: {
38
+ type: string;
39
+ description: string;
40
+ };
41
+ tests: {
42
+ type: string;
43
+ items: {
44
+ type: string;
45
+ };
46
+ description: string;
47
+ };
48
+ project_dir: {
49
+ type: string;
50
+ description: string;
51
+ };
52
+ more?: undefined;
53
+ suite?: undefined;
54
+ batch?: undefined;
55
+ };
56
+ required: string[];
57
+ };
58
+ } | {
59
+ name: string;
60
+ description: string;
61
+ inputSchema: {
62
+ type: string;
63
+ properties: {
64
+ more: {
65
+ type: string;
66
+ description: string;
67
+ };
68
+ suite: {
69
+ type: string;
70
+ description: string;
71
+ };
72
+ batch: {
73
+ type: string;
74
+ description: string;
75
+ };
76
+ project_dir: {
77
+ type: string;
78
+ description: string;
79
+ };
80
+ url?: undefined;
81
+ login?: undefined;
82
+ session_file?: undefined;
83
+ tests?: undefined;
84
+ };
85
+ required?: undefined;
86
+ };
87
+ })[];
88
+ export declare function projectDir(given: unknown, root?: string): string;
89
+ export declare function callTool(name: string, args: Record<string, any>, root?: string): Promise<unknown>;