@webability/core 1.9.0 → 1.11.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/dist/engine.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as ScanIssue, I as InternalBug, P as PageLike } from './types-g-bI_MhR.cjs';
1
+ import { c as ScanIssue, m as JudgeOptions, I as InternalBug, q as JudgedEntry, P as PageLike } from './types-jXnoW_NT.cjs';
2
2
 
3
3
  /**
4
4
  * The one engine's contract: two injected drivers in, one result out.
@@ -62,6 +62,11 @@ interface Page {
62
62
  content?: string;
63
63
  url?: string;
64
64
  }): Promise<unknown>;
65
+ /**
66
+ * The live Playwright Page. axe's frame-aware run (AxeBuilder) needs it to
67
+ * scan inside iframes. Absent: axe runs in the top document only.
68
+ */
69
+ playwrightPage?(): unknown;
65
70
  }
66
71
  /** One OpenAI-compatible chat call. `signal` aborts the HTTP request at the engine's deadline. */
67
72
  interface ModelRequest {
@@ -109,6 +114,22 @@ interface EngineOptions {
109
114
  level?: 'A' | 'AA' | 'AAA';
110
115
  /** HTTP status of the main document when the caller navigated. */
111
116
  mainStatus?: number;
117
+ /**
118
+ * Knobs of the deterministic layer (core scan()): scope to a subtree,
119
+ * dismiss cookie banners first (default false), the axe tags, the render
120
+ * settle, and core's in-scan AI judge for undecided findings. The judge
121
+ * makes its own HTTP calls (not through `Model`); leave it unset for a run
122
+ * with no model traffic.
123
+ */
124
+ scan?: {
125
+ rootSelector?: string;
126
+ dismissModals?: boolean;
127
+ judge?: JudgeOptions;
128
+ /** axe-core tags (default: core's WCAG A/AA set). */
129
+ wcagTags?: string[];
130
+ /** scan()'s render settle: false skips it (a DOM with no layout or animation). */
131
+ settle?: boolean;
132
+ };
112
133
  }
113
134
  /**
114
135
  * One fix record. The first five keys are the served manifest's wire keys
@@ -178,6 +199,8 @@ interface EngineResult {
178
199
  fixes: EngineFix[];
179
200
  internal_bugs: InternalBug[];
180
201
  stats: EngineStats;
202
+ /** Verdicts of core's in-scan judge (`opts.scan.judge`) on findings the engines could not decide. */
203
+ judged?: JudgedEntry[];
181
204
  /** Set when the target was a bot challenge, auth wall or HTTP error: nothing real was scanned. */
182
205
  blocked?: {
183
206
  reason: string;
package/dist/engine.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as ScanIssue, I as InternalBug, P as PageLike } from './types-g-bI_MhR.js';
1
+ import { c as ScanIssue, m as JudgeOptions, I as InternalBug, q as JudgedEntry, P as PageLike } from './types-jXnoW_NT.js';
2
2
 
3
3
  /**
4
4
  * The one engine's contract: two injected drivers in, one result out.
@@ -62,6 +62,11 @@ interface Page {
62
62
  content?: string;
63
63
  url?: string;
64
64
  }): Promise<unknown>;
65
+ /**
66
+ * The live Playwright Page. axe's frame-aware run (AxeBuilder) needs it to
67
+ * scan inside iframes. Absent: axe runs in the top document only.
68
+ */
69
+ playwrightPage?(): unknown;
65
70
  }
66
71
  /** One OpenAI-compatible chat call. `signal` aborts the HTTP request at the engine's deadline. */
67
72
  interface ModelRequest {
@@ -109,6 +114,22 @@ interface EngineOptions {
109
114
  level?: 'A' | 'AA' | 'AAA';
110
115
  /** HTTP status of the main document when the caller navigated. */
111
116
  mainStatus?: number;
117
+ /**
118
+ * Knobs of the deterministic layer (core scan()): scope to a subtree,
119
+ * dismiss cookie banners first (default false), the axe tags, the render
120
+ * settle, and core's in-scan AI judge for undecided findings. The judge
121
+ * makes its own HTTP calls (not through `Model`); leave it unset for a run
122
+ * with no model traffic.
123
+ */
124
+ scan?: {
125
+ rootSelector?: string;
126
+ dismissModals?: boolean;
127
+ judge?: JudgeOptions;
128
+ /** axe-core tags (default: core's WCAG A/AA set). */
129
+ wcagTags?: string[];
130
+ /** scan()'s render settle: false skips it (a DOM with no layout or animation). */
131
+ settle?: boolean;
132
+ };
112
133
  }
113
134
  /**
114
135
  * One fix record. The first five keys are the served manifest's wire keys
@@ -178,6 +199,8 @@ interface EngineResult {
178
199
  fixes: EngineFix[];
179
200
  internal_bugs: InternalBug[];
180
201
  stats: EngineStats;
202
+ /** Verdicts of core's in-scan judge (`opts.scan.judge`) on findings the engines could not decide. */
203
+ judged?: JudgedEntry[];
181
204
  /** Set when the target was a bot challenge, auth wall or HTTP error: nothing real was scanned. */
182
205
  blocked?: {
183
206
  reason: string;