autokap 1.0.4 → 1.0.6

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/cli.js +7 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -24,7 +24,7 @@ program
24
24
  .option('--ws-url <url>', 'WebSocket server URL', DEFAULT_WS_URL)
25
25
  .action(async (key, opts) => {
26
26
  try {
27
- const res = await fetch(`${opts.apiBaseUrl}/api/v1/presets`, {
27
+ const res = await fetch(`${opts.apiBaseUrl}/api/cli/validate`, {
28
28
  headers: { Authorization: `Bearer ${key}` },
29
29
  });
30
30
  if (!res.ok) {
@@ -185,6 +185,12 @@ async function executeBrowserCommand(browser, method, params) {
185
185
  case 'addCookies':
186
186
  await browser.addCookies(params.cookies);
187
187
  return null;
188
+ // Page info (used by RemoteBrowser.currentPage proxy)
189
+ case 'getPageInfo': return {
190
+ url: browser.currentPage.url(),
191
+ viewport: browser.currentPage.viewportSize(),
192
+ };
193
+ case 'getPageTitle': return await browser.currentPage.title();
188
194
  // Screenshots — serialize buffers to base64
189
195
  case 'takeScreenshot': {
190
196
  const buf = await browser.takeScreenshot();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autokap",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "AI-powered CLI tool for capturing clean screenshots of websites",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",