agent-browser-priv 0.27.3-priv.3

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 (36) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +1564 -0
  3. package/bin/agent-browser.js +125 -0
  4. package/package.json +52 -0
  5. package/scripts/build-all-platforms.sh +76 -0
  6. package/scripts/check-version-sync.js +51 -0
  7. package/scripts/copy-native.js +36 -0
  8. package/scripts/postinstall.js +327 -0
  9. package/scripts/sync-version.js +81 -0
  10. package/scripts/windows-debug/provision.sh +220 -0
  11. package/scripts/windows-debug/run.sh +92 -0
  12. package/scripts/windows-debug/start.sh +43 -0
  13. package/scripts/windows-debug/stop.sh +28 -0
  14. package/scripts/windows-debug/sync.sh +27 -0
  15. package/skill-data/agentcore/SKILL.md +115 -0
  16. package/skill-data/core/SKILL.md +488 -0
  17. package/skill-data/core/references/authentication.md +303 -0
  18. package/skill-data/core/references/commands.md +403 -0
  19. package/skill-data/core/references/profiling.md +120 -0
  20. package/skill-data/core/references/proxy-support.md +194 -0
  21. package/skill-data/core/references/session-management.md +193 -0
  22. package/skill-data/core/references/snapshot-refs.md +219 -0
  23. package/skill-data/core/references/trust-boundaries.md +89 -0
  24. package/skill-data/core/references/video-recording.md +175 -0
  25. package/skill-data/core/templates/authenticated-session.sh +105 -0
  26. package/skill-data/core/templates/capture-workflow.sh +69 -0
  27. package/skill-data/core/templates/form-automation.sh +62 -0
  28. package/skill-data/dogfood/SKILL.md +220 -0
  29. package/skill-data/dogfood/references/issue-taxonomy.md +109 -0
  30. package/skill-data/dogfood/templates/dogfood-report-template.md +53 -0
  31. package/skill-data/electron/SKILL.md +236 -0
  32. package/skill-data/slack/SKILL.md +285 -0
  33. package/skill-data/slack/references/slack-tasks.md +348 -0
  34. package/skill-data/slack/templates/slack-report-template.md +163 -0
  35. package/skill-data/vercel-sandbox/SKILL.md +280 -0
  36. package/skills/agent-browser/SKILL.md +55 -0
