veil-browser 0.1.3 → 0.1.4

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/dist/ai.js +10 -4
  2. package/package.json +1 -1
package/dist/ai.js CHANGED
@@ -226,16 +226,22 @@ Return JSON array of action steps:`;
226
226
  }
227
227
  }
228
228
  }
229
- // Execute a single action step
229
+ // Execute a single action step with X-specific handling
230
230
  async function executeStep(page, step) {
231
231
  switch (step.action) {
232
232
  case 'click': {
233
233
  if (!step.selector)
234
234
  throw new Error('click requires selector');
235
- // Try multiple selector strategies
236
235
  const el = page.locator(step.selector).first();
237
236
  await el.waitFor({ timeout: 5000 }).catch(() => { });
238
- await el.click({ timeout: 5000 });
237
+ // For X, use force click to bypass overlay interceptors
238
+ const isX = page.url().includes('x.com') || page.url().includes('twitter.com');
239
+ if (isX) {
240
+ await el.click({ force: true, timeout: 5000 });
241
+ }
242
+ else {
243
+ await el.click({ timeout: 5000 });
244
+ }
239
245
  await humanDelay(300, 700);
240
246
  break;
241
247
  }
@@ -244,7 +250,7 @@ async function executeStep(page, step) {
244
250
  throw new Error('type requires selector and text');
245
251
  const el = page.locator(step.selector).first();
246
252
  await el.waitFor({ timeout: 5000 }).catch(() => { });
247
- await el.click();
253
+ await el.click({ force: true });
248
254
  await humanDelay(200, 400);
249
255
  // Type with human-like delays
250
256
  for (const char of step.text) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veil-browser",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Stealth browser CLI for AI agents — bypass bot detection, persist sessions, local CAPTCHA solving, MCP server",
5
5
  "keywords": [
6
6
  "browser",