mcpbrowser 0.3.34 → 0.3.36
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/package.json +1 -1
- package/src/actions/click-element.js +8 -3
- package/src/actions/execute-javascript.js +8 -3
- package/src/actions/fetch-page.js +9 -3
- package/src/actions/get-current-html.js +9 -3
- package/src/actions/plugin-action.js +180 -0
- package/src/actions/plugin-info.js +170 -0
- package/src/core/logger.js +3 -7
- package/src/core/plugin-loader.js +344 -0
- package/src/mcp-browser.js +34 -2
- package/src/plugins/_example/index.js +140 -0
- package/src/plugins/gcal/actions/check-availability.js +185 -0
- package/src/plugins/gcal/actions/create-event.js +238 -0
- package/src/plugins/gcal/actions/delete-event.js +138 -0
- package/src/plugins/gcal/actions/edit-event.js +244 -0
- package/src/plugins/gcal/actions/list-events.js +96 -0
- package/src/plugins/gcal/actions/read-event.js +174 -0
- package/src/plugins/gcal/actions/rsvp-event.js +149 -0
- package/src/plugins/gcal/actions/search-events.js +121 -0
- package/src/plugins/gcal/helpers.js +415 -0
- package/src/plugins/gcal/index.js +148 -0
- package/src/plugins/gcal/selectors.js +54 -0
- package/src/plugins/gmail/actions/archive-email.js +65 -0
- package/src/plugins/gmail/actions/compose-email.js +116 -0
- package/src/plugins/gmail/actions/delete-email.js +65 -0
- package/src/plugins/gmail/actions/forward-email.js +95 -0
- package/src/plugins/gmail/actions/label-email.js +107 -0
- package/src/plugins/gmail/actions/list-emails.js +61 -0
- package/src/plugins/gmail/actions/mark-read.js +71 -0
- package/src/plugins/gmail/actions/mark-unread.js +71 -0
- package/src/plugins/gmail/actions/read-email.js +149 -0
- package/src/plugins/gmail/actions/reply-email.js +87 -0
- package/src/plugins/gmail/actions/search-emails.js +95 -0
- package/src/plugins/gmail/helpers.js +419 -0
- package/src/plugins/gmail/index.js +195 -0
- package/src/plugins/gmail/selectors.js +82 -0
- package/src/plugins.json +4 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* selectors.js — Tier 4 CSS class selectors for the Gmail plugin.
|
|
3
|
+
*
|
|
4
|
+
* TIER 4 ONLY — These are Closure Compiler-generated class names that may
|
|
5
|
+
* change when Google deploys Gmail updates. All other interaction tiers
|
|
6
|
+
* (T1: URL hash, T2: keyboard shortcuts, T3: ARIA / data attributes / name attrs)
|
|
7
|
+
* are defined inline in helpers.js since they use stable identifiers.
|
|
8
|
+
*
|
|
9
|
+
* Per FR-023: All CSS class selectors are centralized here so a Gmail UI
|
|
10
|
+
* update can be resolved by updating values in ONE place.
|
|
11
|
+
*
|
|
12
|
+
* Per SC-008: No action file should import CSS class names directly.
|
|
13
|
+
* All CSS access goes through this module.
|
|
14
|
+
*
|
|
15
|
+
* Tier coverage (SC-007): ~73% of interactions use T1/T2 (URL + keyboard).
|
|
16
|
+
* These T4 selectors cover only data extraction from email row internals
|
|
17
|
+
* and thread message internals.
|
|
18
|
+
*
|
|
19
|
+
* @version 2026-04-03 — Verified against Gmail web UI
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
// ============================================================================
|
|
23
|
+
// EMAIL LIST VIEW — Row internals (used by extractEmailRows)
|
|
24
|
+
// ============================================================================
|
|
25
|
+
|
|
26
|
+
/** Email row in list — no ARIA role="row" on Gmail's custom table rows */
|
|
27
|
+
export const EMAIL_ROW = 'tr.zA';
|
|
28
|
+
|
|
29
|
+
/** Unread email indicator — additional class on row, no aria-label */
|
|
30
|
+
export const EMAIL_ROW_UNREAD = 'zE';
|
|
31
|
+
|
|
32
|
+
/** Subject text within a row — no distinguishing data attribute */
|
|
33
|
+
export const SUBJECT_SPAN = 'span.bog';
|
|
34
|
+
|
|
35
|
+
/** Snippet/preview text within a row — no distinguishing data attribute */
|
|
36
|
+
export const SNIPPET_SPAN = 'span.y2';
|
|
37
|
+
|
|
38
|
+
/** Date cell within a row — no name or aria-label on date elements */
|
|
39
|
+
export const DATE_CELL = 'td.xW span';
|
|
40
|
+
|
|
41
|
+
// ============================================================================
|
|
42
|
+
// THREAD / MESSAGE VIEW — Message internals (used by read_email)
|
|
43
|
+
// ============================================================================
|
|
44
|
+
|
|
45
|
+
/** Individual message container within a thread — lacks ARIA roles */
|
|
46
|
+
export const MESSAGE_CONTAINER = 'div.adn';
|
|
47
|
+
|
|
48
|
+
/** Message body content div — the actual HTML body */
|
|
49
|
+
export const MSG_BODY = 'div.a3s.aiL';
|
|
50
|
+
|
|
51
|
+
/** Date span in message header — title attribute has full timestamp */
|
|
52
|
+
export const MSG_DATE = 'span.g3';
|
|
53
|
+
|
|
54
|
+
/** Thread subject heading — h2 can be T3 but .hP adds specificity */
|
|
55
|
+
export const THREAD_SUBJECT = 'h2.hP';
|
|
56
|
+
|
|
57
|
+
// ============================================================================
|
|
58
|
+
// ATTACHMENTS — Within message containers
|
|
59
|
+
// ============================================================================
|
|
60
|
+
|
|
61
|
+
/** Attachment area within a message */
|
|
62
|
+
export const ATTACHMENT_AREA = 'div.aQH';
|
|
63
|
+
|
|
64
|
+
/** Attachment filename */
|
|
65
|
+
export const ATTACHMENT_NAME = 'span.aV3';
|
|
66
|
+
|
|
67
|
+
/** Attachment file size */
|
|
68
|
+
export const ATTACHMENT_SIZE = 'span.SaH2Ve';
|
|
69
|
+
|
|
70
|
+
// ============================================================================
|
|
71
|
+
// LABEL PICKER — Dropdown items (used by label_email)
|
|
72
|
+
// ============================================================================
|
|
73
|
+
|
|
74
|
+
/** Individual label items in the label picker dropdown */
|
|
75
|
+
export const LABEL_ITEM = 'div.J-N-Jz';
|
|
76
|
+
|
|
77
|
+
// ============================================================================
|
|
78
|
+
// NO-RESULTS INDICATOR — Search empty state
|
|
79
|
+
// ============================================================================
|
|
80
|
+
|
|
81
|
+
/** No-results indicator in search/list view */
|
|
82
|
+
export const NO_RESULTS = 'td.TC';
|
package/src/plugins.json
ADDED