@@ -0,0 +1,285 @@
1
+ ---
2
+ name: slack
3
+ description: Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include "check my Slack", "what channels have unreads", "send a message to", "search Slack for", "extract from Slack", "find who said", or any task requiring programmatic Slack interaction.
4
+ allowed-tools: Bash(agent-browser:*), Bash(npx agent-browser:*)
5
+ ---
6
+
7
+ # Slack Automation
8
+
9
+ Interact with Slack workspaces to check messages, extract data, and automate common tasks.
10
+
11
+ ## Quick Start
12
+
13
+ Connect to an existing Slack browser session or open Slack:
14
+
15
+ ```bash
16
+ # Connect to existing session on port 9222 (typical for already-open Slack)
17
+ agent-browser connect 9222
18
+
19
+ # Or open Slack if not already running
20
+ agent-browser open https://app.slack.com
21
+ ```
22
+
23
+ Then take a snapshot to see what's available:
24
+
25
+ ```bash
26
+ agent-browser snapshot -i
27
+ ```
28
+
29
+ ## Core Workflow
30
+
31
+ 1. **Connect/Navigate**: Open or connect to Slack
32
+ 2. **Snapshot**: Get interactive elements with refs (`@e1`, `@e2`, etc.)
33
+ 3. **Navigate**: Click tabs, expand sections, or navigate to specific channels
34
+ 4. **Extract/Interact**: Read data or perform actions
35
+ 5. **Screenshot**: Capture evidence of findings
36
+
37
+ ```bash
38
+ # Example: Check unread channels
39
+ agent-browser connect 9222
40
+ agent-browser snapshot -i
41
+ # Look for "More unreads" button
42
+ agent-browser click @e21 # Ref for "More unreads" button
43
+ agent-browser screenshot slack-unreads.png
44
+ ```
45
+
46
+ ## Common Tasks
47
+
48
+ ### Checking Unread Messages
49
+
50
+ ```bash
51
+ # Connect to Slack
52
+ agent-browser connect 9222
53
+
54
+ # Take snapshot to locate unreads button
55
+ agent-browser snapshot -i
56
+
57
+ # Look for:
58
+ # - "More unreads" button (usually near top of sidebar)
59
+ # - "Unreads" toggle in Activity tab (shows unread count)
60
+ # - Channel names with badges/bold text indicating unreads
61
+
62
+ # Navigate to Activity tab to see all unreads in one view
63
+ agent-browser click @e14 # Activity tab (ref may vary)
64
+ agent-browser wait 1000
65
+ agent-browser screenshot activity-unreads.png
66
+
67
+ # Or check DMs tab
68
+ agent-browser click @e13 # DMs tab
69
+ agent-browser screenshot dms.png
70
+
71
+ # Or expand "More unreads" in sidebar
72
+ agent-browser click @e21 # More unreads button
73
+ agent-browser wait 500
74
+ agent-browser screenshot expanded-unreads.png
75
+ ```
76
+
77
+ ### Navigating to a Channel
78
+
79
+ ```bash
80
+ # Search for channel in sidebar or by name
81
+ agent-browser snapshot -i
82
+
83
+ # Look for channel name in the list (e.g., "engineering", "product-design")
84
+ # Click on the channel treeitem ref
85
+ agent-browser click @e94 # Example: engineering channel ref
86
+ agent-browser wait --load networkidle
87
+ agent-browser screenshot channel.png
88
+ ```
89
+
90
+ ### Finding Messages/Threads
91
+
92
+ ```bash
93
+ # Use Slack search
94
+ agent-browser snapshot -i
95
+ agent-browser click @e5 # Search button (typical ref)
96
+ agent-browser fill @e_search "keyword"
97
+ agent-browser press Enter
98
+ agent-browser wait --load networkidle
99
+ agent-browser screenshot search-results.png
100
+ ```
101
+
102
+ ### Extracting Channel Information
103
+
104
+ ```bash
105
+ # Get list of all visible channels
106
+ agent-browser snapshot --json > slack-snapshot.json
107
+
108
+ # Parse for channel names and metadata
109
+ # Look for treeitem elements with level=2 (sub-channels under sections)
110
+ ```
111
+
112
+ ### Checking Channel Details
113
+
114
+ ```bash
115
+ # Open a channel
116
+ agent-browser click @e_channel_ref
117
+ agent-browser wait 1000
118
+
119
+ # Get channel info (members, description, etc.)
120
+ agent-browser snapshot -i
121
+ agent-browser screenshot channel-details.png
122
+
123
+ # Scroll through messages
124
+ agent-browser scroll down 500
125
+ agent-browser screenshot channel-messages.png
126
+ ```
127
+
128
+ ### Taking Notes/Capturing State
129
+
130
+ When you need to document findings from Slack:
131
+
132
+ ```bash
133
+ # Take annotated screenshot (shows element numbers)
134
+ agent-browser screenshot --annotate slack-state.png
135
+
136
+ # Take full-page screenshot
137
+ agent-browser screenshot --full slack-full.png
138
+
139
+ # Get current URL for reference
140
+ agent-browser get url
141
+
142
+ # Get page title
143
+ agent-browser get title
144
+ ```
145
+
146
+ ## Sidebar Structure
147
+
148
+ Understanding Slack's sidebar helps you navigate efficiently:
149
+
150
+ ```
151
+ - Threads
152
+ - Huddles
153
+ - Drafts & sent
154
+ - Directories
155
+ - [Section Headers - External connections, Starred, Channels, etc.]
156
+ - [Channels listed as treeitems]
157
+ - Direct Messages
158
+ - [DMs listed]
159
+ - Apps
160
+ - [App shortcuts]
161
+ - [More unreads] button (toggles unread channels list)
162
+ ```
163
+
164
+ Key refs to look for:
165
+ - `@e12` - Home tab (usually)
166
+ - `@e13` - DMs tab
167
+ - `@e14` - Activity tab
168
+ - `@e5` - Search button
169
+ - `@e21` - More unreads button (varies by session)
170
+
171
+ ## Tabs in Slack
172
+
173
+ After clicking on a channel, you'll see tabs:
174
+ - **Messages** - Channel conversation
175
+ - **Files** - Shared files
176
+ - **Pins** - Pinned messages
177
+ - **Add canvas** - Collaborative canvas
178
+ - Other tabs depending on workspace setup
179
+
180
+ Click tab refs to switch views and get different information.
181
+
182
+ ## Extracting Data from Slack
183
+
184
+ ### Get Text Content
185
+
186
+ ```bash
187
+ # Get a message or element's text
188
+ agent-browser get text @e_message_ref
189
+ ```
190
+
191
+ ### Parse Accessibility Tree
192
+
193
+ ```bash
194
+ # Full snapshot as JSON for programmatic parsing
195
+ agent-browser snapshot --json > output.json
196
+
197
+ # Look for:
198
+ # - Channel names (name field in treeitem)
199
+ # - Message content (in listitem/document elements)
200
+ # - User names (button elements with user info)
201
+ # - Timestamps (link elements with time info)
202
+ ```
203
+
204
+ ### Count Unreads
205
+
206
+ ```bash
207
+ # After expanding unreads section:
208
+ agent-browser snapshot -i | grep -c "treeitem"
209
+ # Each treeitem with a channel name in the unreads section is one unread
210
+ ```
211
+
212
+ ## Best Practices
213
+
214
+ - **Connect to existing sessions**: Use `agent-browser connect 9222` if Slack is already open. This is faster than opening a new browser.
215
+ - **Take snapshots before clicking**: Always `snapshot -i` to identify refs before clicking buttons.
216
+ - **Re-snapshot after navigation**: After navigating to a new channel or section, take a fresh snapshot to find new refs.
217
+ - **Use JSON snapshots for parsing**: When you need to extract structured data, use `snapshot --json` for machine-readable output.
218
+ - **Pace interactions**: Add `sleep 1` between rapid interactions to let the UI update.
219
+ - **Check accessibility tree**: The accessibility tree shows what screen readers (and your automation) can see. If an element isn't in the snapshot, it may be hidden or require scrolling.
220
+ - **Scroll in sidebar**: Use `agent-browser scroll down 300 --selector ".p-sidebar"` to scroll within the Slack sidebar if channel list is long.
221
+
222
+ ## Limitations
223
+
224
+ - **Cannot access Slack API**: This uses browser automation, not the Slack API. No OAuth, webhooks, or bot tokens needed.
225
+ - **Session-specific**: Screenshots and snapshots are tied to the current browser session.
226
+ - **Rate limiting**: Slack may rate-limit rapid interactions. Add delays between commands if needed.
227
+ - **Workspace-specific**: You interact with your own workspace -- no cross-workspace automation.
228
+
229
+ ## Debugging
230
+
231
+ ### Check console for errors
232
+
233
+ ```bash
234
+ agent-browser console
235
+ agent-browser errors
236
+ ```
237
+
238
+ ### Get current page state
239
+
240
+ ```bash
241
+ agent-browser get url
242
+ agent-browser get title
243
+ agent-browser screenshot page-state.png
244
+ ```
245
+
246
+ ## Example: Full Unread Check
247
+
248
+ ```bash
249
+ #!/bin/bash
250
+
251
+ # Connect to Slack
252
+ agent-browser connect 9222
253
+
254
+ # Take initial snapshot
255
+ echo "=== Checking Slack unreads ==="
256
+ agent-browser snapshot -i > snapshot.txt
257
+
258
+ # Check Activity tab for unreads
259
+ agent-browser click @e14 # Activity tab
260
+ agent-browser wait 1000
261
+ agent-browser screenshot activity.png
262
+ ACTIVITY_RESULT=$(agent-browser get text @e_main_area)
263
+ echo "Activity: $ACTIVITY_RESULT"
264
+
265
+ # Check DMs
266
+ agent-browser click @e13 # DMs tab
267
+ agent-browser wait 1000
268
+ agent-browser screenshot dms.png
269
+
270
+ # Check unread channels in sidebar
271
+ agent-browser click @e21 # More unreads button
272
+ agent-browser wait 500
273
+ agent-browser snapshot -i > unreads-expanded.txt
274
+ agent-browser screenshot unreads.png
275
+
276
+ # Summary
277
+ echo "=== Summary ==="
278
+ echo "See activity.png, dms.png, and unreads.png for full details"
279
+ ```
280
+
281
+ ## References
282
+
283
+ - **Slack docs**: https://slack.com/help
284
+ - **Web experience**: https://app.slack.com
285
+ - **Keyboard shortcuts**: Type `?` in Slack for shortcut list
@@ -0,0 +1,348 @@
1
+ # Common Slack Tasks & Patterns
2
+
3
+ Reference guide for common automations and data extraction patterns when interacting with Slack.
4
+
5
+ ## Task: Check All Unread Messages
6
+
7
+ ### Goal
8
+ Determine which channels and DMs have unread messages.
9
+
10
+ ### Steps
11
+
12
+ 1. **Connect to Slack**
13
+ ```bash
14
+ agent-browser connect 9222
15
+ ```
16
+
17
+ 2. **Check Activity Tab**
18
+ - Take snapshot: `agent-browser snapshot -i`
19
+ - Look for Activity tab ref (usually `@e14`)
20
+ - Click: `agent-browser click @e14`
21
+ - Wait: `agent-browser wait 1000`
22
+ - If you see "You've read all the unreads", you have no unread messages
23
+ - Screenshot: `agent-browser screenshot activity.png`
24
+
25
+ 3. **Check DMs**
26
+ - Click DMs tab ref (usually `@e13`)
27
+ - Look for "Unreads" toggle/badge
28
+ - Count visible conversations with indicators
29
+
30
+ 4. **Check Channels**
31
+ - Look for "More unreads" button (usually in sidebar)
32
+ - Click it to expand list of channels with unreads
33
+ - Screenshot the expanded view
34
+ - Parse channel names from snapshot
35
+
36
+ 5. **Summary**
37
+ - Activity + DMs + Channels = complete unread picture
38
+
39
+ ### Evidence Capture
40
+ - Screenshot of Activity tab
41
+ - Screenshot of DMs
42
+ - Screenshot of expanded unreads sidebar
43
+
44
+ ---
45
+
46
+ ## Task: Find All Channels in Workspace
47
+
48
+ ### Goal
49
+ Get a complete list of all channels you have access to.
50
+
51
+ ### Steps
52
+
53
+ 1. **Navigate to Channels section**
54
+ ```bash
55
+ agent-browser connect 9222
56
+ agent-browser snapshot -i
57
+ ```
58
+
59
+ 2. **Look for "Channels" treeitem**
60
+ - This is usually a collapsed section header
61
+ - Click to expand if collapsed
62
+ - Screenshot: `agent-browser screenshot all-channels.png`
63
+
64
+ 3. **Scroll through sidebar**
65
+ ```bash
66
+ # If the list is long, scroll within the sidebar
67
+ agent-browser scroll down 500 --selector ".p-sidebar"
68
+ agent-browser screenshot channels-page-2.png
69
+ ```
70
+
71
+ 4. **Parse snapshot for channel list**
72
+ ```bash
73
+ agent-browser snapshot --json > channels.json
74
+ # Search JSON for treeitem elements with level=2 under "Channels" section
75
+ ```
76
+
77
+ ### Evidence
78
+ - JSON snapshot with all channel refs
79
+ - Screenshots of channel list
80
+ - Count of total channels
81
+
82
+ ---
83
+
84
+ ## Task: Search for Messages Containing Keywords
85
+
86
+ ### Goal
87
+ Find all messages/threads mentioning specific terms.
88
+
89
+ ### Steps
90
+
91
+ 1. **Open search**
92
+ ```bash
93
+ agent-browser snapshot -i
94
+ # Find Search button ref (usually @e5)
95
+ agent-browser click @e5
96
+ agent-browser wait 500
97
+ ```
98
+
99
+ 2. **Enter search term**
100
+ ```bash
101
+ # Identify search input ref from snapshot
102
+ agent-browser fill @e_search_input "your keyword"
103
+ agent-browser press Enter
104
+ agent-browser wait --load networkidle
105
+ ```
106
+
107
+ 3. **Capture results**
108
+ ```bash
109
+ agent-browser screenshot search-results.png
110
+ agent-browser snapshot -i > search-snapshot.txt
111
+ ```
112
+
113
+ 4. **Parse results**
114
+ - Look for result items in snapshot
115
+ - Extract message content, sender, channel, timestamp
116
+ - Follow links to view full context
117
+
118
+ ### Filters
119
+ Slack search supports filters:
120
+ - `in:channel-name` - Search in specific channel
121
+ - `from:@user` - Messages from specific user
122
+ - `before:2026-02-25` - Messages before date
123
+ - `after:2026-02-20` - Messages after date
124
+ - `has:file` - Messages with files
125
+ - `has:emoji` - Messages with reactions
126
+
127
+ Example search: `"bug report" in:engineering from:@alice after:2026-02-20`
128
+
129
+ ---
130
+
131
+ ## Task: Monitor a Specific Channel for Activity
132
+
133
+ ### Goal
134
+ Watch a channel and capture new messages/engagement.
135
+
136
+ ### Steps
137
+
138
+ 1. **Navigate to channel**
139
+ ```bash
140
+ agent-browser connect 9222
141
+ agent-browser snapshot -i
142
+ # Find channel ref from sidebar
143
+ agent-browser click @e_channel_ref
144
+ agent-browser wait --load networkidle
145
+ ```
146
+
147
+ 2. **Check channel info**
148
+ - Screenshot channel details: `agent-browser screenshot channel-header.png`
149
+ - Look for member count, description, topic
150
+
151
+ 3. **View messages**
152
+ ```bash
153
+ # Jump to recent/unread
154
+ agent-browser press j # Jump to unread in Slack
155
+ agent-browser wait 500
156
+ agent-browser screenshot recent-messages.png
157
+ ```
158
+
159
+ 4. **Scroll to see more**
160
+ ```bash
161
+ agent-browser scroll down 500
162
+ agent-browser screenshot more-messages.png
163
+ ```
164
+
165
+ 5. **Check threads**
166
+ - Click on messages with thread indicators
167
+ - View replies in thread view
168
+ - Screenshot: `agent-browser screenshot thread.png`
169
+
170
+ ### Evidence
171
+ - Channel info screenshot
172
+ - Message history screenshots
173
+ - Thread examples
174
+
175
+ ---
176
+
177
+ ## Task: Extract User Information from a Conversation
178
+
179
+ ### Goal
180
+ Find who said what, when, and in what context.
181
+
182
+ ### Steps
183
+
184
+ 1. **Navigate to relevant channel or DM**
185
+ ```bash
186
+ agent-browser click @e_conversation_ref
187
+ agent-browser wait 1000
188
+ ```
189
+
190
+ 2. **Take snapshot with context**
191
+ ```bash
192
+ agent-browser snapshot --json > conversation.json
193
+ ```
194
+
195
+ 3. **Find message blocks**
196
+ - In JSON, look for document/listitem elements
197
+ - These contain: user name (button), timestamp (link), message text, reactions
198
+
199
+ 4. **Extract structured data**
200
+ - User: Found in button element with username
201
+ - Time: Found in link with timestamp
202
+ - Content: Text content of message
203
+ - Reactions: Buttons showing emoji counts
204
+
205
+ 5. **Screenshot key messages**
206
+ ```bash
207
+ agent-browser screenshot important-message.png
208
+ agent-browser screenshot --annotate annotated-message.png
209
+ ```
210
+
211
+ ---
212
+
213
+ ## Task: Track Reactions to a Message
214
+
215
+ ### Goal
216
+ See who reacted to a message and with what emoji.
217
+
218
+ ### Steps
219
+
220
+ 1. **Find message with reactions**
221
+ ```bash
222
+ agent-browser snapshot -i
223
+ # Look for "N reaction(s)" buttons in messages
224
+ ```
225
+
226
+ 2. **Click reaction button to expand**
227
+ ```bash
228
+ agent-browser click @e_reaction_button
229
+ agent-browser wait 500
230
+ ```
231
+
232
+ 3. **Capture reaction details**
233
+ ```bash
234
+ agent-browser screenshot reactions.png
235
+ # You'll see emoji, count, and list of users who reacted
236
+ ```
237
+
238
+ 4. **Extract data**
239
+ - Emoji used
240
+ - Number of people who reacted
241
+ - User names (if visible in popup)
242
+
243
+ ---
244
+
245
+ ## Task: Find and Review Pinned Messages
246
+
247
+ ### Goal
248
+ See messages that have been pinned in a channel.
249
+
250
+ ### Steps
251
+
252
+ 1. **Open a channel**
253
+ ```bash
254
+ agent-browser click @e_channel_ref
255
+ agent-browser wait 1000
256
+ agent-browser snapshot -i
257
+ ```
258
+
259
+ 2. **Click Pins tab**
260
+ - In channel view, look for "Pins" tab ref (usually near Messages, Files tabs)
261
+ - Click it: `agent-browser click @e_pins_tab`
262
+ - Wait: `agent-browser wait 500`
263
+
264
+ 3. **View pinned messages**
265
+ ```bash
266
+ agent-browser screenshot pins.png
267
+ agent-browser snapshot -i > pins-snapshot.txt
268
+ ```
269
+
270
+ 4. **Review each pin**
271
+ - Click pin to see context
272
+ - Note who pinned it, when, and why
273
+ - Screenshot: `agent-browser screenshot pin-detail.png`
274
+
275
+ ---
276
+
277
+ ## Pattern: Extract Timestamp from Link
278
+
279
+ In Slack snapshot, message timestamps appear as links. Example:
280
+ ```
281
+ - link "Feb 25th at 10:26:22 AM" [ref=e151]
282
+ - /url: https://vercel.slack.com/archives/C0A5RTN0856/p1772036782543189
283
+ ```
284
+
285
+ The URL contains the timestamp in the fragment (`p1772036782543189`). This is a Slack message ID that uniquely identifies the message.
286
+
287
+ ---
288
+
289
+ ## Pattern: Understanding Channel/Thread Structure
290
+
291
+ ```
292
+ - treeitem "channel-name" [ref=e94] [level=2]
293
+ - group: (contains channel metadata or sub-items)
294
+ ```
295
+
296
+ - **level=1**: Section headers (External connections, Starred, Channels, etc.)
297
+ - **level=2**: Individual channels/items within sections
298
+ - **level=3+**: Nested sub-items (rare in sidebar)
299
+
300
+ ---
301
+
302
+ ## Common Ref Patterns (Session-Dependent)
303
+
304
+ These refs vary per session, but follow patterns:
305
+
306
+ | Element | Typical Ref Range | How to Find |
307
+ |---------|------------------|------------|
308
+ | Home tab | e10-e20 | `snapshot -i \| grep "Home"` |
309
+ | DMs tab | e10-e20 | `snapshot -i \| grep "DMs"` |
310
+ | Activity tab | e10-e20 | `snapshot -i \| grep "Activity"` |
311
+ | Search | e5-e10 | `snapshot -i \| grep "Search"` |
312
+ | More unreads | e20-e30 | `snapshot -i \| grep "More unreads"` |
313
+ | Channel refs | e30+ | `snapshot -i \| grep "treeitem"` |
314
+
315
+ **Always take a fresh snapshot** to find current refs for the current session.
316
+
317
+ ---
318
+
319
+ ## Debugging: Element Not Found
320
+
321
+ If you can't find an element:
322
+
323
+ 1. **Check it's visible**
324
+ ```bash
325
+ # Is the element on screen or off-screen?
326
+ agent-browser screenshot current-state.png
327
+ # Compare screenshot to what you expected
328
+ ```
329
+
330
+ 2. **Try expanding/scrolling**
331
+ ```bash
332
+ # Sidebar might need scrolling
333
+ agent-browser scroll down 300 --selector ".p-sidebar"
334
+ agent-browser snapshot -i
335
+ ```
336
+
337
+ 3. **Check current URL**
338
+ ```bash
339
+ agent-browser get url
340
+ # Verify you're in the right section
341
+ ```
342
+
343
+ 4. **Wait for page to load**
344
+ ```bash
345
+ agent-browser wait --load networkidle
346
+ agent-browser wait 1000
347
+ agent-browser snapshot -i
348
+ ```