dsh-click 0.3.24 → 0.3.26

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +0 -0
  3. package/README-es.md +152 -105
  4. package/README-hi.md +152 -105
  5. package/README-pt.md +152 -105
  6. package/README-zh.md +152 -105
  7. package/README.md +153 -110
  8. package/SECURITY.md +0 -0
  9. package/THIRD_PARTY_NOTICES.md +0 -0
  10. package/cordis.patch.yml +4 -0
  11. package/lib/index.js +72 -50
  12. package/lib/types/actions.d.ts +1 -1
  13. package/lib/types/actions.d.ts.map +1 -1
  14. package/lib/types/config.d.ts +10 -0
  15. package/lib/types/config.d.ts.map +1 -1
  16. package/lib/types/events.d.ts +0 -0
  17. package/lib/types/events.d.ts.map +0 -0
  18. package/lib/types/index.d.ts +0 -0
  19. package/lib/types/index.d.ts.map +0 -0
  20. package/lib/types/observe.d.ts +13 -5
  21. package/lib/types/observe.d.ts.map +1 -1
  22. package/lib/types/platform/runner.d.ts +0 -0
  23. package/lib/types/platform/runner.d.ts.map +0 -0
  24. package/lib/types/platform/selection.d.ts +0 -0
  25. package/lib/types/platform/selection.d.ts.map +0 -0
  26. package/lib/types/platform/types.d.ts +0 -0
  27. package/lib/types/platform/types.d.ts.map +0 -0
  28. package/lib/types/sanitize.d.ts +0 -0
  29. package/lib/types/sanitize.d.ts.map +0 -0
  30. package/lib/types/tools.d.ts +0 -0
  31. package/lib/types/tools.d.ts.map +0 -0
  32. package/lib/types/version.d.ts +1 -1
  33. package/lib/types/version.d.ts.map +0 -0
  34. package/lib/types/vision/grounding.d.ts +0 -0
  35. package/lib/types/vision/grounding.d.ts.map +0 -0
  36. package/lib/types/vision/index.d.ts +0 -0
  37. package/lib/types/vision/index.d.ts.map +0 -0
  38. package/lib/types/vision/ocr.d.ts +0 -0
  39. package/lib/types/vision/ocr.d.ts.map +0 -0
  40. package/lib/types/vision.d.ts +0 -0
  41. package/lib/types/vision.d.ts.map +0 -0
  42. package/native/win32/dsh-click-helper.ps1 +0 -0
  43. package/package.json +6 -6
package/lib/index.js CHANGED
@@ -7,7 +7,7 @@ import { fileURLToPath } from "node:url";
7
7
  import { defineTool } from "@deepseek-ai/dsh-tools";
8
8
  import { mkdtemp, rm, writeFile } from "node:fs/promises";
9
9
  import { tmpdir } from "node:os";
10
- //#region src/events.ts
10
+ // src/events.ts
11
11
  /** The observation audit event type. */
12
12
  const OBSERVED_EVENT = "dsh-click/observed";
13
13
  /** The action audit event type. */
@@ -36,8 +36,7 @@ function appendAuditEvent(session, type, data) {
36
36
  else session.append(type, data);
37
37
  return "appended";
38
38
  }
39
- //#endregion
40
- //#region src/sanitize.ts
39
+ // src/sanitize.ts
41
40
  /**
42
41
  * Pure display/audit redaction for everything dsh-click shows to the model or
43
42
  * writes to a session log: window titles, executable paths, and free text that
@@ -104,8 +103,7 @@ function redactSensitive(text) {
104
103
  function sanitizeVisible(text, maxLength) {
105
104
  return sanitizeText(redactSensitive(text), maxLength);
106
105
  }
107
- //#endregion
108
- //#region src/platform/types.ts
106
+ // src/platform/types.ts
109
107
  /** Error with a stable machine-routing code, model-readable message included. */
110
108
  var DshClickError = class extends Error {
111
109
  code;
@@ -146,8 +144,7 @@ function expectProcessFacts(value, op) {
146
144
  executablePath
147
145
  };
148
146
  }
149
- //#endregion
150
- //#region src/actions.ts
147
+ // src/actions.ts
151
148
  /** Approval failure detail, model-readable. */
