@ia-qa/pal 1.11.0 → 1.12.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 +5 -2
- package/TUTORIAL.md +8 -2
- package/dist/ai.d.ts +214 -0
- package/dist/ai.js +412 -0
- package/dist/ai.js.map +1 -0
- package/dist/discovery.d.ts +2 -1
- package/dist/discovery.js +2 -1
- package/dist/discovery.js.map +1 -1
- package/dist/mcp/server.d.ts +51 -2
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/project.d.ts +7 -0
- package/dist/project.js +8 -0
- package/dist/project.js.map +1 -1
- package/dist/ui/page.js +386 -11
- package/dist/ui/page.js.map +1 -1
- package/dist/ui/server.d.ts +24 -0
- package/dist/ui/server.js +114 -6
- package/dist/ui/server.js.map +1 -1
- package/package.json +3 -3
- package/skills/ia-qa-pal/SKILL.md +16 -2
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# ia-qa-pal — end-to-end tests that don't break when your UI moves
|
|
2
2
|
|
|
3
|
-
**Create and maintain your end-to-end suite from one app on your desktop.** It tours every page of your web app and tells you what broke since last time, drafts Playwright tests for the pages nothing tests, repairs the selectors your Playwright, Cypress or Selenium tests trip on — after your review — and names the pages no test visits. On your machine; nothing is sent anywhere.
|
|
3
|
+
**Create and maintain your end-to-end suite from one app on your desktop.** It tours every page of your web app and tells you what broke since last time, drafts Playwright tests for the pages nothing tests, repairs the selectors your Playwright, Cypress or Selenium tests trip on — after your review — and names the pages no test visits. On your machine; nothing is sent anywhere unless you ask a model yourself, from the console, after seeing exactly what would go.
|
|
4
4
|
|
|
5
5
|
*A QA pal next to your team — not instead of it.*
|
|
6
6
|
|
|
7
7
|
Under the hood, one tour 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**.
|
|
8
8
|
|
|
9
|
-
- **Local.** A headless browser on your machine. Nothing is uploaded, no account, no LLM.
|
|
9
|
+
- **Local.** A headless browser on your machine. Nothing is uploaded, no account, and no LLM in a tour or a verdict. The one optional model call lives in the console's AI tab, with your own key (or a model on your machine), and never runs by itself.
|
|
10
10
|
- **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.
|
|
11
11
|
- **Honest about coverage.** A tour that measured part of your app says which part. A first tour establishes a baseline; it is never reported as a pass.
|
|
12
12
|
|
|
@@ -127,6 +127,8 @@ Your browser opens on a page that does the whole loop from buttons:
|
|
|
127
127
|
- **Before a tour starts**, the page checks that the login secrets it will need resolve (only when it logs in with `auth`, not with a session) — a missing one is named, and the field to store it is filled in for you. A tour that fails anyway shows its reason in *Now*, never only in `.ia-qa/pal/run.log`.
|
|
128
128
|
- **Secrets** — listed **by name**, checked for whether they resolve, and **set from the page**: type a value once and it goes into this machine's credential store (Windows DPAPI, the macOS keychain, or the Linux keyring) — the same place `ia-qa-heal secret set <NAME>` writes to, and nowhere else. The page never shows it back, not even its length; the store is read back before the page says *stored*; `.ia-qa/config.json` is **never edited**. An existing `{ "source": "env", "key": "APP_PASSWORD" }` reference picks up a value stored under `APP_PASSWORD` when your shell does not set that variable. A variable set in the shell always wins, so CI, which sets it and has no store, behaves exactly as before. On a machine with no store, the page says so and points you to the shell. Secrets kept in AWS are never checked from here: that would call AWS, and nothing here leaves your machine without asking.
|
|
129
129
|
|
|
130
|
+
- **🤖 AI suggestions** — a tab of its own, optional, with **your** key or a model on your machine. It opens on **how far a model may go** in this project — the `"mode"` every package reads: **🔒 Local** (nothing is ever sent, even with a model set up — from this page, the CLIs or an agent), **🤝 Hybrid** (the default: a model suggests, you decide), **🤖 Agent** (as hybrid, plus a button that commits the repairs at or above 90/100 **onto a new git branch** — built in a separate worktree, so your working tree and current branch never move, nothing is pushed, and you review the branch). Then set the model once: a provider (OpenAI, Anthropic, Google, or any OpenAI-compatible endpoint — DeepSeek, Groq, Mistral, OpenRouter, or **Ollama** with one button), a model, the name of the variable holding the key and, if you like, the key itself, which goes to this machine's credential store only. Both `.ia-qa/config.json` and `.ia-qa-discovery/config.json` get the same `ai` block, holding the variable's **name**, never the key; a local model gets no key at all. `.env` files are not read — start the console with `npx dotenv-cli -- ia-qa-pal ui` if that is where your key lives. Then three questions: *which element did a broken test mean?* (`ia-qa-heal-ai suggest`), *what is each page for, and how sensitive?* (`ia-qa-discover-ai classify`), *what does someone come to each page to do?* (`ia-qa-discover-ai plan`). Each starts with **👀 Show what would leave**: the host, the count, a rough token estimate and the **exact prompts**, one per row or page — the verbs' own `--dry-run --json`, which a test compares byte for byte with what reaches the endpoint. **Send** is refused without that preview, and refused again if what would leave changed since; one look, one send. What leaves: element roles, accessible names and their context (for `suggest`); the page's URL, title, headings and fields (for `classify` and `plan` — `classify` also sends the API calls the scan observed and each form's action URL, `plan` does not). What never does: CSS selectors, screenshots, page HTML, cookies, your test files. The answers are shown as *a model's reading*, with the model and the date, and marked *older capture* once what they read was captured again. A suggestion for an element to choose is **marked** on its *Waiting on you* card — the button stays **✅ This one**, on every candidate, and a pick outside the diff's own choices is shown as a remark with no button. For an element that is gone it is information only. A call that fails (a bad key, a timeout) says so in the provider's words — never as a statement about your app.
|
|
131
|
+
|
|
130
132
|
It listens on `127.0.0.1` only, every request carries a one-time token (the link it opens for you), and it stops by itself when you close the tab. It is the same guarded server `ia-qa-heal ui` uses, not a second one. `--port`, `--no-open`, `--keep-alive`. It refuses to start under CI.
|
|
131
133
|
|
|
132
134
|
## Several users — personas
|
|
@@ -291,4 +293,5 @@ Read `2` as "no answer", never as "the app is broken".
|
|
|
291
293
|
- **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.
|
|
292
294
|
- **The link check** requests your app's own links with GET, skipping any URL that acts (`/logout`, `/delete`…).
|
|
293
295
|
- **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.
|
|
296
|
+
- **A model** is never called by a tour or by any `ia-qa-pal` verb or `pal_*` tool. It is called from the console's AI tab, by a person, after its preview — or by an agent through the sibling tools `ia-qa-pal-mcp` also serves (`suggest_heal`, `classify_app`, `plan_pages`), under the same `mode`: in `local`, they refuse too.
|
|
294
297
|
- **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, one line per past tour for the timeline, and the report page). A saved session there holds live cookies — it is gitignored and never leaves your machine.
|
package/TUTORIAL.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
It is not a QA engineer. It does not know what your app *should* do, so it never judges business behaviour. It knows what your app *did* yesterday, what is broken in a way any app can be broken (a dead link, a control nobody can name), and — the part most tools leave out — **what it could not see**.
|
|
6
6
|
|
|
7
|
-
Everything runs on your machine, in a headless browser. Nothing is uploaded. No LLM decides anything.
|
|
7
|
+
Everything runs on your machine, in a headless browser. Nothing is uploaded. No LLM decides anything — the console's optional AI tab can *suggest*, with your own key, after showing you what it would send.
|
|
8
8
|
|
|
9
9
|
> **One install, the whole toolkit.** Installing pal installs its two siblings too, and each adds an answer pal cannot give:
|
|
10
10
|
> - **`@ia-qa/qa-discovery`** (`ia-qa-discover`) knows every page that *exists* — so with pal's `--suite` run it names the pages **no test visits**, not only among the pages you declared.
|
|
@@ -478,7 +478,7 @@ npx ia-qa-pal ui
|
|
|
478
478
|
2. **Run a tour.** Pick the user (with several, the page never picks for you), tick *also run my tests* if you want the pages your suite never visits, then **Start the tour**. If the tour logs in with a form and a secret it needs is not set, the page says which one before starting and fills in the field to store it — you never wait for a tour that was going to die in its first second.
|
|
479
479
|
3. **Now** follows it: the phase, *page N of M*, the page being walked, the last heartbeat. You can close the tab; the tour keeps going and the page picks it up when you come back. A tour that failed shows its reason here.
|
|
480
480
|
4. **Last result.** The mood and why — the headline, *Read this first*, and each broken link with the page that links to it — then the counts, who it ran as, and the full report. When there are elements to decide or repairs ready, **Decide and repair** opens the repair console (`ia-qa-heal ui`) on the same project — each row side by side, nothing applied until you say so.
|
|
481
|
-
4b. **Waiting on you.** When several elements now answer to the name one of your tests uses, the choice is taken right here: a picture of each candidate and **✅ This one**. pal hands your choice to `ia-qa-heal decide` — only a candidate heal itself lists is accepted — which rewrites the test, re-runs it and answers *done, green* or *still red*. The card follows the run (how long, the last line your tests printed, *nothing heard for a while* if one hangs — no made-up percentage), can **👀 show you the browser** when only the changed spec files re-run, and offers **↩️ Undo**. Nothing is committed: the pull request is yours. The choice works without screenshots too — each candidate is then listed by name and selector. An element **gone** from the page gets no button, on purpose, and says which case it is: *✅ Nothing to do* when no test uses it, *🚫 No repair button* with the `file:line` to change or delete when one does. Rows it cannot settle in place — one your test now reaches by mistake — are counted, with the button to the repair console.
|
|
481
|
+
4b. **Waiting on you.** It opens on the totals — *⚖️ to choose · 🚫 to fix in your tests · ✅ nothing to do* — each one a shortcut to its section; a long list of gone elements is usually one or two redesigned pages, so those rows are compact, grouped by page, and the ones that ask nothing of you are folded. When several elements now answer to the name one of your tests uses, the choice is taken right here: a picture of each candidate and **✅ This one**. pal hands your choice to `ia-qa-heal decide` — only a candidate heal itself lists is accepted — which rewrites the test, re-runs it and answers *done, green* or *still red*. The card follows the run (how long, the last line your tests printed, *nothing heard for a while* if one hangs — no made-up percentage), can **👀 show you the browser** when only the changed spec files re-run, and offers **↩️ Undo**. Nothing is committed: the pull request is yours. The choice works without screenshots too — each candidate is then listed by name and selector. An element **gone** from the page gets no button, on purpose, and says which case it is: *✅ Nothing to do* when no test uses it, *🚫 No repair button* with the `file:line` to change or delete when one does. Rows it cannot settle in place — one your test now reaches by mistake — are counted, with the button to the repair console.
|
|
482
482
|
4c. **Apply the repairs.** When a tour found repairs ready (a selector moved, the element clearly still there), the result card offers **🔧 Apply the N repairs and re-run my tests**: heal's `fix --verify`, followed live the same way, ending on *repaired and green* or *still red*. It asks first, never commits, and is undone with `git`.
|
|
483
483
|
|
|
484
484
|
[](https://www.ia-qa.com/media/pal-console-result.png)
|
|
@@ -487,6 +487,11 @@ npx ia-qa-pal ui
|
|
|
487
487
|
6. **Your tests**, shown only while none are declared: a folder and the command that runs them. Only those two fields are added to the config.
|
|
488
488
|
7. **🚨 My build is red** (also a button at the top). Paste the error a failing test printed: it says whether the app moved under that locator — a repair ready, a decision to make — or that it did not, and the cause is elsewhere (timing, data, the test itself). It is `ia-qa-heal explain`, reading what the last tours captured: nothing is re-run, no browser opens, nothing is edited. It needs your tests declared and one tour after that — until then it says which step is missing.
|
|
489
489
|
8. **Secrets.** Listed by name, never by value. **Set a value** stores one in this machine's credential store — `.ia-qa/config.json` is not changed, and a variable set in your shell still wins, so CI behaves as before.
|
|
490
|
+
9. **🤖 AI suggestions** — the second tab, optional. Everything above works without it.
|
|
491
|
+
- **How far a model may go.** 🔒 **Local**: nothing is ever sent to a model — the lock for a sensitive project, honoured by every CLI, MCP tool and this page. 🤝 **Hybrid** (the default): suggestions you apply. 🤖 **Agent**: also offers **🌿 Send, and commit the confident ones on a new branch** — the repairs at or above 90/100 land on `ia-qa/ai-heal-<date>`, your working tree and current branch untouched, nothing pushed; review it with the `git diff` shown, then merge or delete it. Saved as `"mode"` in `.ia-qa/config.json`.
|
|
492
|
+
- **Connect a model, once.** Pick a provider, or **🏠 Model on this machine (Ollama)** — then there is no key, and nothing leaves your machine. Otherwise name the variable that holds your key (e.g. `OPENAI_API_KEY`) and, if it is not already in your shell, paste the key in the field below: it goes to this machine's credential store, never into a file. Both configs (`.ia-qa/` and `.ia-qa-discovery/`) receive the same block with the variable's **name** only. A `.env` file is not read; start the console with `npx dotenv-cli -- ia-qa-pal ui` if your key lives there.
|
|
493
|
+
- **Ask.** Three questions — *which element did a broken test mean*, *what is each page for*, *what does someone come to each page to do*. Each starts with **👀 Show what would leave**: where it goes, how many questions, about how many tokens, and every prompt exactly as it will be sent — open any of them. Only then **📤 Send to `<host>`** (or **▶ Run it on this machine**). If the app was captured again in between, the send is refused and asks you to look again.
|
|
494
|
+
- **Read.** The answers are labelled *a model reading*, with the model and the date, and marked *older capture* once the tour or the scan has moved on. The model's pick for a choice appears on its **Waiting on you** card; you still press **✅ This one** — on that candidate or another. For an element that is gone, the model's guess is shown next to the `file:line` to edit by hand: nothing is rewritten towards an element that is gone.
|
|
490
495
|
|
|
491
496
|
It works the same on a phone-sized window and in dark mode:
|
|
492
497
|
|
|
@@ -657,6 +662,7 @@ never recorded for `ia-qa-discover coverage`: only a run of the whole `testComma
|
|
|
657
662
|
- **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.
|
|
658
663
|
- **The link check** requests your app's own links with GET and skips any URL that acts.
|
|
659
664
|
- **Your test files are read, never written.** Your test command runs only with `--suite`.
|
|
665
|
+
- **A model** is reached only from the console's AI tab, by your click, after its preview — never by a tour.
|
|
660
666
|
- **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).
|
|
661
667
|
|
|
662
668
|
---
|
package/dist/ai.d.ts
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import type { AiMode } from '@ia-qa/self-healing';
|
|
2
|
+
/**
|
|
3
|
+
* The BYOK layer, reached from pal's console: three existing verbs behind one setting and one gesture.
|
|
4
|
+
*
|
|
5
|
+
* Nothing new is handed to a model here. `ia-qa-heal-ai suggest`, `ia-qa-discover-ai classify` and
|
|
6
|
+
* `ia-qa-discover-ai plan` are run through their own CLIs with a fixed argv, exactly like the repair
|
|
7
|
+
* console and the scan — never a second transport, never a second prompt. What this module adds is
|
|
8
|
+
* what a person without a terminal needs to use them honestly:
|
|
9
|
+
*
|
|
10
|
+
* - **one setting**, written as the same `ai` block into both packages' configs (the saisie is
|
|
11
|
+
* unified, the files are not — the packages stay separate);
|
|
12
|
+
* - **a preview before anything leaves**, which is the verb's own `--dry-run --json`: the exact
|
|
13
|
+
* prompts, the host, the count. A send is refused unless that preview was shown, and refused
|
|
14
|
+
* again if what would leave has changed since — so what the person approved is what goes;
|
|
15
|
+
* - **results labelled as a model's reading**, with the model and the date, and marked stale once
|
|
16
|
+
* the capture they read has been replaced.
|
|
17
|
+
*
|
|
18
|
+
* The model proposes, the person decides, a deterministic verb applies: nothing here writes a test
|
|
19
|
+
* file. A suggestion reaches the "Waiting on you" cards as a badge; the button stays `decide`'s.
|
|
20
|
+
*/
|
|
21
|
+
export type AiAction = 'suggest' | 'classify' | 'plan';
|
|
22
|
+
export declare const AI_ACTIONS: readonly AiAction[];
|
|
23
|
+
export declare const suggestionsFile: (dir: string) => string;
|
|
24
|
+
/** What the AI tab draws on arrival. Reads two files, calls nothing. */
|
|
25
|
+
export declare function aiSettings(dir: string): {
|
|
26
|
+
current: {
|
|
27
|
+
provider: string;
|
|
28
|
+
model: string;
|
|
29
|
+
baseUrl: string | null;
|
|
30
|
+
keyName: string | null;
|
|
31
|
+
keySource: string | null;
|
|
32
|
+
} | null;
|
|
33
|
+
providers: {
|
|
34
|
+
id: import("@ia-qa/self-healing").AiProvider;
|
|
35
|
+
label: string;
|
|
36
|
+
keyEnv: string;
|
|
37
|
+
needsBaseUrl: boolean;
|
|
38
|
+
models: {
|
|
39
|
+
id: string;
|
|
40
|
+
note: string | null;
|
|
41
|
+
}[];
|
|
42
|
+
}[];
|
|
43
|
+
examples: {
|
|
44
|
+
label: string;
|
|
45
|
+
baseUrl: string;
|
|
46
|
+
}[];
|
|
47
|
+
host: string | null;
|
|
48
|
+
local: boolean;
|
|
49
|
+
hostError?: string;
|
|
50
|
+
configured: boolean;
|
|
51
|
+
heal: {
|
|
52
|
+
provider: string;
|
|
53
|
+
model: string;
|
|
54
|
+
baseUrl: string | null;
|
|
55
|
+
keyName: string | null;
|
|
56
|
+
keySource: string | null;
|
|
57
|
+
} | null;
|
|
58
|
+
discovery: {
|
|
59
|
+
provider: string;
|
|
60
|
+
model: string;
|
|
61
|
+
baseUrl: string | null;
|
|
62
|
+
keyName: string | null;
|
|
63
|
+
keySource: string | null;
|
|
64
|
+
} | null;
|
|
65
|
+
/** Two blocks that disagree are two answers to "who reads this": said, never picked silently. */
|
|
66
|
+
same: boolean;
|
|
67
|
+
mode: AiMode | null;
|
|
68
|
+
declared: boolean;
|
|
69
|
+
minConfidence: number | null;
|
|
70
|
+
error?: string;
|
|
71
|
+
setUp: boolean;
|
|
72
|
+
};
|
|
73
|
+
export type AiSettingsWritten = {
|
|
74
|
+
written: true;
|
|
75
|
+
files: string[];
|
|
76
|
+
host: string;
|
|
77
|
+
local: boolean;
|
|
78
|
+
} | {
|
|
79
|
+
written: false;
|
|
80
|
+
problems: string[];
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Write the same `ai` block, by reference only, into `.ia-qa/config.json` and
|
|
84
|
+
* `.ia-qa-discovery/config.json` — touching nothing but that key in either file.
|
|
85
|
+
*
|
|
86
|
+
* Every field is a string the person typed, checked here: the provider against the registry, the
|
|
87
|
+
* model against the shape of an id, the URL through `egressHost` (the function every request's host
|
|
88
|
+
* comes from), and the key's NAME against the shape of a variable — refused, without echoing it,
|
|
89
|
+
* when it looks like the key itself, because both files are committed. A model on this machine gets
|
|
90
|
+
* no key reference at all. Both files are read and checked before either is written, so a refusal
|
|
91
|
+
* leaves both as they were.
|
|
92
|
+
*/
|
|
93
|
+
export declare function writeAiSettings(dir: string, body: Record<string, unknown>): AiSettingsWritten;
|
|
94
|
+
/**
|
|
95
|
+
* Set the project's mode — the one field every package reads — touching nothing else in the file.
|
|
96
|
+
* Choosing `agent` is the person saying a model may commit, onto a new branch they will review.
|
|
97
|
+
*/
|
|
98
|
+
export declare function writeAiMode(dir: string, value: unknown): {
|
|
99
|
+
written: true;
|
|
100
|
+
mode: AiMode;
|
|
101
|
+
} | {
|
|
102
|
+
written: false;
|
|
103
|
+
problems: string[];
|
|
104
|
+
};
|
|
105
|
+
/** Local mode, said in the words every other door uses. */
|
|
106
|
+
export declare function localModeRefusal(dir: string): string | null;
|
|
107
|
+
export declare function healAiEntry(): string;
|
|
108
|
+
export declare function discoverAiEntry(): string;
|
|
109
|
+
export interface AiEntries {
|
|
110
|
+
heal?: string;
|
|
111
|
+
discover?: string;
|
|
112
|
+
}
|
|
113
|
+
export interface AiPreview {
|
|
114
|
+
action: AiAction;
|
|
115
|
+
provider: string | null;
|
|
116
|
+
model: string | null;
|
|
117
|
+
host: string | null;
|
|
118
|
+
hostError?: string;
|
|
119
|
+
local: boolean;
|
|
120
|
+
/** Questions that would be sent — rows for `suggest`, pages for `classify`/`plan`. */
|
|
121
|
+
count: number;
|
|
122
|
+
notSent: number;
|
|
123
|
+
asks: Array<{
|
|
124
|
+
page: string;
|
|
125
|
+
prompt: string;
|
|
126
|
+
label?: string;
|
|
127
|
+
}>;
|
|
128
|
+
bytes: number;
|
|
129
|
+
/** Characters / 4: an order of magnitude, never a promise or a bill. */
|
|
130
|
+
approxTokens: number;
|
|
131
|
+
/** What a send must match: the destination and every prompt, byte for byte. */
|
|
132
|
+
digest: string;
|
|
133
|
+
scope?: string | null;
|
|
134
|
+
because?: string | null;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The verb's own `--dry-run --json`, read back — no key resolved, no call made.
|
|
138
|
+
*
|
|
139
|
+
* The digest covers the host, the model and each prompt: a send carries it, and the send is refused
|
|
140
|
+
* when a fresh preview no longer matches — the content changed (a new capture, a new tour), or the
|
|
141
|
+
* destination did.
|
|
142
|
+
*/
|
|
143
|
+
export declare function previewAi(dir: string, action: AiAction, entries?: AiEntries): {
|
|
144
|
+
ok: true;
|
|
145
|
+
preview: AiPreview;
|
|
146
|
+
} | {
|
|
147
|
+
ok: false;
|
|
148
|
+
reason: string;
|
|
149
|
+
};
|
|
150
|
+
export interface AiJob {
|
|
151
|
+
action: AiAction;
|
|
152
|
+
status: 'running' | 'done' | 'failed';
|
|
153
|
+
host: string;
|
|
154
|
+
local: boolean;
|
|
155
|
+
model: string;
|
|
156
|
+
provider: string;
|
|
157
|
+
count: number;
|
|
158
|
+
startedAt: string;
|
|
159
|
+
heardAt: string;
|
|
160
|
+
finishedAt?: string;
|
|
161
|
+
lastLine?: string;
|
|
162
|
+
/** The verb's own `--json` document. */
|
|
163
|
+
result?: unknown;
|
|
164
|
+
exitCode?: number | null;
|
|
165
|
+
error?: string;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Run one approved action, followed like a test re-run: elapsed time, last line, "nothing heard".
|
|
169
|
+
* `suggest`'s answer is kept in `.ia-qa/pal/ai-suggestions.json` (the decision cards read it);
|
|
170
|
+
* `classify` and `plan` write their own files, as they do from a terminal.
|
|
171
|
+
*/
|
|
172
|
+
export declare function startAiJob(dir: string, preview: AiPreview, entries?: AiEntries, onDone?: (job: AiJob) => void, onBranch?: boolean): AiJob;
|
|
173
|
+
/**
|
|
174
|
+
* The readings on disk, labelled: which model, when, and whether the capture they read has been
|
|
175
|
+
* replaced since. A stale reading is marked, never hidden — hiding it would make a reading that
|
|
176
|
+
* exists indistinguishable from one that was never made.
|
|
177
|
+
*/
|
|
178
|
+
export declare function aiResults(dir: string): {
|
|
179
|
+
suggest: {
|
|
180
|
+
at: string;
|
|
181
|
+
model: string;
|
|
182
|
+
host: string;
|
|
183
|
+
local: boolean;
|
|
184
|
+
stale: boolean;
|
|
185
|
+
suggestions: Array<Record<string, unknown>>;
|
|
186
|
+
unresolved: Array<Record<string, unknown>>;
|
|
187
|
+
} | null;
|
|
188
|
+
classify: {
|
|
189
|
+
at: any;
|
|
190
|
+
model: any;
|
|
191
|
+
stale: boolean;
|
|
192
|
+
totals: any;
|
|
193
|
+
pages: {
|
|
194
|
+
page: string;
|
|
195
|
+
failed: any;
|
|
196
|
+
kept: any;
|
|
197
|
+
refused: any;
|
|
198
|
+
dropped: any;
|
|
199
|
+
}[];
|
|
200
|
+
} | null;
|
|
201
|
+
plan: {
|
|
202
|
+
at: any;
|
|
203
|
+
model: any;
|
|
204
|
+
stale: boolean;
|
|
205
|
+
totals: any;
|
|
206
|
+
pages: {
|
|
207
|
+
page: string;
|
|
208
|
+
status: any;
|
|
209
|
+
purpose: any;
|
|
210
|
+
impact: any;
|
|
211
|
+
reason: any;
|
|
212
|
+
}[];
|
|
213
|
+
} | null;
|
|
214
|
+
};
|