neoagent 2.5.2-beta.1 → 2.5.2-beta.10

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.
@@ -250,8 +250,8 @@ class VmBrowserProvider {
250
250
  async typeText(text, options = {}) { return this.#materialize(await this.client.request('POST', '/browser/type-text', { text, ...options })); }
251
251
  async pressKey(key, screenshot = true) { return this.#materialize(await this.client.request('POST', '/browser/press-key', { key, screenshot })); }
252
252
  async scroll(deltaX, deltaY, screenshot = true) { return this.#materialize(await this.client.request('POST', '/browser/scroll', { deltaX, deltaY, screenshot })); }
253
- extract(selector, attribute, all = false) { return this.client.request('POST', '/browser/extract', { selector, attribute, all }); }
254
- evaluate(script) { return this.client.request('POST', '/browser/execute', { code: script }); }
253
+ async extract(selector, attribute, all = false) { return this.client.request('POST', '/browser/extract', { selector, attribute, all }); }
254
+ async evaluate(script) { return this.client.request('POST', '/browser/execute', { code: script }); }
255
255
  async screenshot(options = {}) { return this.#materialize(await this.client.request('POST', '/browser/screenshot', options)); }
256
256
  async screenshotJpeg(quality = 80, options = {}) {
257
257
  const result = await this.client.request('POST', '/browser/screenshot-jpeg', { ...options, quality });
@@ -259,11 +259,11 @@ class VmBrowserProvider {
259
259
  if (!content) throw new Error('VM browser screenshot-jpeg returned no data.');
260
260
  return Buffer.from(content, 'base64');
261
261
  }
262
- launch(options = {}) { return this.client.request('POST', '/browser/launch', options); }
263
- closeBrowser() { return this.client.request('POST', '/browser/close'); }
264
- fill(selector, value) { return this.type(selector, value); }
265
- extractContent(options = {}) { return this.client.request('POST', '/browser/extract', options); }
266
- executeJS(code) { return this.evaluate(code); }
262
+ async launch(options = {}) { return this.client.request('POST', '/browser/launch', options); }
263
+ async closeBrowser() { return this.client.request('POST', '/browser/close'); }
264
+ async fill(selector, value) { return this.type(selector, value); }
265
+ async extractContent(options = {}) { return this.client.request('POST', '/browser/extract', options); }
266
+ async executeJS(code) { return this.evaluate(code); }
267
267
  async getPageInfo() {
268
268
  const status = await this.client.request('GET', '/browser/status');
269
269
  this.headless = status?.headless !== false;