mcpbrowser 0.3.44 → 0.3.46

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 (43) hide show
  1. package/README.md +34 -34
  2. package/package.json +1 -1
  3. package/src/actions/accept-eula.js +5 -5
  4. package/src/actions/click-element.js +25 -25
  5. package/src/actions/close-tab.js +8 -8
  6. package/src/actions/execute-javascript.js +27 -9
  7. package/src/actions/fetch-page.js +20 -19
  8. package/src/actions/get-current-html.js +35 -19
  9. package/src/actions/navigate-history.js +21 -21
  10. package/src/actions/plugin-action.js +15 -15
  11. package/src/actions/plugin-info.js +10 -10
  12. package/src/actions/scroll-page.js +21 -21
  13. package/src/actions/take-screenshot.js +16 -16
  14. package/src/actions/type-text.js +28 -28
  15. package/src/cli/help.js +1 -1
  16. package/src/core/html.js +3 -2
  17. package/src/core/logger.js +51 -2
  18. package/src/core/page.js +39 -3
  19. package/src/core/plugin-loader.js +2 -2
  20. package/src/core/responses.js +4 -4
  21. package/src/mcp-browser.js +20 -12
  22. package/src/plugins/_example/index.js +2 -2
  23. package/src/plugins/gcal/actions/check-availability.js +1 -1
  24. package/src/plugins/gcal/actions/create-event.js +1 -1
  25. package/src/plugins/gcal/actions/delete-event.js +1 -1
  26. package/src/plugins/gcal/actions/edit-event.js +1 -1
  27. package/src/plugins/gcal/actions/list-events.js +1 -1
  28. package/src/plugins/gcal/actions/read-event.js +1 -1
  29. package/src/plugins/gcal/actions/rsvp-event.js +1 -1
  30. package/src/plugins/gcal/actions/search-events.js +1 -1
  31. package/src/plugins/gcal/helpers.js +2 -2
  32. package/src/plugins/gmail/actions/archive-email.js +1 -1
  33. package/src/plugins/gmail/actions/compose-email.js +1 -1
  34. package/src/plugins/gmail/actions/delete-email.js +1 -1
  35. package/src/plugins/gmail/actions/forward-email.js +1 -1
  36. package/src/plugins/gmail/actions/label-email.js +1 -1
  37. package/src/plugins/gmail/actions/list-emails.js +1 -1
  38. package/src/plugins/gmail/actions/mark-read.js +1 -1
  39. package/src/plugins/gmail/actions/mark-unread.js +1 -1
  40. package/src/plugins/gmail/actions/read-email.js +1 -1
  41. package/src/plugins/gmail/actions/reply-email.js +1 -1
  42. package/src/plugins/gmail/actions/search-emails.js +1 -1
  43. package/src/plugins/gmail/helpers.js +3 -3
@@ -235,7 +235,7 @@ export async function checkPrecondition(page, requirement) {
235
235
  return {
236
236
  met: false,
237
237
  error: 'Google Calendar is not the active page.',
238
- suggestion: "Use fetch_webpage({ url: 'https://calendar.google.com' }) to navigate to Google Calendar first."
238
+ suggestion: "Use browser_fetch_webpage({ url: 'https://calendar.google.com' }) to navigate to Google Calendar first."
239
239
  };
240
240
  }
241
241
  return { met: true };
@@ -247,7 +247,7 @@ export async function checkPrecondition(page, requirement) {
247
247
  return {
248
248
  met: false,
249
249
  error: 'Google Calendar is not ready.',
250
- suggestion: "Use fetch_webpage({ url: 'https://calendar.google.com' }) to navigate to Google Calendar."
250
+ suggestion: "Use browser_fetch_webpage({ url: 'https://calendar.google.com' }) to navigate to Google Calendar."
251
251
  };
252
252
  }
253
253
  return { met: true };
