Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/codegen-assert-events.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/codegen-public-export.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/cursor-on-by-default.md

This file was deleted.

16 changes: 0 additions & 16 deletions .changeset/generator-initial-release.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/select-text-primitive.md

This file was deleted.

7 changes: 7 additions & 0 deletions apps/web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @humanjs/web

## 0.0.6

### Patch Changes

- Updated dependencies [13ca334]
- @humanjs/core@0.8.0

## 0.0.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@humanjs/web",
"version": "0.0.5",
"version": "0.0.6",
"private": true,
"description": "humanjs.dev landing page",
"type": "module",
Expand Down
11 changes: 11 additions & 0 deletions examples/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@humanjs/examples",
"version": "0.0.7",
"version": "0.0.8",
"private": true,
"description": "Runnable demos for HumanJS.",
"type": "module",
Expand Down
8 changes: 8 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
31 changes: 31 additions & 0 deletions packages/generator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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 <url>` 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
2 changes: 1 addition & 1 deletion packages/generator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@humanjs/generator",
"version": "0.0.0",
"version": "0.1.0",
"description": "Visual recorder for HumanJS — npx @humanjs/generator <url> records your clicks in a real browser and exports a clean, humanized Playwright test.",
"keywords": [
"humanjs",
Expand Down
18 changes: 18 additions & 0 deletions packages/mcp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
21 changes: 21 additions & 0 deletions packages/playwright/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
10 changes: 10 additions & 0 deletions packages/recorder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/recorder/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 8 additions & 0 deletions packages/skill/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/skill/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down