diff --git a/.changeset/codegen-assert-events.md b/.changeset/codegen-assert-events.md deleted file mode 100644 index f621d7b..0000000 --- a/.changeset/codegen-assert-events.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@humanjs/playwright": minor ---- - -`generatePlaywrightTest` now renders explicit `assert` timeline events into `@playwright/test` assertions: `{ kind: 'visible' }` → `expect(locator).toBeVisible()`, `{ kind: 'text', value }` → `toHaveText(value)`, `{ kind: 'url', value }` → `expect(page).toHaveURL(value)`. They interleave with actions in recorded order and pull `page` + `expect` into the test automatically. The standalone `generateHumanJS` script export ignores them (a replay script has no `expect`). This lets tooling that builds a `Timeline` (notably `@humanjs/generator`) emit intentional assertions alongside the actions, beyond the ones already derived from reads and captured inputs. diff --git a/.changeset/codegen-public-export.md b/.changeset/codegen-public-export.md deleted file mode 100644 index 5744473..0000000 --- a/.changeset/codegen-public-export.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@humanjs/playwright": minor ---- - -Export `generateHumanJS` and `generatePlaywrightTest` from the package root. They turn a `Timeline` (the structured action log from `human.record()` / `rec.toTimeline()`) directly into a runnable HumanJS script or a `@humanjs/playwright/test` spec — the same code the `Recording` exporters emit, now callable on any `Timeline` you construct or load. This is the codegen entry point `@humanjs/generator` builds on, and it's useful standalone for tooling that produces timelines without running a live recording. diff --git a/.changeset/cursor-on-by-default.md b/.changeset/cursor-on-by-default.md deleted file mode 100644 index 6fec6cf..0000000 --- a/.changeset/cursor-on-by-default.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@humanjs/playwright": minor ---- - -`createHuman` now installs the visual cursor overlay (`installMouseHelper`) **by default**, so humanized motion is visible in headed runs and recordings without a manual call — exported scripts from `@humanjs/generator` / `Recording.toHumanJS()` now show the cursor when you run them. - -Opt out with `cursor: false` — do this for `speed: 'instant'` / CI, where there's no motion to show and the injected cursor would otherwise land in test DOM and screenshots. Pass an options object (`cursor: { color, size, … }`) to style it. The `@humanjs/playwright/test` fixture opts out automatically in CI (it already runs `instant` there) and shows the cursor on local runs. - -The install is scoped to the session's page, idempotent (a manual `installMouseHelper` or the MCP server's install on top is a no-op), and skipped on page objects that don't support it (so unit-test mocks are unaffected). diff --git a/.changeset/generator-initial-release.md b/.changeset/generator-initial-release.md deleted file mode 100644 index d66381c..0000000 --- a/.changeset/generator-initial-release.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"@humanjs/generator": minor ---- - -Initial release of `@humanjs/generator` — a visual recorder that turns a real browsing session into a clean, humanized Playwright test. - -`npx @humanjs/generator ` opens a real Chromium window and a local (loopback-only) dashboard. As you click, type, scroll, drag, select text, and navigate, each action streams into the dashboard as a step captured with a role-first selector (ARIA role + accessible name → label → text → test id → `#id` → CSS → XPath). The dashboard is a full editor: - -- **drag to reorder**, delete, relabel (label → comment), and edit captured values -- a per-step **selector picker** over the ranked candidates -- **point-and-add assertions** (`toBeVisible` / `toHaveText` / `toHaveURL`) -- a **secret toggle** that exports a value as `process.env.X` instead of a literal (passwords are always masked) -- a **personality switcher** (`careful` / `fast` / `distracted` / `precise`) -- a live, syntax-highlighted code preview that updates on every edit - -Export a `@humanjs/playwright/test` spec (`.spec.ts` / `.test.ts`) or a standalone HumanJS script (`.ts`). The curated timeline runs through `@humanjs/playwright`'s codegen, so generated specs stay in lockstep with the library. Requires Node ≥ 20 and the Playwright Chromium browser (`npx playwright install chromium`). diff --git a/.changeset/select-text-primitive.md b/.changeset/select-text-primitive.md deleted file mode 100644 index efb9236..0000000 --- a/.changeset/select-text-primitive.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@humanjs/playwright": minor -"@humanjs/core": minor -"@humanjs/mcp": minor -"@humanjs/generator": patch -"@humanjs/skill": patch ---- - -Add `human.selectText(target, options?)` — highlight text inside an element. The cursor moves to the element (humanized), then the text is selected — the "select this" gesture before copying, replacing, or triggering a highlight menu. Selects the element's whole text by default; pass `{ text }` to select just that substring, located inside the element whitespace-tolerantly and mapped to exact offsets (first match, falling back to the whole element if not found) — so it's reproduced by the text itself, not brittle coordinates. In `speed: 'instant'` the cursor motion is skipped; the selection is still applied. - -Mirrored as the **`human_selectText`** MCP tool (with the optional `text` arg), rendered by the recorder code generators (`toPlaywright` / `toHumanJS`), documented in the `@humanjs/skill` primitives table, and backed by a new `'selectText'` `KnownActionType` in `@humanjs/core`. `@humanjs/generator` captures the gesture too: highlighting an element's whole text records a plain `selectText`, and highlighting part of it records `selectText(target, { text })` with the exact substring. diff --git a/apps/web/CHANGELOG.md b/apps/web/CHANGELOG.md index 337e945..d082a41 100644 --- a/apps/web/CHANGELOG.md +++ b/apps/web/CHANGELOG.md @@ -1,5 +1,12 @@ # @humanjs/web +## 0.0.6 + +### Patch Changes + +- Updated dependencies [13ca334] + - @humanjs/core@0.8.0 + ## 0.0.5 ### Patch Changes diff --git a/apps/web/package.json b/apps/web/package.json index cb15e3f..49e6127 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@humanjs/web", - "version": "0.0.5", + "version": "0.0.6", "private": true, "description": "humanjs.dev landing page", "type": "module", diff --git a/examples/CHANGELOG.md b/examples/CHANGELOG.md index c09cfb4..b1c59bf 100644 --- a/examples/CHANGELOG.md +++ b/examples/CHANGELOG.md @@ -1,5 +1,16 @@ # @humanjs/examples +## 0.0.8 + +### Patch Changes + +- Updated dependencies [39d87f3] +- Updated dependencies [39d87f3] +- Updated dependencies [39d87f3] +- Updated dependencies [13ca334] + - @humanjs/playwright@0.9.0 + - @humanjs/recorder@0.3.2 + ## 0.0.7 ### Patch Changes diff --git a/examples/package.json b/examples/package.json index 506e71f..e56fd08 100644 --- a/examples/package.json +++ b/examples/package.json @@ -1,6 +1,6 @@ { "name": "@humanjs/examples", - "version": "0.0.7", + "version": "0.0.8", "private": true, "description": "Runnable demos for HumanJS.", "type": "module", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 14f9533..4688fc9 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,13 @@ # @humanjs/core +## 0.8.0 + +### Minor Changes + +- 13ca334: Add `human.selectText(target, options?)` — highlight text inside an element. The cursor moves to the element (humanized), then the text is selected — the "select this" gesture before copying, replacing, or triggering a highlight menu. Selects the element's whole text by default; pass `{ text }` to select just that substring, located inside the element whitespace-tolerantly and mapped to exact offsets (first match, falling back to the whole element if not found) — so it's reproduced by the text itself, not brittle coordinates. In `speed: 'instant'` the cursor motion is skipped; the selection is still applied. + + Mirrored as the **`human_selectText`** MCP tool (with the optional `text` arg), rendered by the recorder code generators (`toPlaywright` / `toHumanJS`), documented in the `@humanjs/skill` primitives table, and backed by a new `'selectText'` `KnownActionType` in `@humanjs/core`. `@humanjs/generator` captures the gesture too: highlighting an element's whole text records a plain `selectText`, and highlighting part of it records `selectText(target, { text })` with the exact substring. + ## 0.7.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index c7e26f3..087af61 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@humanjs/core", - "version": "0.7.0", + "version": "0.8.0", "description": "Personality system, timing math, types, and plugin contract for HumanJS.", "keywords": [ "humanjs", diff --git a/packages/generator/CHANGELOG.md b/packages/generator/CHANGELOG.md new file mode 100644 index 0000000..6c25fb5 --- /dev/null +++ b/packages/generator/CHANGELOG.md @@ -0,0 +1,31 @@ +# @humanjs/generator + +## 0.1.0 + +### Minor Changes + +- 39d87f3: Initial release of `@humanjs/generator` — a visual recorder that turns a real browsing session into a clean, humanized Playwright test. + + `npx @humanjs/generator ` opens a real Chromium window and a local (loopback-only) dashboard. As you click, type, scroll, drag, select text, and navigate, each action streams into the dashboard as a step captured with a role-first selector (ARIA role + accessible name → label → text → test id → `#id` → CSS → XPath). The dashboard is a full editor: + + - **drag to reorder**, delete, relabel (label → comment), and edit captured values + - a per-step **selector picker** over the ranked candidates + - **point-and-add assertions** (`toBeVisible` / `toHaveText` / `toHaveURL`) + - a **secret toggle** that exports a value as `process.env.X` instead of a literal (passwords are always masked) + - a **personality switcher** (`careful` / `fast` / `distracted` / `precise`) + - a live, syntax-highlighted code preview that updates on every edit + + Export a `@humanjs/playwright/test` spec (`.spec.ts` / `.test.ts`) or a standalone HumanJS script (`.ts`). The curated timeline runs through `@humanjs/playwright`'s codegen, so generated specs stay in lockstep with the library. Requires Node ≥ 20 and the Playwright Chromium browser (`npx playwright install chromium`). + +### Patch Changes + +- 13ca334: Add `human.selectText(target, options?)` — highlight text inside an element. The cursor moves to the element (humanized), then the text is selected — the "select this" gesture before copying, replacing, or triggering a highlight menu. Selects the element's whole text by default; pass `{ text }` to select just that substring, located inside the element whitespace-tolerantly and mapped to exact offsets (first match, falling back to the whole element if not found) — so it's reproduced by the text itself, not brittle coordinates. In `speed: 'instant'` the cursor motion is skipped; the selection is still applied. + + Mirrored as the **`human_selectText`** MCP tool (with the optional `text` arg), rendered by the recorder code generators (`toPlaywright` / `toHumanJS`), documented in the `@humanjs/skill` primitives table, and backed by a new `'selectText'` `KnownActionType` in `@humanjs/core`. `@humanjs/generator` captures the gesture too: highlighting an element's whole text records a plain `selectText`, and highlighting part of it records `selectText(target, { text })` with the exact substring. + +- Updated dependencies [39d87f3] +- Updated dependencies [39d87f3] +- Updated dependencies [39d87f3] +- Updated dependencies [13ca334] + - @humanjs/playwright@0.9.0 + - @humanjs/core@0.8.0 diff --git a/packages/generator/package.json b/packages/generator/package.json index b638010..ee5dd8b 100644 --- a/packages/generator/package.json +++ b/packages/generator/package.json @@ -1,6 +1,6 @@ { "name": "@humanjs/generator", - "version": "0.0.0", + "version": "0.1.0", "description": "Visual recorder for HumanJS — npx @humanjs/generator records your clicks in a real browser and exports a clean, humanized Playwright test.", "keywords": [ "humanjs", diff --git a/packages/mcp/CHANGELOG.md b/packages/mcp/CHANGELOG.md index 4790f9f..aa14f26 100644 --- a/packages/mcp/CHANGELOG.md +++ b/packages/mcp/CHANGELOG.md @@ -1,5 +1,23 @@ # @humanjs/mcp +## 0.4.0 + +### Minor Changes + +- 13ca334: Add `human.selectText(target, options?)` — highlight text inside an element. The cursor moves to the element (humanized), then the text is selected — the "select this" gesture before copying, replacing, or triggering a highlight menu. Selects the element's whole text by default; pass `{ text }` to select just that substring, located inside the element whitespace-tolerantly and mapped to exact offsets (first match, falling back to the whole element if not found) — so it's reproduced by the text itself, not brittle coordinates. In `speed: 'instant'` the cursor motion is skipped; the selection is still applied. + + Mirrored as the **`human_selectText`** MCP tool (with the optional `text` arg), rendered by the recorder code generators (`toPlaywright` / `toHumanJS`), documented in the `@humanjs/skill` primitives table, and backed by a new `'selectText'` `KnownActionType` in `@humanjs/core`. `@humanjs/generator` captures the gesture too: highlighting an element's whole text records a plain `selectText`, and highlighting part of it records `selectText(target, { text })` with the exact substring. + +### Patch Changes + +- Updated dependencies [39d87f3] +- Updated dependencies [39d87f3] +- Updated dependencies [39d87f3] +- Updated dependencies [13ca334] + - @humanjs/playwright@0.9.0 + - @humanjs/core@0.8.0 + - @humanjs/recorder@0.3.2 + ## 0.3.0 ### Minor Changes diff --git a/packages/mcp/package.json b/packages/mcp/package.json index 42bd48d..6dd602f 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -1,6 +1,6 @@ { "name": "@humanjs/mcp", - "version": "0.3.0", + "version": "0.4.0", "description": "Model Context Protocol server for HumanJS — drive a Playwright browser with humanized motion from Claude Desktop, Claude Code, Cursor, Codex, and any other MCP client.", "keywords": [ "humanjs", diff --git a/packages/playwright/CHANGELOG.md b/packages/playwright/CHANGELOG.md index b716acb..2d0f4d8 100644 --- a/packages/playwright/CHANGELOG.md +++ b/packages/playwright/CHANGELOG.md @@ -1,5 +1,26 @@ # @humanjs/playwright +## 0.9.0 + +### Minor Changes + +- 39d87f3: `generatePlaywrightTest` now renders explicit `assert` timeline events into `@playwright/test` assertions: `{ kind: 'visible' }` → `expect(locator).toBeVisible()`, `{ kind: 'text', value }` → `toHaveText(value)`, `{ kind: 'url', value }` → `expect(page).toHaveURL(value)`. They interleave with actions in recorded order and pull `page` + `expect` into the test automatically. The standalone `generateHumanJS` script export ignores them (a replay script has no `expect`). This lets tooling that builds a `Timeline` (notably `@humanjs/generator`) emit intentional assertions alongside the actions, beyond the ones already derived from reads and captured inputs. +- 39d87f3: Export `generateHumanJS` and `generatePlaywrightTest` from the package root. They turn a `Timeline` (the structured action log from `human.record()` / `rec.toTimeline()`) directly into a runnable HumanJS script or a `@humanjs/playwright/test` spec — the same code the `Recording` exporters emit, now callable on any `Timeline` you construct or load. This is the codegen entry point `@humanjs/generator` builds on, and it's useful standalone for tooling that produces timelines without running a live recording. +- 39d87f3: `createHuman` now installs the visual cursor overlay (`installMouseHelper`) **by default**, so humanized motion is visible in headed runs and recordings without a manual call — exported scripts from `@humanjs/generator` / `Recording.toHumanJS()` now show the cursor when you run them. + + Opt out with `cursor: false` — do this for `speed: 'instant'` / CI, where there's no motion to show and the injected cursor would otherwise land in test DOM and screenshots. Pass an options object (`cursor: { color, size, … }`) to style it. The `@humanjs/playwright/test` fixture opts out automatically in CI (it already runs `instant` there) and shows the cursor on local runs. + + The install is scoped to the session's page, idempotent (a manual `installMouseHelper` or the MCP server's install on top is a no-op), and skipped on page objects that don't support it (so unit-test mocks are unaffected). + +- 13ca334: Add `human.selectText(target, options?)` — highlight text inside an element. The cursor moves to the element (humanized), then the text is selected — the "select this" gesture before copying, replacing, or triggering a highlight menu. Selects the element's whole text by default; pass `{ text }` to select just that substring, located inside the element whitespace-tolerantly and mapped to exact offsets (first match, falling back to the whole element if not found) — so it's reproduced by the text itself, not brittle coordinates. In `speed: 'instant'` the cursor motion is skipped; the selection is still applied. + + Mirrored as the **`human_selectText`** MCP tool (with the optional `text` arg), rendered by the recorder code generators (`toPlaywright` / `toHumanJS`), documented in the `@humanjs/skill` primitives table, and backed by a new `'selectText'` `KnownActionType` in `@humanjs/core`. `@humanjs/generator` captures the gesture too: highlighting an element's whole text records a plain `selectText`, and highlighting part of it records `selectText(target, { text })` with the exact substring. + +### Patch Changes + +- Updated dependencies [13ca334] + - @humanjs/core@0.8.0 + ## 0.8.0 ### Minor Changes diff --git a/packages/playwright/package.json b/packages/playwright/package.json index c6c5a2f..fd985ee 100644 --- a/packages/playwright/package.json +++ b/packages/playwright/package.json @@ -1,6 +1,6 @@ { "name": "@humanjs/playwright", - "version": "0.8.0", + "version": "0.9.0", "description": "Humanize Playwright sessions for AI agents, QA tests, and demos.", "keywords": [ "humanjs", diff --git a/packages/recorder/CHANGELOG.md b/packages/recorder/CHANGELOG.md index 58f6c62..a20bfda 100644 --- a/packages/recorder/CHANGELOG.md +++ b/packages/recorder/CHANGELOG.md @@ -1,5 +1,15 @@ # @humanjs/recorder +## 0.3.2 + +### Patch Changes + +- Updated dependencies [39d87f3] +- Updated dependencies [39d87f3] +- Updated dependencies [39d87f3] +- Updated dependencies [13ca334] + - @humanjs/playwright@0.9.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/recorder/package.json b/packages/recorder/package.json index 539b6d3..4a2546e 100644 --- a/packages/recorder/package.json +++ b/packages/recorder/package.json @@ -1,6 +1,6 @@ { "name": "@humanjs/recorder", - "version": "0.3.1", + "version": "0.3.2", "description": "One-call session recording for HumanJS — capture a humanized Playwright session as mp4, webm, gif, or a structured JSON timeline.", "keywords": [ "humanjs", diff --git a/packages/skill/CHANGELOG.md b/packages/skill/CHANGELOG.md index 520e695..89d8222 100644 --- a/packages/skill/CHANGELOG.md +++ b/packages/skill/CHANGELOG.md @@ -1,5 +1,13 @@ # @humanjs/skill +## 0.2.1 + +### Patch Changes + +- 13ca334: Add `human.selectText(target, options?)` — highlight text inside an element. The cursor moves to the element (humanized), then the text is selected — the "select this" gesture before copying, replacing, or triggering a highlight menu. Selects the element's whole text by default; pass `{ text }` to select just that substring, located inside the element whitespace-tolerantly and mapped to exact offsets (first match, falling back to the whole element if not found) — so it's reproduced by the text itself, not brittle coordinates. In `speed: 'instant'` the cursor motion is skipped; the selection is still applied. + + Mirrored as the **`human_selectText`** MCP tool (with the optional `text` arg), rendered by the recorder code generators (`toPlaywright` / `toHumanJS`), documented in the `@humanjs/skill` primitives table, and backed by a new `'selectText'` `KnownActionType` in `@humanjs/core`. `@humanjs/generator` captures the gesture too: highlighting an element's whole text records a plain `selectText`, and highlighting part of it records `selectText(target, { text })` with the exact substring. + ## 0.2.0 ### Minor Changes diff --git a/packages/skill/package.json b/packages/skill/package.json index 95de6c3..d1c6e58 100644 --- a/packages/skill/package.json +++ b/packages/skill/package.json @@ -1,6 +1,6 @@ { "name": "@humanjs/skill", - "version": "0.2.0", + "version": "0.2.1", "description": "Install the HumanJS coding-agent skill — teaches Claude Code, Cursor, and Codex to write humanized Playwright automation. Run: npx @humanjs/skill", "keywords": [ "humanjs",