@@ -30,7 +30,7 @@ export async function archiveEmail({ page, params }) {
30
30
  const pre = await checkPrecondition(page, 'on_gmail');
31
31
  if (!pre.met) {
32
32
  return new ErrorResponse(pre.error, [
33
- pre.suggestion || "Use fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
33
+ pre.suggestion || "Use browser_fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
34
34
  ]);
35
35
  }
36
36
 
@@ -40,7 +40,7 @@ export async function composeEmail({ page, params }) {
40
40
  const pre = await checkPrecondition(page, 'on_gmail');
41
41
  if (!pre.met) {
42
42
  return new ErrorResponse(pre.error, [
43
- pre.suggestion || "Use fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
43
+ pre.suggestion || "Use browser_fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
44
44
  ]);
45
45
  }
46
46
 
@@ -30,7 +30,7 @@ export async function deleteEmail({ page, params }) {
30
30
  const pre = await checkPrecondition(page, 'on_gmail');
31
31
  if (!pre.met) {
32
32
  return new ErrorResponse(pre.error, [
33
- pre.suggestion || "Use fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
33
+ pre.suggestion || "Use browser_fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
34
34
  ]);
35
35
  }
36
36
 
@@ -30,7 +30,7 @@ export async function forwardEmail({ page, params }) {
30
30
  const pre = await checkPrecondition(page, 'on_gmail');
31
31
  if (!pre.met) {
32
32
  return new ErrorResponse(pre.error, [
33
- pre.suggestion || "Use fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
33
+ pre.suggestion || "Use browser_fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
34
34
  ]);
35
35
  }
36
36
 
@@ -43,7 +43,7 @@ export async function labelEmail({ page, params }) {
43
43
  const pre = await checkPrecondition(page, 'on_gmail');
44
44
  if (!pre.met) {
45
45
  return new ErrorResponse(pre.error, [
46
- pre.suggestion || "Use fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
46
+ pre.suggestion || "Use browser_fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
47
47
  ]);
48
48
  }
49
49
 
@@ -31,7 +31,7 @@ export async function listEmails({ page, params }) {
31
31
  const pre = await checkPrecondition(page, 'on_gmail');
32
32
  if (!pre.met) {
33
33
  return new ErrorResponse(pre.error, [
34
- pre.suggestion || "Use fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
34
+ pre.suggestion || "Use browser_fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
35
35
  ]);
36
36
  }
37
37
 
@@ -29,7 +29,7 @@ export async function markRead({ page, params }) {
29
29
  const pre = await checkPrecondition(page, 'on_gmail');
30
30
  if (!pre.met) {
31
31
  return new ErrorResponse(pre.error, [
32
- pre.suggestion || "Use fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
32
+ pre.suggestion || "Use browser_fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
33
33
  ]);
34
34
  }
35
35
 
@@ -29,7 +29,7 @@ export async function markUnread({ page, params }) {
29
29
  const pre = await checkPrecondition(page, 'on_gmail');
30
30
  if (!pre.met) {
31
31
  return new ErrorResponse(pre.error, [
32
- pre.suggestion || "Use fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
32
+ pre.suggestion || "Use browser_fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
33
33
  ]);
34
34
  }
35
35
 
@@ -51,7 +51,7 @@ export async function readEmail({ page, params }) {
51
51
  const pre = await checkPrecondition(page, 'on_gmail');
52
52
  if (!pre.met) {
53
53
  return new ErrorResponse(pre.error, [
54
- pre.suggestion || "Use fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
54
+ pre.suggestion || "Use browser_fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
55
55
  ]);
56
56
  }
57
57
 
@@ -30,7 +30,7 @@ export async function replyEmail({ page, params }) {
30
30
  const pre = await checkPrecondition(page, 'on_gmail');
31
31
  if (!pre.met) {
32
32
  return new ErrorResponse(pre.error, [
33
- pre.suggestion || "Use fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
33
+ pre.suggestion || "Use browser_fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
34
34
  ]);
35
35
  }
36
36
 
@@ -41,7 +41,7 @@ export async function searchEmails({ page, params }) {
41
41
  const pre = await checkPrecondition(page, 'on_gmail');
42
42
  if (!pre.met) {
43
43
  return new ErrorResponse(pre.error, [
44
- pre.suggestion || "Use fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
44
+ pre.suggestion || "Use browser_fetch_webpage({ url: 'https://mail.google.com' }) to open Gmail first."
45
45
  ]);
46
46
  }
47
47
 
@@ -230,7 +230,7 @@ export async function checkPrecondition(page, requirement) {
230
230
  return {
231
231
  met: false,
232
232
  error: 'Gmail is not the active page.',
233
- suggestion: "Use fetch_webpage({ url: 'https://mail.google.com' }) to navigate to Gmail first."
233
+ suggestion: "Use browser_fetch_webpage({ url: 'https://mail.google.com' }) to navigate to Gmail first."
234
234
  };
235
235
  }
236
236
  return { met: true };
@@ -243,7 +243,7 @@ export async function checkPrecondition(page, requirement) {
243
243
  return {
244
244
  met: false,
245
245
  error: 'No email thread is currently open.',
246
- suggestion: "Use plugin_action({ plugin: 'gmail', action: 'read_email', params: { index: 0 } }) to open an email first."
246
+ suggestion: "Use browser_plugin_action({ plugin: 'gmail', action: 'read_email', params: { index: 0 } }) to open an email first."
247
247
  };
248
248
  }
249
249
  return { met: true };
@@ -255,7 +255,7 @@ export async function checkPrecondition(page, requirement) {
255
255
  return {
256
256
  met: false,
257
257
  error: 'Not in email list view.',
258
- suggestion: "Use plugin_action({ plugin: 'gmail', action: 'list_emails' }) to return to the email list."
258
+ suggestion: "Use browser_plugin_action({ plugin: 'gmail', action: 'list_emails' }) to return to the email list."
259
259
  };
260
260
  }
261
261
  return { met: true };