@reportforge/playwright-pdf 0.19.0 → 0.20.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/index.d.mts CHANGED
@@ -204,6 +204,10 @@ interface ReporterOptions {
204
204
  * Offline failure root-cause analysis. Classifies failures into categories
205
205
  * using an embedded Naive Bayes model and renders a clustered breakdown in
206
206
  * the `detailed` PDF (one-liner in `executive`). No network calls at runtime.
207
+ * Optionally personalizes on YOUR machine: label collected failures
208
+ * (`label-feedback`), then `train-model` trains + evaluates a local layer that
209
+ * activates only when it measurably beats the base model. Training data, the
210
+ * trained model, and evaluation never leave the machine.
207
211
  * @example
208
212
  * failureAnalysis: { enabled: true, maxClusters: 5 }
209
213
  */
@@ -216,15 +220,35 @@ interface ReporterOptions {
216
220
  minStrength?: 'weak' | 'moderate' | 'strong';
217
221
  /** Max failures fed to the classifier; excess skipped, PDF notes it. Default: 500 */
218
222
  maxFailuresToAnalyse?: number;
219
- /** Collect unknown/low-confidence failures to a local per-project CSV (Plan 3). Default: true */
223
+ /** Collect unrecognized failures to a local per-project CSV (redacted + tokenized; the on-device trainer's input). Default: true */
220
224
  collectUnclassified?: boolean;
221
225
  /**
222
- * Auto-update the classifier model from the signed license-refresh channel
226
+ * What the collector stores while `collectUnclassified` is on:
227
+ * 'blind-spots' = unknown/low-confidence failures only; 'all' = every
228
+ * model-scored failure, so wrong-but-confident predictions can be corrected
229
+ * by labeling too (trades ring-buffer space). Default: 'blind-spots'
230
+ */
231
+ collectScope?: 'blind-spots' | 'all';
232
+ /**
233
+ * Auto-update the BASE classifier model from the signed license-refresh channel
223
234
  * (offline-tolerant; the bundled model is always the floor; the delivered model
224
235
  * is Ed25519-verified). Set false to pin the bundled model for reproducibility.
225
236
  * Default: true
226
237
  */
227
238
  autoUpdateModel?: boolean;
239
+ /**
240
+ * Use the on-device trained model (when present and it passed its local
241
+ * evaluation gate) ahead of the base model. Trained via the `train-model`
242
+ * CLI from feedback you labeled; never uploaded anywhere. Default: true
243
+ */
244
+ localModel?: boolean;
245
+ /**
246
+ * Path to a trained local model file (default: ~/.reportforge/model-local.json).
247
+ * Point this at a file committed to your repo (`train-model --out`) to share a
248
+ * team-trained model with ephemeral CI machines — the file contains only
249
+ * redacted token statistics, never raw failure text.
250
+ */
251
+ localModelPath?: string;
228
252
  };
229
253
  /**
230
254
  * Opt-in rich execution capture for the defect log. Reporter-side only — reads
package/dist/index.d.ts CHANGED
@@ -204,6 +204,10 @@ interface ReporterOptions {
204
204
  * Offline failure root-cause analysis. Classifies failures into categories
205
205
  * using an embedded Naive Bayes model and renders a clustered breakdown in
206
206
  * the `detailed` PDF (one-liner in `executive`). No network calls at runtime.
207
+ * Optionally personalizes on YOUR machine: label collected failures
208
+ * (`label-feedback`), then `train-model` trains + evaluates a local layer that
209
+ * activates only when it measurably beats the base model. Training data, the
210
+ * trained model, and evaluation never leave the machine.
207
211
  * @example
208
212
  * failureAnalysis: { enabled: true, maxClusters: 5 }
209
213
  */
@@ -216,15 +220,35 @@ interface ReporterOptions {
216
220
  minStrength?: 'weak' | 'moderate' | 'strong';
217
221
  /** Max failures fed to the classifier; excess skipped, PDF notes it. Default: 500 */
218
222
  maxFailuresToAnalyse?: number;
219
- /** Collect unknown/low-confidence failures to a local per-project CSV (Plan 3). Default: true */
223
+ /** Collect unrecognized failures to a local per-project CSV (redacted + tokenized; the on-device trainer's input). Default: true */
220
224
  collectUnclassified?: boolean;
221
225
  /**
222
- * Auto-update the classifier model from the signed license-refresh channel
226
+ * What the collector stores while `collectUnclassified` is on:
227
+ * 'blind-spots' = unknown/low-confidence failures only; 'all' = every
228
+ * model-scored failure, so wrong-but-confident predictions can be corrected
229
+ * by labeling too (trades ring-buffer space). Default: 'blind-spots'
230
+ */
231
+ collectScope?: 'blind-spots' | 'all';
232
+ /**
233
+ * Auto-update the BASE classifier model from the signed license-refresh channel
223
234
  * (offline-tolerant; the bundled model is always the floor; the delivered model
224
235
  * is Ed25519-verified). Set false to pin the bundled model for reproducibility.
225
236
  * Default: true
226
237
  */
227
238
  autoUpdateModel?: boolean;
239
+ /**
240
+ * Use the on-device trained model (when present and it passed its local
241
+ * evaluation gate) ahead of the base model. Trained via the `train-model`
242
+ * CLI from feedback you labeled; never uploaded anywhere. Default: true
243
+ */
244
+ localModel?: boolean;
245
+ /**
246
+ * Path to a trained local model file (default: ~/.reportforge/model-local.json).
247
+ * Point this at a file committed to your repo (`train-model --out`) to share a
248
+ * team-trained model with ephemeral CI machines — the file contains only
249
+ * redacted token statistics, never raw failure text.
250
+ */
251
+ localModelPath?: string;
228
252
  };
229
253
  /**
230
254
  * Opt-in rich execution capture for the defect log. Reporter-side only — reads