tamash-playwright 0.9.0-beta.4 → 0.9.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +132 -0
  2. package/package.json +2 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,132 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. Format loosely follows
4
+ [Keep a Changelog](https://keepachangelog.com/); dates are when each version was published.
5
+
6
+ ## [0.9.0] - 2026-08-26
7
+
8
+ ### Fixed
9
+
10
+ - **Heal-log visibility**: a heal with no reusable selector (a one-shot `ref` resolution, or a
11
+ vision-tagged point) was silently dropped from `heals.jsonl` entirely, even though it genuinely
12
+ fixed that run. Now logged for audit — with a clear `reviewNote` — whenever it has a suggestion
13
+ *or* a review note, without letting an audit-only entry shadow an older, real cached fix for the
14
+ same location.
15
+ - **Vision support for `claude-subscription`/`copilot-subscription`**: both providers had
16
+ `supportsVision` hardcoded to `false` regardless of model. Both SDKs genuinely support image
17
+ input (Claude Agent SDK via an image content block; Copilot SDK via a `blob` attachment) —
18
+ implemented for real and verified live with actual screenshots, not just doctor's yes/no label.
19
+ - **Argument forwarding in healed replays**: `replayAction()` only ever forwarded the first call
20
+ argument. A trailing options object (`click({ modifiers: [...] })`, `fill(value, { timeout })`,
21
+ `dispatchEvent`'s 3rd argument) was silently dropped on a healed replay — changing the action's
22
+ real behavior while still reporting a clean `HEALED`.
23
+ - **`ref`-strategy replays now act through the derived durable locator, not the raw ref**:
24
+ `aria-ref=` locators never resolve for `dispatchEvent` at all (a Playwright-level limitation,
25
+ confirmed directly via `DEBUG=pw:api`), even though the identical element resolves instantly via
26
+ a `normalize()`-derived locator for that same action. Fixed by deriving the durable locator
27
+ *before* replaying and acting through it, falling back to the raw ref only when nothing durable
28
+ could be found. A related accuracy bug is fixed alongside it: the report/heal-log could
29
+ previously claim a derived selector "worked" even when its own replay had actually failed and a
30
+ fallback silently took over — now only the locator that genuinely performed the action is
31
+ reported or cached.
32
+ - **`copilot-subscription` could hang a non-Playwright test runner indefinitely** — its shared
33
+ client keeps a connection open across calls for performance, which Playwright's own test runner
34
+ tolerates by force-exiting regardless, but a runner like Cucumber does not, so the process never
35
+ returned even after every test had already passed. Found live running a real Cucumber suite in
36
+ CI. `closeCopilotSubscriptionClient()` is now exported from the package's own entry point so any
37
+ non-Playwright consumer can call it from their own teardown hook (e.g. Cucumber's `AfterAll`).
38
+
39
+ ### Added
40
+
41
+ - **`locator.getDurable(action?)`** — resolves any locator (most usefully one built from
42
+ `aria-ref=...`) to a durable, reusable equivalent (`getByRole`/`getByLabel`/a css selector/…),
43
+ using the same derivation logic self-healing already uses internally. Throws if nothing durable
44
+ could be derived, rather than silently handing back something untrusted.
45
+ - **`apply-heals` now previews before writing**: every run — dry or real — shows a styled table of
46
+ exactly what it found (location, before, after, review status) instead of a plain scrolling log.
47
+ A real run also asks for confirmation before writing anything, but *only* at a genuine
48
+ interactive terminal — CI and any non-interactive/piped invocation proceed automatically exactly
49
+ as before, so no existing unattended CI workflow is affected. `--yes`/`-y` skips the prompt at a
50
+ real terminal too.
51
+ - **`doctor`'s output is styled** with colors and tables (including a new end-of-run Summary
52
+ section) instead of a plain scrolling log.
53
+ - **Exact locator code in console lines and reports**: a healed suggestion is now shown as the
54
+ real, copy-pasteable Playwright call (`getByRole("textbox", { name: "Username" })`) instead of
55
+ an abbreviated shorthand (`role:textbox:Username`) — the same code `apply-heals` would write to
56
+ source, so what you see is never a lossier stand-in for what was actually used.
57
+ - A canonical Page Object Model usage example (`tests/pages/` +
58
+ `tests/example-orangehrm-add-employee.spec.ts`), verified live against a real OrangeHRM demo,
59
+ including a genuine self-heal via the `near`/widening strategy on a real unlabeled field.
60
+
61
+ ### Changed
62
+
63
+ - README/usage.md's vision-fallback documentation now correctly lists `claude-subscription`/
64
+ `copilot-subscription` as vision-capable (with a suitable model), not just the API-key providers.
65
+
66
+ ## [0.8.0] - 2026-08-25
67
+
68
+ ### Added
69
+
70
+ - `claude-subscription` and `copilot-subscription` heal providers — self-healing backed by a
71
+ personal Claude or GitHub Copilot subscription instead of a pay-per-token API key, working both
72
+ locally and unattended in CI (`CLAUDE_CODE_OAUTH_TOKEN` for Claude; the ambient `GITHUB_TOKEN` or
73
+ a personal-account PAT for Copilot on GitHub Actions).
74
+
75
+ ### Fixed
76
+
77
+ - Missing CLI install step in setup docs for `claude-subscription`/`copilot-subscription` — the
78
+ standalone `claude`/`copilot` CLIs are genuinely required for the login step even though the SDKs
79
+ don't need them installed to function at runtime.
80
+
81
+ ### Documentation
82
+
83
+ - The org-vs-personal-account Copilot licensing gotcha in CI (a repo owned by an organization
84
+ without its own Copilot enablement can't use a personal subscription via the ambient token).
85
+ - Action Recovery (`HEALER_ACTION_RECOVERY_ENABLED`) hidden from docs and `doctor` output —
86
+ disabled by default already; this only reduced its visibility, no behavior change.
87
+
88
+ ## [0.7.0] - 2026-08-21
89
+
90
+ ### Added
91
+
92
+ - `apply-heals` — turns a runtime heal into a permanent source-code fix, plus an opportunistic
93
+ cache (`heals.jsonl`) so a previously-confirmed selector is tried before a fresh AI call, and
94
+ history archival so a run's report/log isn't silently overwritten by the next one.
95
+ - Position/relationship-based locator strategies (`near`, `scoped`, `containing`) for elements with
96
+ no accessible identity of their own.
97
+ - Self-healing rebuilt around `ariaSnapshot({ mode: 'ai' })` + `aria-ref=` resolution and
98
+ `Locator.normalize()`, replacing pixel-distance guessing for both the text path and the vision
99
+ fallback's durability upgrade.
100
+ - A real unit test suite (32 tests at the time, zero new dependencies).
101
+
102
+ ### Fixed
103
+
104
+ - `doctor`'s `actionTimeout` check being fooled by a commented-out config value.
105
+ - `apply-heals --logs-dir` silently losing raw heal-log archival.
106
+ - `apply-heals` only replacing the first call when re-healing an already-`near`-fixed line.
107
+ - `apply-heals` `ENOENT` on a fresh CI checkout with no `.tamash-playwright/` directory yet — the
108
+ sharded "apply-heals" CI job checks out fresh and has never run tests itself, so the directory
109
+ genuinely doesn't exist there the way it always does in every local recipe.
110
+ - File path corruption (and a `require()` crash in the generated verification script) for ESM
111
+ (`"type": "module"`) consumer projects — `Error.stack` renders as a `file://` URL there, which
112
+ broke path resolution and a plain `.js` verification script alike.
113
+ - The AI being misled by the broken selector still present in its own prompt context; a failed
114
+ label guess now auto-upgrades to a structural `near` match instead of giving up.
115
+
116
+ ### Verified
117
+
118
+ - All four API-key providers (Ollama, OpenAI, Anthropic, Gemini) confirmed working with real API
119
+ calls, not just documented.
120
+
121
+ ## [0.6.0] - 2026-08-17
122
+
123
+ ### Added
124
+
125
+ - iframe and popup healing, vision fallback (screenshot-based recovery when text alone isn't
126
+ enough), AI-driven action recovery (scroll/force/wait/dispatch), and source-location reporting.
127
+ - `doctor`'s `actionTimeout` configuration check.
128
+
129
+ ### Initial release
130
+
131
+ - Self-healing Playwright bindings: broken locators are recovered at runtime via an AI provider,
132
+ with `.describe()` for human-readable context.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamash-playwright",
3
- "version": "0.9.0-beta.4",
3
+ "version": "0.9.0",
4
4
  "description": "Plug and Play Self-healing for Playwright and automatically recovers broken selectors using an AI model (Ollama, OpenAI, Anthropic, Gemini, or a Claude/GitHub Copilot subscription).",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,6 +11,7 @@
11
11
  "dist",
12
12
  "README.md",
13
13
  "usage.md",
14
+ "CHANGELOG.md",
14
15
  ".env.example"
15
16
  ],
16
17
  "scripts": {