@ceki/sdk 1.12.0 → 1.14.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/README.md +25 -8
- package/dist/cli.js +956 -116
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +425 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +167 -5
- package/dist/index.d.ts +167 -5
- package/dist/index.js +414 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -111,24 +111,41 @@ await browser.profile.import(saved);
|
|
|
111
111
|
|
|
112
112
|
## Human Mode
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
Behavioral humanization is **ON by default** in both `main` and `incognito` profile modes:
|
|
115
|
+
|
|
116
|
+
- **Typing** — per-character keystrokes with natural inter-key cadence + jitter (extension-side, `Ceki.typeText`).
|
|
117
|
+
- **Mouse** — clicks are preceded by a bezier mousemove trajectory (8–35 intermediate `mouseMoved` events), so the page sees a real pointer trail instead of a teleport.
|
|
118
|
+
|
|
119
|
+
Fingerprint Tier-2 (UA / timezone / WebGL overrides) stays OFF in `main` mode to preserve the provider's identity — separate from behavioral humanization.
|
|
115
120
|
|
|
116
121
|
```typescript
|
|
117
|
-
// Default:
|
|
122
|
+
// Default: behavioral humanizer ON (natural profile)
|
|
118
123
|
const browser = await client.rent(scheduleId);
|
|
119
124
|
|
|
120
125
|
// Explicit profile
|
|
121
126
|
const browser = await client.rent(scheduleId, { human: 'careful' });
|
|
122
127
|
|
|
123
|
-
// Disable humanization
|
|
128
|
+
// Disable session-wide humanization
|
|
124
129
|
const browser = await client.rent(scheduleId, { human: null });
|
|
125
130
|
```
|
|
126
131
|
|
|
132
|
+
### Per-call disable
|
|
133
|
+
|
|
134
|
+
Pass `{ human: false }` to flatten **just one call**, without leaking jitter to siblings:
|
|
135
|
+
|
|
136
|
+
```typescript
|
|
137
|
+
await browser.type('user@example.com', { human: false }); // flat keystrokes
|
|
138
|
+
await browser.click(120, 240, { human: false }); // straight pointer jump
|
|
139
|
+
await browser.scroll({ deltaY: -300, human: false });
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The CLI equivalent is `--no-human` / `--raw` on `type`, `click`, `scroll`, `navigate`. Both flags mean "this call only".
|
|
143
|
+
|
|
127
144
|
### Environment overrides
|
|
128
145
|
|
|
129
146
|
- `CEKI_HUMAN_PROFILE` — Override default profile name (`careful`)
|
|
130
147
|
- `CEKI_HUMAN_PROFILE_PATH` — Path to custom JSON profile file
|
|
131
|
-
- `CEKI_HUMAN_DISABLE=1` —
|
|
148
|
+
- `CEKI_HUMAN_DISABLE=1` — **Global kill-switch**: disable humanization for every call regardless of per-call `human:` arguments or CLI flags
|
|
132
149
|
|
|
133
150
|
## Error Classes
|
|
134
151
|
|
|
@@ -194,10 +211,10 @@ The CLI persists session state locally — after `rent` it saves the session ID
|
|
|
194
211
|
|
|
195
212
|
| Command | Description |
|
|
196
213
|
|---|---|
|
|
197
|
-
| `navigate SID URL` | Open URL |
|
|
198
|
-
| `click SID X Y` | Click at viewport coordinates |
|
|
199
|
-
| `type SID TEXT [--
|
|
200
|
-
| `scroll SID X Y DY` | Scroll from (X, Y) by `DY` pixels |
|
|
214
|
+
| `navigate SID URL [--no-human\|--raw]` | Open URL (humanized by default; `--no-human` skips pre/post delays) |
|
|
215
|
+
| `click SID X Y [--no-human\|--raw]` | Click at viewport coordinates (mousemove trail ON by default; `--no-human` for direct jump) |
|
|
216
|
+
| `type SID TEXT [--selector CSS] [--no-human\|--raw]` | Type text (humanized by default; `--no-human` for flat keystrokes) |
|
|
217
|
+
| `scroll SID X Y DY [--no-human\|--raw]` | Scroll from (X, Y) by `DY` pixels (eased by default; `--no-human` for raw CDP wheel) |
|
|
201
218
|
| `screenshot SID -o FILE [--format png\|jpeg] [--full]` | Save screenshot |
|
|
202
219
|
| `snapshot SID -o FILE` | Screenshot + new chat messages |
|
|
203
220
|
| `switch-tab SID` | Switch active tab |
|