152
149
  const APPROVAL_DETAIL = {
153
150
  rejected: "rejected by the approval answerer",
@@ -192,12 +189,21 @@ var ActionExecutor = class {
192
189
  * @param signal - cancellation.
193
190
  * @returns the cited record and the fresh snapshot.
194
191
  */
195
- async requireFreshWindow(observationId, windowId, signal) {
192
+ async requireFreshWindow(observationId, windowId, signal, targetRef) {
196
193
  const record = this.deps.observations.get(observationId);
197
194
  if (record === void 0) throw new DshClickError(`unknown observation "${observationId}" — run screen_read or screen_shot again and cite the returned observationId`, "UNKNOWN_OBSERVATION");
198
195
  if (record.windowId !== windowId) throw new DshClickError(`observation ${observationId} belongs to window ${record.windowId}, not ${windowId}`, "UNKNOWN_OBSERVATION");
199
- const fresh = await this.deps.backend.snapshot(windowId, signal);
200
- const verdict = this.deps.observations.verify(record, fresh);
196
+ let fresh = await this.deps.backend.snapshot(windowId, signal);
197
+ let targetElements;
198
+ if (targetRef !== void 0 && record.elementHashes !== void 0 && this.config.staleCheckTree === "target") {
199
+ const tree = await this.deps.backend.tree({ windowId }, this.config.maxElements, this.config.maxTreeDepth, false, signal);
200
+ fresh = tree.snapshot;
201
+ targetElements = tree.elements;
202
+ }
203
+ const verdict = this.deps.observations.verify(record, fresh, Date.now(), targetRef === void 0 ? void 0 : {
204
+ ref: targetRef,
205
+ elements: targetElements ?? []
206
+ });
201
207
  if (!verdict.ok) throw new DshClickError(`${verdict.detail} — run screen_read or screen_shot again before acting`, verdict.code);
202
208
  return {
203
209
  record,
@@ -253,12 +259,12 @@ var ActionExecutor = class {
253
259
  * @param run - the backend call (receives the resolved focus flag).
254
260
  * @returns the validated backend outcome.
255
261
  */
256
- async perform(toolName, exec, observationId, windowId, run) {
262
+ async perform(toolName, exec, observationId, windowId, run, targetRef) {
257
263
  let approved = "none";
258
264
  let observationIdAudited;
259
265
  let windowIdAudited;
260
266
  try {
261
- const { record } = await this.requireFreshWindow(observationId, windowId, exec.signal);
267
+ const { record } = await this.requireFreshWindow(observationId, windowId, exec.signal, targetRef);
262
268
  observationIdAudited = observationId;
263
269
  windowIdAudited = windowId;
264
270
  approved = await this.gate(exec, toolName, {
@@ -334,8 +340,7 @@ var ActionExecutor = class {
334
340
  }
335
341
  }
336
342
  };
337
- //#endregion
338
- //#region src/config.ts
343
+ // src/config.ts
339
344
  /**
340
345
  * Plugin configuration and its explicit resolve step. `resolveConfig` re-judges
341
346
  * every default and bound so programmatic construction that bypasses
@@ -375,6 +380,11 @@ const Config = z.object({
375
380
  maxHelperOutputBytes: z.number().min(1024).max(MAX_HELPER_OUTPUT_BYTES).default(DEFAULT_MAX_HELPER_OUTPUT_BYTES),
376
381
  maxScreenshotSide: z.number().min(320).max(MAX_SCREENSHOT_SIDE).default(DEFAULT_MAX_SCREENSHOT_SIDE),
377
382
  staleCheckPixels: z.boolean().default(true),
383
+ staleCheckTree: z.union([
384
+ "strict",
385
+ "target",
386
+ "off"
387
+ ]).default("target"),
378
388
  maxObservationAgeMs: z.number().min(MIN_OBSERVATION_AGE_MS).max(MAX_OBSERVATION_AGE_MS).default(DEFAULT_MAX_OBSERVATION_AGE_MS),
379
389
  maxCachedObservations: z.number().min(1).max(64).default(8),
380
390
  maxElements: z.number().min(1).max(MAX_ELEMENTS).default(500),
@@ -423,6 +433,8 @@ function resolveConfig(config) {
423
433
  if (!Number.isInteger(maxScreenshotSide) || maxScreenshotSide < 320 || maxScreenshotSide > 7680) invalid("maxScreenshotSide", `must be an integer between 320 and ${MAX_SCREENSHOT_SIDE}`);
424
434
  const staleCheckPixels = config?.staleCheckPixels ?? true;
425
435
  if (typeof staleCheckPixels !== "boolean") invalid("staleCheckPixels", "must be a boolean");
436
+ const staleCheckTree = config?.staleCheckTree ?? "target";
437
+ if (staleCheckTree !== "strict" && staleCheckTree !== "target" && staleCheckTree !== "off") invalid("staleCheckTree", "must be \"strict\", \"target\", or \"off\"");
426
438
  const maxObservationAgeMs = config?.maxObservationAgeMs ?? 3e4;
427
439
  if (!Number.isFinite(maxObservationAgeMs) || maxObservationAgeMs < 1e3 || maxObservationAgeMs > 6e5) invalid("maxObservationAgeMs", `must be a finite number between ${MIN_OBSERVATION_AGE_MS} and ${MAX_OBSERVATION_AGE_MS}`);
428
440
  const maxCachedObservations = config?.maxCachedObservations ?? 8;
@@ -451,6 +463,7 @@ function resolveConfig(config) {
451
463
  maxHelperOutputBytes,
452
464
  maxScreenshotSide,
453
465
  staleCheckPixels,
466
+ staleCheckTree,
454
467
  maxObservationAgeMs,
455
468
  maxCachedObservations,
456
469
  maxElements,
@@ -464,8 +477,7 @@ function resolveConfig(config) {
464
477
  })
465
478
  });
466
479
  }
467
- //#endregion
468
- //#region src/observe.ts
480
+ // src/observe.ts
469
481
  /**
470
482
  * Observation cache and the staleness boundary. Every observation stores the
471
483
  * window's identity facts plus content hashes; before any action the executor
@@ -494,6 +506,18 @@ function observationIdOf(snapshot) {
494
506
  ]);
495
507
  return createHash("sha256").update(material).digest("hex").slice(0, 32);
496
508
  }
509
+ /** Hash one captured element's identity-relevant fields. */
510
+ function elementHashOf(element) {
511
+ return createHash("sha256").update(JSON.stringify([
512
+ element.elementId,
513
+ element.controlType,
514
+ element.name,
515
+ element.automationId,
516
+ element.rect,
517
+ element.enabled,
518
+ element.patterns
519
+ ])).digest("hex");
520
+ }
497
521
  /** Bounded LRU cache of observations, plus the staleness verdict logic. */
498
522
  var ObservationStore = class {
499
523
  config;
@@ -508,7 +532,7 @@ var ObservationStore = class {
508
532
  * @param snapshot - the snapshot facts it came from.
509
533
  * @returns the stored record (id = hash of the state).
510
534
  */
511
- record(snapshot) {
535
+ record(snapshot, elements) {
512
536
  const record = {
513
537
  id: observationIdOf(snapshot),
514
538
  windowId: snapshot.windowId,
@@ -519,6 +543,7 @@ var ObservationStore = class {
519
543
  rect: { ...snapshot.rect },
520
544
  treeHash: snapshot.treeHash,
521
545
  shotHash: snapshot.shotHash,
546
+ ...elements === void 0 ? {} : { elementHashes: Object.fromEntries(elements.map((element) => [element.elementId, elementHashOf(element)])) },
522
547
  elementCount: snapshot.elementCount,
523
548
  observedAt: Date.now()
524
549
  };
@@ -542,8 +567,9 @@ var ObservationStore = class {
542
567
  }
543
568
  /**
544
569
  * Compare a fresh re-observation against the cited record. The verdict is
545
- * `ok` only when identity (window/pid/exe/title/class/rect), the tree hash,
546
- * and — when `staleCheckPixels` is on — the pixel hash all still match, and
570
+ * `ok` only when identity (window/pid/exe/title/class/rect), the tree hash
571
+ * (unless `staleCheckTree: 'off'`), and — when `staleCheckPixels` is on — the
572
+ * pixel hash all still match, and
547
573
  * the record is not older than `maxObservationAgeMs`.
548
574
  *
549
575
  * @param record - the observation the action cites.
@@ -551,7 +577,7 @@ var ObservationStore = class {
551
577
  * @param now - wall-clock now (injectable for tests).
552
578
  * @returns the verdict.
553
579
  */
554
- verify(record, fresh, now = Date.now()) {
580
+ verify(record, fresh, now = Date.now(), target) {
555
581
  if (now - record.observedAt > this.config.maxObservationAgeMs) return {
556
582
  ok: false,
557
583
  code: "EXPIRED",
@@ -562,12 +588,18 @@ var ObservationStore = class {
562
588
  code: "STALE_IDENTITY",
563
589
  detail: `window ${record.windowId} no longer matches observation ${record.id} (title/class/process or rect changed)`
564
590
  };
565
- if (fresh.treeHash !== record.treeHash) return {
566
- ok: false,
567
- code: "STALE_TREE",
568
- detail: `the accessibility tree of window ${record.windowId} changed since observation ${record.id}`
569
- };
570
- if (this.config.staleCheckPixels && fresh.shotHash !== record.shotHash) return {
591
+ let scopedTargetUnchanged = false;
592
+ if (this.config.staleCheckTree !== "off" && fresh.treeHash !== record.treeHash) {
593
+ const expected = target === void 0 || record.elementHashes === void 0 ? void 0 : record.elementHashes[target.ref];
594
+ const current = target?.elements.find((element) => element.elementId === target.ref);
595
+ if (this.config.staleCheckTree === "target" && expected !== void 0 && current !== void 0 && elementHashOf(current) === expected) scopedTargetUnchanged = true;
596
+ else return {
597
+ ok: false,
598
+ code: "STALE_TREE",
599
+ detail: target === void 0 ? `the accessibility tree of window ${record.windowId} changed since observation ${record.id}` : `target element ${target.ref} changed or disappeared since observation ${record.id}`
600
+ };
601
+ }
602
+ if (!scopedTargetUnchanged && this.config.staleCheckPixels && fresh.shotHash !== record.shotHash) return {
571
603
  ok: false,
572
604
  code: "STALE_PIXELS",
573
605
  detail: `the pixels of window ${record.windowId} changed since observation ${record.id}`
@@ -575,8 +607,7 @@ var ObservationStore = class {
575
607
  return { ok: true };
576
608
  }
577
609
  };
578
- //#endregion
579
- //#region src/version.ts
610
+ // src/version.ts
580
611
  /**
581
612
  * The plugin version, hardcoded on purpose: it rides the helper-process
582
613
  * protocol handshake, so it must track `package.json` or released helpers
@@ -586,11 +617,10 @@ var ObservationStore = class {
586
617
  * @module dsh-click/version
587
618
  */
588
619
  /** Plugin version advertised in the helper-protocol handshake. */
589
- const VERSION = "0.3.24";
620
+ const VERSION = "0.3.26";
590
621
  /** The helper protocol revision; bump only on incompatible wire changes. */
591
622
  const HELPER_PROTOCOL_VERSION = 1;
592
- //#endregion
593
- //#region src/platform/runner.ts
623
+ // src/platform/runner.ts
594
624
  /**
595
625
  * The Windows backend: every operation spawns the native PowerShell helper
596
626
  * (`native/win32/dsh-click-helper.ps1`) through the harness's `ctx.subprocess`
@@ -874,8 +904,7 @@ var HelperBackend = class {
874
904
  };
875
905
  }
876
906
  };
877
- //#endregion
878
- //#region src/platform/selection.ts
907
+ // src/platform/selection.ts
879
908
  /** A backend that cannot act: every operation fails closed with the given reason. */
880
909
  var UnavailableBackend = class {
881
910
  platform;
@@ -946,8 +975,7 @@ function createBackend(ctx, config) {
946
975
  }
947
976
  return new UnavailableBackend(process.platform, RESERVED_BACKENDS[process.platform] ?? "unsupported platform");
948
977
  }
949
- //#endregion
950
- //#region src/vision.ts
978
+ // src/vision.ts
951
979
  /**
952
980
  * Resolve whether the calling agent's current model declares image input.
953
981
  *
@@ -969,8 +997,7 @@ async function sessionAcceptsImages(agent, ctx, signal) {
969
997
  return false;
970
998
  }
971
999
  }
972
- //#endregion
973
- //#region src/vision/ocr.ts
1000
+ // src/vision/ocr.ts
974
1001
  /**
975
1002
  * Optical character recognition seam for windows without a UIA tree. OCR is
976
1003
  * optional and probed at mount: the `tesseract` provider is used only when the
@@ -1115,8 +1142,7 @@ async function probeTesseract(subprocess, command, language) {
1115
1142
  return new UnavailableOcrProvider("tesseract", `tesseract (${command}) is not installed`);
1116
1143
  }
1117
1144
  }
1118
- //#endregion
1119
- //#region src/vision/grounding.ts
1145
+ // src/vision/grounding.ts
1120
1146
  /**
1121
1147
  * Visual grounding seam: turning a screenshot plus a natural-language prompt
1122
1148
  * into labeled bounding boxes. Kept as an independent provider so a vision
@@ -1144,8 +1170,7 @@ var UnavailableGroundingProvider = class {
1144
1170
  return Promise.reject(new DshClickError(`visual grounding unavailable: ${this.reason}`, "GROUNDING_UNAVAILABLE"));
1145
1171
  }
1146
1172
  };
1147
- //#endregion
1148
- //#region src/vision/index.ts
1173
+ // src/vision/index.ts
1149
1174
  /**
1150
1175
  * Map one screenshot box (possibly downscaled by `maxScreenshotSide`) to its
1151
1176
  * screen-space box, centering on the window's screen rect origin.
@@ -1172,8 +1197,7 @@ function centerOf(box) {
1172
1197
  y: Math.round(box.y + box.height / 2)
1173
1198
  };
1174
1199
  }
1175
- //#endregion
1176
- //#region src/tools.ts
1200
+ // src/tools.ts
1177
1201
  /** Sanitize one snapshot into the model-visible window value. */
1178
1202
  function observedWindow(snapshot, maxTextLength) {
1179
1203
  return {
@@ -1528,7 +1552,7 @@ function screenReadTool(services) {
1528
1552
  const parsed = args;
1529
1553
  const tree = await backend.tree(parsed.target ?? {}, config.maxElements, config.maxTreeDepth, parsed.includePixels ?? true, exec.signal);
1530
1554
  const sanitized = observedWindow(tree.snapshot, config.maxTextLength);
1531
- const record = observations.record(tree.snapshot);
1555
+ const record = observations.record(tree.snapshot, tree.elements);
1532
1556
  auditObservation(exec, {
1533
1557
  observationId: record.id,
1534
1558
  windowId: tree.snapshot.windowId,
@@ -1853,7 +1877,7 @@ function clickTool(services) {
1853
1877
  y: target.y
1854
1878
  },
1855
1879
  button: parsed.button ?? "left"
1856
- }, focusFallback, exec.signal));
1880
+ }, focusFallback, exec.signal), byElement ? target.elementId : void 0);
1857
1881
  return {
1858
1882
  ok: true,
1859
1883
  windowId: outcome.windowId,
@@ -1912,7 +1936,7 @@ function typeTool(services) {
1912
1936
  elementId: parsed.elementId,
1913
1937
  text: parsed.text,
1914
1938
  rollback: config.rollbackEnabled
1915
- }, focusFallback, exec.signal));
1939
+ }, focusFallback, exec.signal), parsed.elementId);
1916
1940
  return {
1917
1941
  ok: true,
1918
1942
  windowId: outcome.windowId,
@@ -1981,7 +2005,7 @@ function scrollTool(services) {
1981
2005
  ...parsed.elementId !== void 0 ? { elementId: parsed.elementId } : {},
1982
2006
  direction: parsed.direction,
1983
2007
  amount
1984
- }, focusFallback, exec.signal));
2008
+ }, focusFallback, exec.signal), parsed.elementId);
1985
2009
  return {
1986
2010
  ok: true,
1987
2011
  windowId: outcome.windowId,
@@ -2209,8 +2233,7 @@ function allTools(services) {
2209
2233
  appLaunchTool(services)
2210
2234
  ];
2211
2235
  }
2212
- //#endregion
2213
- //#region src/index.ts
2236
+ // src/index.ts
2214
2237
  const name = "dsh-click";
2215
2238
  /** Hard services: the tool registry every contribution lands in, plus the subprocess runtime the Windows helper spawns through. */
2216
2239
  const inject = ["tools", "subprocess"];
@@ -2245,5 +2268,4 @@ async function apply(ctx, config) {
2245
2268
  };
2246
2269
  for (const tool of allTools(services)) ctx.effect(() => ctx.tools.register(tool), `dsh-click: ${tool.name} tool`);
2247
2270
  }
2248
- //#endregion
2249
2271
  export { ACTION_EVENT, ActionExecutor, Config, DshClickError, HELPER_PROTOCOL_VERSION, HelperBackend, OBSERVED_EVENT, ObservationStore, TesseractOcrProvider, UnavailableBackend, UnavailableGroundingProvider, UnavailableOcrProvider, VERSION, allTools, apply, centerOf, createBackend, inject, name, observationIdOf, parseTesseractTsv, probeTesseract, redactSensitive, resolveConfig, sanitizePath, sanitizeText, sanitizeVisible, screenBoxFor, tesseractArgv };
@@ -80,7 +80,7 @@ export declare class ActionExecutor {
80
80
  * @param run - the backend call (receives the resolved focus flag).
81
81
  * @returns the validated backend outcome.
82
82
  */
83
- perform(toolName: string, exec: ToolRunContext, observationId: string, windowId: number, run: (focusFallback: boolean) => Promise<ActionOutcome>): Promise<ActionOutcome>;
83
+ perform(toolName: string, exec: ToolRunContext, observationId: string, windowId: number, run: (focusFallback: boolean) => Promise<ActionOutcome>, targetRef?: string): Promise<ActionOutcome>;
84
84
  /**
85
85
  * Gate and launch one application. No window observation exists yet, so the
86
86
  * gate runs against the requested name/path alone and the launch outcome's
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAA0B,MAAM,cAAc,CAAA;AAEvE,OAAO,EAAiB,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAuB,MAAM,qBAAqB,CAAA;AAErI,yDAAyD;AACzD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CAAA;AAS5D,iEAAiE;AACjE,MAAM,WAAW,kBAAkB;IACjC,4BAA4B;IAC5B,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;IACrB,8BAA8B;IAC9B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;IAC/B,kCAAkC;IAClC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAA;IAChC,6BAA6B;IAC7B,QAAQ,CAAC,YAAY,EAAE,gBAAgB,CAAA;CACxC;AAED,yEAAyE;AACzE,qBAAa,cAAc;IAIb,OAAO,CAAC,QAAQ,CAAC,IAAI;IAHjC,+DAA+D;IAC/D,OAAO,CAAC,eAAe,CAAQ;IAC/B,2CAA2C;gBACd,IAAI,EAAE,kBAAkB;IAErD,4BAA4B;IAC5B,OAAO,KAAK,GAAG,GAEd;IAED,2BAA2B;IAC3B,OAAO,KAAK,MAAM,GAEjB;IAED,gFAAgF;IAChF,OAAO,CAAC,KAAK;IAkBb;;;;;;;;OAQG;YACW,kBAAkB;IAyBhC;;;;;;;;;;;OAWG;YACW,IAAI;IAuClB;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAS9B;;;;;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+DAA+D;IAC/D,OAAO,CAAC,eAAe,CAAQ;IAC/B,2CAA2C;gBACd,IAAI,EAAE,kBAAkB;IAErD,4BAA4B;IAC5B,OAAO,KAAK,GAAG,GAEd;IAED,2BAA2B;IAC3B,OAAO,KAAK,MAAM,GAEjB;IAED,gFAAgF;IAChF,OAAO,CAAC,KAAK;IAkBb;;;;;;;;OAQG;YACW,kBAAkB;IAiChC;;;;;;;;;;;OAWG;YACW,IAAI;IAuClB;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAS9B;;;;;;;;;;OAUG;IACG,OAAO,CACX,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,cAAc,EACpB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,OAAO,CAAC,aAAa,CAAC,EACvD,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,CAAC;IAwCzB;;;;;;;;;OASG;IACG,MAAM,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC;CAoBlG"}
@@ -85,6 +85,14 @@ export interface Config {
85
85
  maxScreenshotSide?: number;
86
86
  /** Compare a fresh pixel hash before every action (default true; the stale-state boundary). */
87
87
  staleCheckPixels?: boolean;
88
+ /**
89
+ * Accessibility-tree staleness policy. `strict` refuses an action when any node in the
90
+ * window changed; `target` (default) lets `click`/`type`/`scroll` proceed when the
91
+ * addressed element itself is unchanged, even if an unrelated clock/cursor moved the
92
+ * whole-tree hash; `off` skips the tree hash entirely. Identity, observation-age, and
93
+ * (unless disabled) pixel checks still apply.
94
+ */
95
+ staleCheckTree?: 'strict' | 'target' | 'off';
88
96
  /** Maximum age in ms of an observation that an action may still base on (default 30000). */
89
97
  maxObservationAgeMs?: number;
90
98
  /** Cap on cached observations (default 8). */
@@ -120,6 +128,8 @@ export interface ResolvedConfig {
120
128
  maxScreenshotSide: number;
121
129
  /** Whether the pixel-level stale check runs. */
122
130
  staleCheckPixels: boolean;
131
+ /** Whole-window tree-staleness policy. */
132
+ staleCheckTree: 'strict' | 'target' | 'off';
123
133
  /** Maximum observation age in milliseconds. */
124
134
  maxObservationAgeMs: number;
125
135
  /** Cap on cached observations. */
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAExC,+EAA+E;AAC/E,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;AAEvC,mFAAmF;AACnF,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,CAAA;AAE7C,uDAAuD;AACvD,eAAO,MAAM,yBAAyB,QAAS,CAAA;AAE/C,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,SAAU,CAAA;AAE5C,sFAAsF;AACtF,eAAO,MAAM,+BAA+B,QAAmB,CAAA;AAE/D,sCAAsC;AACtC,eAAO,MAAM,uBAAuB,QAAmB,CAAA;AAEvD,2FAA2F;AAC3F,eAAO,MAAM,2BAA2B,OAAO,CAAA;AAE/C,sFAAsF;AACtF,eAAO,MAAM,mBAAmB,MAAM,CAAA;AACtC,eAAO,MAAM,mBAAmB,OAAO,CAAA;AAEvC,8EAA8E;AAC9E,eAAO,MAAM,8BAA8B,QAAS,CAAA;AAEpD,sCAAsC;AACtC,eAAO,MAAM,sBAAsB,OAAQ,CAAA;AAC3C,eAAO,MAAM,sBAAsB,SAAU,CAAA;AAE7C,4EAA4E;AAC5E,eAAO,MAAM,+BAA+B,IAAI,CAAA;AAEhD,sCAAsC;AACtC,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAEzC,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,MAAM,CAAA;AAEvC,kCAAkC;AAClC,eAAO,MAAM,YAAY,OAAQ,CAAA;AAE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
@@ -8,7 +8,7 @@
8
8
  * @module dsh-click/observe
9
9
  */
10
10
  import type { ResolvedConfig } from './config.js';
11
- import type { Rect, WindowSnapshot } from './platform/types.js';
11
+ import type { ElementInfo, Rect, WindowSnapshot } from './platform/types.js';
12
12
  /** One cached observation, immutable after construction. */
13
13
  export interface ObservationRecord {
14
14
  /** Observation id (content hash). */
@@ -21,6 +21,8 @@ export interface ObservationRecord {
21
21
  rect: Rect;
22
22
  treeHash: string;
23
23
  shotHash: string;
24
+ /** Per-element hashes captured from a tree read (absent for screenshot-only observations). */
25
+ elementHashes?: Readonly<Record<string, string>>;
24
26
  elementCount: number;
25
27
  /** Wall-clock capture time in milliseconds. */
26
28
  observedAt: number;
@@ -40,6 +42,8 @@ export type FreshnessVerdict = {
40
42
  * @returns a hex observation id.
41
43
  */
42
44
  export declare function observationIdOf(snapshot: WindowSnapshot): string;
45
+ /** Hash one captured element's identity-relevant fields. */
46
+ export declare function elementHashOf(element: ElementInfo): string;
43
47
  /** Bounded LRU cache of observations, plus the staleness verdict logic. */
44
48
  export declare class ObservationStore {
45
49
  private readonly config;
@@ -52,7 +56,7 @@ export declare class ObservationStore {
52
56
  * @param snapshot - the snapshot facts it came from.
53
57
  * @returns the stored record (id = hash of the state).
54
58
  */
55
- record(snapshot: WindowSnapshot): ObservationRecord;
59
+ record(snapshot: WindowSnapshot, elements?: readonly ElementInfo[]): ObservationRecord;
56
60
  /**
57
61
  * Look one observation up by id.
58
62
  *
@@ -62,8 +66,9 @@ export declare class ObservationStore {
62
66
  get(id: string): ObservationRecord | undefined;
63
67
  /**
64
68
  * Compare a fresh re-observation against the cited record. The verdict is
65
- * `ok` only when identity (window/pid/exe/title/class/rect), the tree hash,
66
- * and — when `staleCheckPixels` is on — the pixel hash all still match, and
69
+ * `ok` only when identity (window/pid/exe/title/class/rect), the tree hash
70
+ * (unless `staleCheckTree: 'off'`), and — when `staleCheckPixels` is on — the
71
+ * pixel hash all still match, and
67
72
  * the record is not older than `maxObservationAgeMs`.
68
73
  *
69
74
  * @param record - the observation the action cites.
@@ -71,6 +76,9 @@ export declare class ObservationStore {
71
76
  * @param now - wall-clock now (injectable for tests).
72
77
  * @returns the verdict.
73
78
  */
74
- verify(record: ObservationRecord, fresh: WindowSnapshot, now?: number): FreshnessVerdict;
79
+ verify(record: ObservationRecord, fresh: WindowSnapshot, now?: number, target?: {
80
+ readonly ref: string;
81
+ readonly elements: readonly ElementInfo[];
82
+ }): FreshnessVerdict;
75
83
  }
76
84
  //# sourceMappingURL=observe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAE/D,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,wFAAwF;AACxF,MAAM,MAAM,gBAAgB,GACxB;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GACZ;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,qBAAqB,GAAG,SAAS,GAAG,gBAAgB,GAAG,YAAY,GAAG,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7H;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IAC/C,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,wFAAwF;AACxF,MAAM,MAAM,gBAAgB,GACxB;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GACZ;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,qBAAqB,GAAG,SAAS,GAAG,gBAAgB,GAAG,YAAY,GAAG,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7H;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAYhE;AAED,4DAA4D;AAC5D,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAU1D;AAED,2EAA2E;AAC3E,qBAAa,gBAAgB;IAIf,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuC;IAE/D,wEAAwE;gBAC3C,MAAM,EAAE,cAAc;IAEnD;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,SAAS,WAAW,EAAE,GAAG,iBAAiB;IA2BtF;;;;;OAKG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAI9C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,cAAc,EACrB,GAAG,GAAE,MAAmB,EACxB,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAA;KAAE,GAC3E,gBAAgB;CAoDpB"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -7,7 +7,7 @@
7
7
  * @module dsh-click/version
8
8
  */
9
9
  /** Plugin version advertised in the helper-protocol handshake. */
10
- export declare const VERSION = "0.3.24";
10
+ export declare const VERSION = "0.3.26";
11
11
  /** The helper protocol revision; bump only on incompatible wire changes. */
12
12
  export declare const HELPER_PROTOCOL_VERSION = 1;
13
13
  //# sourceMappingURL=version.d.ts.map
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-click",
3
- "version": "0.3.24",
3
+ "version": "0.3.26",
4
4
  "description": "Cross-platform native desktop control tools for DeepSeek Harness (Windows first): screen_shot, screen_read (accessibility tree + pixel description for text-only models), click/type/scroll/key, and app_list/app_launch — every mutating action gated by approval, never stealing foreground focus, with stale-observation rejection and process-identity checks",
5
5
  "repository": {
6
6
  "type": "git",
@@ -115,7 +115,7 @@
115
115
  "@deepseek-ai/dsh-subprocess": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0",
116
116
  "@deepseek-ai/dsh-tools": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0",
117
117
  "@deepseek-ai/dsh-user-approval": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0",
118
- "@deepseek-ai/schemastery": "^3.18.5-alpha.1"
118
+ "@deepseek-ai/schemastery": "^3.18.5"
119
119
  },
120
120
  "dependencies": {},
121
121
  "devDependencies": {
@@ -131,13 +131,13 @@
131
131
  "@deepseek-ai/dsh-system-prompt": "0.2.1-rc.2",
132
132
  "@deepseek-ai/dsh-tools": "0.2.1-rc.2",
133
133
  "@deepseek-ai/dsh-user-approval": "0.2.1-rc.2",
134
- "@deepseek-ai/schemastery": "^3.18.5-alpha.1",
135
- "@types/node": "^22.19.0",
136
- "@vitest/coverage-v8": "3.2.0",
134
+ "@deepseek-ai/schemastery": "^3.18.5",
135
+ "@types/node": "^22.20.5",
136
+ "@vitest/coverage-v8": "3.2.7",
137
137
  "oxlint": "0.18.1",
138
138
  "vitest": "^3.2.0",
139
139
  "@deepseek-ai/dsh-working-directory": "0.2.1-rc.2",
140
- "tsdown": "^0.22.14",
140
+ "tsdown": "^0.23.2",
141
141
  "typescript": "^5.9.0"
142
142
  },
143
143
  "scripts": {