dsh-browser-playwright-codex 0.7.8 → 0.8.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/lib/tool.js CHANGED
@@ -138,13 +138,18 @@ export function apply(ctx, config) {
138
138
  waitFor: {
139
139
  type: 'string',
140
140
  enum: ['load', 'domcontentloaded', 'networkidle'],
141
- description: 'Load condition to wait for. Defaults to load.',
141
+ description: 'Load condition to wait for. Defaults to domcontentloaded; load never fires on long-polling or ' +
142
+ 'download pages and hangs the call (issue #5).',
142
143
  },
143
144
  },
144
145
  output: { schema: SNAPSHOT_SCHEMA, render: renderSnapshotValue },
145
146
  async execute(args, exec) {
146
147
  const session = await acquire(exec);
147
- const waitUntil = args.waitFor ?? 'load';
148
+ // domcontentloaded, not load: a page with an endless subresource (long
149
+ // poll, streaming download, ad frame that never settles) never reaches
150
+ // 'load', so the default burned the whole navigation timeout on pages
151
+ // that were perfectly usable already (issue #5).
152
+ const waitUntil = args.waitFor ?? 'domcontentloaded';
148
153
  return snapshotValue(await session.navigate(args.url, waitUntil, exec.signal));
149
154
  },
150
155
  }));
@@ -435,13 +440,18 @@ export function apply(ctx, config) {
435
440
  waitFor: {
436
441
  type: 'string',
437
442
  enum: ['load', 'domcontentloaded', 'networkidle'],
438
- description: 'Load condition to wait for. Defaults to load.',
443
+ description: 'Load condition to wait for. Defaults to domcontentloaded; load never fires on long-polling or ' +
444
+ 'download pages and hangs the call (issue #5).',
439
445
  },
440
446
  },
441
447
  output: { schema: SNAPSHOT_SCHEMA, render: renderSnapshotValue },
442
448
  async execute(args, exec) {
443
449
  const session = await acquire(exec);
444
- const waitUntil = args.waitFor ?? 'load';
450
+ // domcontentloaded, not load: a page with an endless subresource (long
451
+ // poll, streaming download, ad frame that never settles) never reaches
452
+ // 'load', so the default burned the whole navigation timeout on pages
453
+ // that were perfectly usable already (issue #5).
454
+ const waitUntil = args.waitFor ?? 'domcontentloaded';
445
455
  return snapshotValue(await session.openTab(args.url, waitUntil, exec.signal));
446
456
  },
447
457
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-browser-playwright-codex",
3
- "version": "0.7.8",
3
+ "version": "0.8.0",
4
4
  "description": "Browser automation for DeepSeek Harness, one plugin: fill in forms, scrape lists and work across tabs in real pages, using the logins you already have. Runs in a visible window that stays quiet when minimised; native dialogs are parked instead of confirmed, CAPTCHA pages are flagged with a note that says stop and hand the page back, password / one-time-code / card fields are refused by browser_fill, and the Settings card (enable/disable, page-reading mode, capability gates) now lives inside this package.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -57,10 +57,12 @@
57
57
  "verify": "npm run build && node scripts/dsh-browser-verify.mjs",
58
58
  "verify:live": "npm run build && node scripts/dsh-browser-verify.mjs --live",
59
59
  "doctor": "node scripts/doctor.mjs",
60
+ "swarm:patch": "node scripts/swarm-patch.mjs",
61
+ "swarm:check": "node scripts/swarm-patch.mjs --check",
60
62
  "cost": "node node_modules/tsx/dist/cli.mjs scripts/measure-prompt-cost.mjs",
61
63
  "format": "node node_modules/prettier/bin/prettier.cjs --write \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.mjs\"",
62
64
  "format:check": "node node_modules/prettier/bin/prettier.cjs --check \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.mjs\"",
63
- "prepublishOnly": "npm run build && npm run typecheck && npm test && npm run verify && npm run preflight",
65
+ "prepublishOnly": "npm run build && npm run typecheck && npm test && npm run swarm:check && npm run verify && npm run preflight",
64
66
  "preflight": "node scripts/preflight.mjs ."
65
67
  },
66
68
  "dependencies": {