tapline-host 1.1.0 → 1.2.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/tools.d.ts CHANGED
@@ -178,6 +178,21 @@ export declare const toolShapes: {
178
178
  readonly name: z.ZodString;
179
179
  readonly update: z.ZodOptional<z.ZodBoolean>;
180
180
  readonly width: z.ZodOptional<z.ZodNumber>;
181
+ readonly threshold: z.ZodOptional<z.ZodNumber>;
182
+ readonly ignore: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
183
+ x: z.ZodNumber;
184
+ y: z.ZodNumber;
185
+ width: z.ZodNumber;
186
+ height: z.ZodNumber;
187
+ }, z.core.$strict>, z.ZodObject<{
188
+ ref: z.ZodOptional<z.ZodString>;
189
+ id: z.ZodOptional<z.ZodString>;
190
+ label: z.ZodOptional<z.ZodString>;
191
+ text: z.ZodOptional<z.ZodString>;
192
+ index: z.ZodOptional<z.ZodNumber>;
193
+ x: z.ZodOptional<z.ZodNumber>;
194
+ y: z.ZodOptional<z.ZodNumber>;
195
+ }, z.core.$strict>]>>>;
181
196
  };
182
197
  readonly filmstrip: {
183
198
  readonly frames: z.ZodOptional<z.ZodNumber>;
@@ -241,6 +256,9 @@ export declare const toolShapes: {
241
256
  label: z.ZodOptional<z.ZodString>;
242
257
  gone: z.ZodOptional<z.ZodBoolean>;
243
258
  value: z.ZodOptional<z.ZodString>;
259
+ matches: z.ZodOptional<z.ZodString>;
260
+ threshold: z.ZodOptional<z.ZodNumber>;
261
+ ignore: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
244
262
  timeout: z.ZodOptional<z.ZodNumber>;
245
263
  }, z.core.$strip>>;
246
264
  }, z.core.$loose>>;
@@ -360,6 +378,15 @@ export declare class TaplineTools {
360
378
  private personNotePending;
361
379
  private recording;
362
380
  private replaying;
381
+ /**
382
+ * While a script replays (AGENT-TOOLS 1.9 §14.3): the references folder next to it (looked in first), where a
383
+ * failed check puts its red picture, and whether the checks save instead of compare (`--update-references`).
384
+ */
385
+ private replayContext;
386
+ /** Where the latest failed check of the running batch saved its picture. */
387
+ private diffSaved;
388
+ /** The elements the latest comparison painted its ignore list from: a recording saves its mask from the same list. */
389
+ private lastMaskElements;
363
390
  /** The screen size in points from the latest list or overlay, for the live viewer's 0..1 positions. */
364
391
  private lastScreen;
365
392
  private shotCount;
@@ -389,6 +416,7 @@ export declare class TaplineTools {
389
416
  private currentRoute;
390
417
  /** Null when the expectation holds within its time; else how it failed. */
391
418
  private expectMissed;
419
+ private textExpectMissed;
392
420
  inspect(args: Shape<"inspect">): Promise<CallToolResult>;
393
421
  audit(args?: Shape<"audit">): Promise<CallToolResult>;
394
422
  checkLayout(_args?: Shape<"check_layout">): Promise<CallToolResult>;
@@ -430,12 +458,52 @@ export declare class TaplineTools {
430
458
  private takeShot;
431
459
  /** Adds an image to a result: inline, or saved with its path in file mode. */
432
460
  private deliver;
461
+ /** Where this app's reference pictures are kept, or an error answer. */
462
+ private referenceFolder;
463
+ /** The element list for naming regions and masking, read as a peek: the agent's refs and baseline must stay as they are. */
464
+ private peekElements;
465
+ /**
466
+ * Takes the screen and compares it with the saved reference called `name`, never saving. `referencesDirs` are the
467
+ * folders to look in, in order. A missing reference hands back the screenshot, so the caller may save it.
468
+ */
469
+ private checkAgainstReference;
470
+ /** Why a check does not hold (for `run`, as a step or as `matches`), or null when it matches. */
471
+ private referenceReason;
472
+ /** Whether the screen matches the reference `name` now (`expect.matches`): null when it does, else the reason. */
473
+ private matchMissed;
474
+ /** Where a check looks for `<name>.jpg`: the folder next to a replayed script first, then the app's own store. */
475
+ private referencesDirs;
476
+ /** In a replay, a failed check leaves its red picture at `<script>.diff/<name>.jpg`. */
477
+ private keepDiff;
478
+ /** Takes the screen and saves it as the reference `name` in `dir`. */
479
+ private saveReferenceHere;
480
+ private writeReference;
481
+ /** A `compare_screen` step of `run`: it never saves; it holds on a match and stops the batch otherwise. */
482
+ private compareStep;
483
+ /**
484
+ * Saves a visual check that held as a `compareScreen` step of the recording, when one is running: the name, and the
485
+ * threshold, the ignore list (refs made stable) and the width when given. `update` is never written. Answers an
486
+ * error line when an ignore ref can't be kept in a script, else null (also when nothing is recording).
487
+ */
488
+ private recordCompare;
489
+ /**
490
+ * `ignore` as a script keeps it (AGENT-TOOLS 1.9 §14.2): a ref becomes the element's id, else label, else text,
491
+ * read from the list now. A string is the error answer when a ref can't be kept.
492
+ */
493
+ private stableIgnore;
433
494
  compareScreen(args: Shape<"compare_screen">): Promise<CallToolResult>;
495
+ private compareScreenNow;
434
496
  filmstrip(args: Shape<"filmstrip">): Promise<CallToolResult>;
435
497
  private scriptPath;
436
498
  record(args: Shape<"record">): Promise<CallToolResult>;
499
+ /** `<script dir>/<script name>.references` and `.diff` for a script file. */
500
+ private scriptSideFolder;
501
+ /** Copies each reference the steps use from the app's store next to the script; null when there are none. */
502
+ private copyReferences;
437
503
  private scriptList;
438
- replay(args: Shape<"replay">): Promise<CallToolResult>;
504
+ replay(args: Shape<"replay">, options?: {
505
+ updateReferences?: boolean;
506
+ }): Promise<CallToolResult>;
439
507
  private withLook;
440
508
  /**
441
509
  * The element a result carries under `key`, for an answer's first line: without its actions, position or