@bubblelab/bubble-core 0.1.142 → 0.1.143

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 (156) hide show
  1. package/dist/bubble-bundle.d.ts +174 -111
  2. package/dist/bubble-factory.d.ts.map +1 -1
  3. package/dist/bubble-factory.js +9 -1
  4. package/dist/bubble-factory.js.map +1 -1
  5. package/dist/bubbles/service-bubble/agi-inc.d.ts +120 -120
  6. package/dist/bubbles/service-bubble/ai-agent.d.ts +70 -70
  7. package/dist/bubbles/service-bubble/airtable.d.ts +170 -170
  8. package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts +2 -2
  9. package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts +8 -8
  10. package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.d.ts +2 -2
  11. package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts +22 -22
  12. package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-detail.d.ts +38 -38
  13. package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts +52 -52
  14. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts +6 -6
  15. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts +12 -12
  16. package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts +12 -12
  17. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts +126 -126
  18. package/dist/bubbles/service-bubble/apify/apify.d.ts +30 -30
  19. package/dist/bubbles/service-bubble/ashby/ashby.d.ts +62 -62
  20. package/dist/bubbles/service-bubble/ashby/ashby.schema.d.ts +2 -2
  21. package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +39 -32
  22. package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts.map +1 -1
  23. package/dist/bubbles/service-bubble/browserbase/browserbase.js +66 -3
  24. package/dist/bubbles/service-bubble/browserbase/browserbase.js.map +1 -1
  25. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +44 -1
  26. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts.map +1 -1
  27. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.js +19 -0
  28. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.js.map +1 -1
  29. package/dist/bubbles/service-bubble/confluence/confluence.d.ts +26 -26
  30. package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +90 -90
  31. package/dist/bubbles/service-bubble/eleven-labs.d.ts +24 -24
  32. package/dist/bubbles/service-bubble/firecrawl.d.ts +316 -316
  33. package/dist/bubbles/service-bubble/followupboss.d.ts +148 -148
  34. package/dist/bubbles/service-bubble/fullenrich/fullenrich.d.ts +16 -16
  35. package/dist/bubbles/service-bubble/github.d.ts +88 -88
  36. package/dist/bubbles/service-bubble/gmail.d.ts +587 -587
  37. package/dist/bubbles/service-bubble/google-calendar.d.ts +28 -28
  38. package/dist/bubbles/service-bubble/google-drive.d.ts +98 -98
  39. package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts +30 -30
  40. package/dist/bubbles/service-bubble/http.d.ts +22 -22
  41. package/dist/bubbles/service-bubble/insforge-db.d.ts +8 -8
  42. package/dist/bubbles/service-bubble/jira/jira.d.ts +68 -68
  43. package/dist/bubbles/service-bubble/jira/jira.schema.d.ts +36 -36
  44. package/dist/bubbles/service-bubble/notion/notion.d.ts +348 -348
  45. package/dist/bubbles/service-bubble/notion/property-schemas.d.ts +8 -8
  46. package/dist/bubbles/service-bubble/postgresql.d.ts +8 -8
  47. package/dist/bubbles/service-bubble/resend.d.ts +32 -32
  48. package/dist/bubbles/service-bubble/salesforce/index.d.ts +4 -0
  49. package/dist/bubbles/service-bubble/salesforce/index.d.ts.map +1 -0
  50. package/dist/bubbles/service-bubble/salesforce/index.js +4 -0
  51. package/dist/bubbles/service-bubble/salesforce/index.js.map +1 -0
  52. package/dist/bubbles/service-bubble/salesforce/salesforce.d.ts +1331 -0
  53. package/dist/bubbles/service-bubble/salesforce/salesforce.d.ts.map +1 -0
  54. package/dist/bubbles/service-bubble/salesforce/salesforce.js +618 -0
  55. package/dist/bubbles/service-bubble/salesforce/salesforce.js.map +1 -0
  56. package/dist/bubbles/service-bubble/salesforce/salesforce.schema.d.ts +1445 -0
  57. package/dist/bubbles/service-bubble/salesforce/salesforce.schema.d.ts.map +1 -0
  58. package/dist/bubbles/service-bubble/salesforce/salesforce.schema.js +609 -0
  59. package/dist/bubbles/service-bubble/salesforce/salesforce.schema.js.map +1 -0
  60. package/dist/bubbles/service-bubble/salesforce/salesforce.utils.d.ts +87 -0
  61. package/dist/bubbles/service-bubble/salesforce/salesforce.utils.d.ts.map +1 -0
  62. package/dist/bubbles/service-bubble/salesforce/salesforce.utils.js +181 -0
  63. package/dist/bubbles/service-bubble/salesforce/salesforce.utils.js.map +1 -0
  64. package/dist/bubbles/service-bubble/slack/slack.d.ts +684 -684
  65. package/dist/bubbles/service-bubble/storage.d.ts +20 -20
  66. package/dist/bubbles/service-bubble/stripe/stripe.d.ts +111 -111
  67. package/dist/bubbles/service-bubble/stripe/stripe.schema.d.ts +28 -28
  68. package/dist/bubbles/service-bubble/telegram.d.ts +108 -108
  69. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +16 -16
  70. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +8 -8
  71. package/dist/bubbles/tool-bubble/browser-tools/_shared/schema.d.ts +126 -0
  72. package/dist/bubbles/tool-bubble/browser-tools/_shared/schema.d.ts.map +1 -0
  73. package/dist/bubbles/tool-bubble/browser-tools/_shared/schema.js +34 -0
  74. package/dist/bubbles/tool-bubble/browser-tools/_shared/schema.js.map +1 -0
  75. package/dist/bubbles/tool-bubble/browser-tools/_shared/utils.d.ts +22 -0
  76. package/dist/bubbles/tool-bubble/browser-tools/_shared/utils.d.ts.map +1 -0
  77. package/dist/bubbles/tool-bubble/browser-tools/_shared/utils.js +57 -0
  78. package/dist/bubbles/tool-bubble/browser-tools/_shared/utils.js.map +1 -0
  79. package/dist/bubbles/tool-bubble/browser-tools/index.d.ts +5 -0
  80. package/dist/bubbles/tool-bubble/browser-tools/index.d.ts.map +1 -0
  81. package/dist/bubbles/tool-bubble/browser-tools/index.js +5 -0
  82. package/dist/bubbles/tool-bubble/browser-tools/index.js.map +1 -0
  83. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/index.d.ts +3 -0
  84. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/index.d.ts.map +1 -0
  85. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/index.js +3 -0
  86. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/index.js.map +1 -0
  87. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/schema.d.ts +158 -0
  88. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/schema.d.ts.map +1 -0
  89. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/schema.js +33 -0
  90. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/schema.js.map +1 -0
  91. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/tool.d.ts +161 -0
  92. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/tool.d.ts.map +1 -0
  93. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/tool.js +310 -0
  94. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/tool.js.map +1 -0
  95. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/index.d.ts +3 -0
  96. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/index.d.ts.map +1 -0
  97. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/index.js +3 -0
  98. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/index.js.map +1 -0
  99. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/schema.d.ts +165 -0
  100. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/schema.d.ts.map +1 -0
  101. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/schema.js +45 -0
  102. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/schema.js.map +1 -0
  103. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.d.ts +171 -0
  104. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.d.ts.map +1 -0
  105. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.js +364 -0
  106. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.js.map +1 -0
  107. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/index.d.ts +3 -0
  108. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/index.d.ts.map +1 -0
  109. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/index.js +3 -0
  110. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/index.js.map +1 -0
  111. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/schema.d.ts +160 -0
  112. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/schema.d.ts.map +1 -0
  113. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/schema.js +24 -0
  114. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/schema.js.map +1 -0
  115. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/tool.d.ts +160 -0
  116. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/tool.d.ts.map +1 -0
  117. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/tool.js +334 -0
  118. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/tool.js.map +1 -0
  119. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/index.d.ts +3 -0
  120. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/index.d.ts.map +1 -0
  121. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/index.js +3 -0
  122. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/index.js.map +1 -0
  123. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/schema.d.ts +152 -0
  124. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/schema.d.ts.map +1 -0
  125. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/schema.js +23 -0
  126. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/schema.js.map +1 -0
  127. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/tool.d.ts +155 -0
  128. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/tool.d.ts.map +1 -0
  129. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/tool.js +233 -0
  130. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/tool.js.map +1 -0
  131. package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +10 -10
  132. package/dist/bubbles/tool-bubble/google-maps-tool.d.ts +16 -16
  133. package/dist/bubbles/tool-bubble/instagram-tool.d.ts +4 -4
  134. package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.d.ts +2 -2
  135. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +416 -416
  136. package/dist/bubbles/tool-bubble/list-capabilities-tool.d.ts +8 -8
  137. package/dist/bubbles/tool-bubble/people-search-tool.d.ts +10 -10
  138. package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +8 -8
  139. package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +56 -56
  140. package/dist/bubbles/tool-bubble/twitter-tool.d.ts +128 -128
  141. package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +4 -4
  142. package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +4 -4
  143. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +8 -8
  144. package/dist/bubbles/tool-bubble/web-search-tool.d.ts +2 -2
  145. package/dist/bubbles/tool-bubble/yc-scraper-tool.d.ts +8 -8
  146. package/dist/bubbles/tool-bubble/youtube-tool.d.ts +34 -34
  147. package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +12 -12
  148. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +50 -50
  149. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +16 -16
  150. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +60 -60
  151. package/dist/bubbles.json +668 -70
  152. package/dist/index.d.ts +4 -1
  153. package/dist/index.d.ts.map +1 -1
  154. package/dist/index.js +4 -1
  155. package/dist/index.js.map +1 -1
  156. package/package.json +2 -2
@@ -0,0 +1,364 @@
1
+ import { ToolBubble } from '../../../../types/tool-bubble-class.js';
2
+ import { BrowserBaseBubble, } from '../../../service-bubble/browserbase/index.js';
3
+ import { CredentialType } from '@bubblelab/shared-schemas';
4
+ import { parseBrowserSessionData, buildProxyConfig } from '../_shared/utils.js';
5
+ import { LinkedInConnectionToolParamsSchema, LinkedInConnectionToolResultSchema, } from './schema.js';
6
+ /**
7
+ * Recordable LinkedIn Connection Tool
8
+ *
9
+ * A tool bubble for automating LinkedIn connection requests with step recording.
10
+ * Each major action is decorated with @RecordableStep to capture before/after
11
+ * screenshots, URLs, and timing information.
12
+ */
13
+ export class LinkedInConnectionTool extends ToolBubble {
14
+ static bubbleName = 'linkedin-connection-tool';
15
+ static schema = LinkedInConnectionToolParamsSchema;
16
+ static resultSchema = LinkedInConnectionToolResultSchema;
17
+ static shortDescription = 'LinkedIn connection automation with step recording';
18
+ static longDescription = `
19
+ Recordable LinkedIn Connection Tool for automating connection requests.
20
+ Records each step with screenshots and timing information for debugging.
21
+ `;
22
+ static alias = 'linkedin-recordable';
23
+ static type = 'tool';
24
+ sessionId = null;
25
+ contextId = null;
26
+ cookies = null;
27
+ constructor(params = { operation: 'send_connection', profile_url: '' }, context) {
28
+ super(params, context);
29
+ }
30
+ /** Required by RecordableToolBubble - returns the active browser session ID */
31
+ chooseCredential() {
32
+ const { credentials } = this.params;
33
+ if (!credentials || typeof credentials !== 'object') {
34
+ return undefined;
35
+ }
36
+ return credentials[CredentialType.LINKEDIN_CRED];
37
+ }
38
+ parseBrowserSessionData() {
39
+ return parseBrowserSessionData(this.chooseCredential());
40
+ }
41
+ // ==================== RECORDABLE STEPS ====================
42
+ async stepStartBrowserSession() {
43
+ if (this.sessionId)
44
+ return;
45
+ const sessionData = this.parseBrowserSessionData();
46
+ if (sessionData) {
47
+ this.contextId = sessionData.contextId;
48
+ this.cookies = sessionData.cookies;
49
+ }
50
+ const proxyConfig = buildProxyConfig(this.params.proxy);
51
+ const browserbase = new BrowserBaseBubble({
52
+ operation: 'start_session',
53
+ context_id: this.contextId || undefined,
54
+ cookies: this.cookies || undefined,
55
+ credentials: this.params.credentials,
56
+ stealth: { solveCaptchas: true },
57
+ ...proxyConfig,
58
+ }, this.context, 'startsession');
59
+ const result = await browserbase.action();
60
+ if (!result.data.success || !result.data.session_id) {
61
+ throw new Error(result.data.error || 'Failed to start browser session');
62
+ }
63
+ this.sessionId = result.data.session_id;
64
+ if (result.data.context_id) {
65
+ this.contextId = result.data.context_id;
66
+ }
67
+ console.log(`[RecordableLinkedIn] Session started: ${this.sessionId}`);
68
+ const ipAddress = await this.detectIPAddress();
69
+ if (ipAddress) {
70
+ console.log(`[RecordableLinkedIn] Browser IP: ${ipAddress}`);
71
+ }
72
+ }
73
+ async stepNavigateToProfile() {
74
+ if (!this.sessionId)
75
+ throw new Error('No active session');
76
+ const browserbase = new BrowserBaseBubble({
77
+ operation: 'navigate',
78
+ session_id: this.sessionId,
79
+ url: this.params.profile_url,
80
+ wait_until: 'domcontentloaded',
81
+ timeout: 30000,
82
+ }, this.context, 'navigate');
83
+ const result = await browserbase.action();
84
+ if (!result.data.success) {
85
+ throw new Error(result.data.error || 'Navigation failed');
86
+ }
87
+ }
88
+ async stepWaitForProfilePage() {
89
+ const checkScript = `
90
+ (() => {
91
+ const buttons = document.querySelectorAll('button');
92
+ for (const btn of buttons) {
93
+ const ariaLabel = (btn.getAttribute('aria-label') || '').toLowerCase();
94
+ const text = (btn.innerText || btn.textContent || '').trim().toLowerCase();
95
+ if (ariaLabel.includes('connect') || text === 'connect') return true;
96
+ if (ariaLabel === 'more actions') return true;
97
+ if (text === 'message' || ariaLabel.includes('message')) return true;
98
+ if (text === 'follow' || ariaLabel.includes('follow')) return true;
99
+ }
100
+ return false;
101
+ })()
102
+ `;
103
+ for (let attempt = 1; attempt <= 30; attempt++) {
104
+ const found = await this.evaluate(checkScript);
105
+ if (found)
106
+ return true;
107
+ await new Promise((r) => setTimeout(r, 1000));
108
+ }
109
+ return false;
110
+ }
111
+ async stepExtractProfileInfo() {
112
+ const info = (await this.evaluate(`
113
+ (() => {
114
+ let name = '';
115
+ const h1El = document.querySelector('h1');
116
+ if (h1El) name = h1El.textContent?.trim() || '';
117
+
118
+ let headline = '';
119
+ const headlineEl = document.querySelector('div.text-body-medium.break-words');
120
+ if (headlineEl) headline = headlineEl.textContent?.trim() || '';
121
+
122
+ let location = '';
123
+ const spans = document.querySelectorAll('span');
124
+ for (const span of spans) {
125
+ const text = span.textContent?.trim() || '';
126
+ if (text.includes(',') && text.length < 100 && text.length > 5) {
127
+ if (/(?:United|Kingdom|States|England|Germany|France|India|Canada|Australia)/i.test(text)) {
128
+ location = text;
129
+ break;
130
+ }
131
+ }
132
+ }
133
+
134
+ return { name, headline, location, profile_url: window.location.href };
135
+ })()
136
+ `));
137
+ return info.name ? info : null;
138
+ }
139
+ async stepClickConnect() {
140
+ const directResult = (await this.evaluate(`
141
+ (() => {
142
+ const buttons = document.querySelectorAll('button, [role="button"]');
143
+ for (const btn of buttons) {
144
+ const ariaLabel = btn.getAttribute('aria-label') || '';
145
+ const text = (btn.innerText || btn.textContent || '').trim().toLowerCase();
146
+ if (ariaLabel.toLowerCase().includes('connect') || text === 'connect') {
147
+ if (btn.classList.contains('artdeco-button--primary') ||
148
+ btn.closest('.pvs-profile-actions') ||
149
+ btn.closest('.pv-top-card-v2-ctas') ||
150
+ btn.closest('.artdeco-dropdown__content')) {
151
+ btn.click();
152
+ return { clicked: true, element: btn.tagName + ' - ' + (ariaLabel || text) };
153
+ }
154
+ }
155
+ }
156
+ return { clicked: false };
157
+ })()
158
+ `));
159
+ if (directResult.clicked)
160
+ return true;
161
+ const moreResult = (await this.evaluate(`
162
+ (() => {
163
+ const buttons = document.querySelectorAll('button');
164
+ for (const btn of buttons) {
165
+ const ariaLabel = (btn.getAttribute('aria-label') || '').toLowerCase();
166
+ const text = (btn.innerText || btn.textContent || '').trim().toLowerCase();
167
+ if ((ariaLabel === 'more actions' || ariaLabel === 'more' || text === 'more') &&
168
+ (btn.classList.contains('artdeco-dropdown__trigger') || btn.closest('.pv-top-card-v2-ctas'))) {
169
+ btn.click();
170
+ return { clicked: true, element: ariaLabel || text };
171
+ }
172
+ }
173
+ return { clicked: false };
174
+ })()
175
+ `));
176
+ if (moreResult.clicked) {
177
+ await new Promise((r) => setTimeout(r, 1000));
178
+ const dropdownResult = (await this.evaluate(`
179
+ (() => {
180
+ const items = document.querySelectorAll('.artdeco-dropdown__item[role="button"], .artdeco-dropdown__content [role="button"]');
181
+ for (const item of items) {
182
+ const ariaLabel = (item.getAttribute('aria-label') || '').toLowerCase();
183
+ const text = (item.innerText || item.textContent || '').trim().toLowerCase();
184
+ if (ariaLabel.includes('connect') || text === 'connect') {
185
+ item.click();
186
+ return { clicked: true, element: ariaLabel || text };
187
+ }
188
+ }
189
+ return { clicked: false, itemCount: items.length };
190
+ })()
191
+ `));
192
+ if (dropdownResult.clicked)
193
+ return true;
194
+ throw new Error(`Could not find Connect option in More dropdown (found ${dropdownResult.itemCount} items)`);
195
+ }
196
+ throw new Error('Could not find Connect button or More dropdown');
197
+ }
198
+ async stepWaitForModal() {
199
+ const checkScript = `
200
+ (() => {
201
+ const buttons = document.querySelectorAll('button');
202
+ for (const btn of buttons) {
203
+ const text = (btn.innerText || btn.textContent || '').trim().toLowerCase();
204
+ if (text.includes('add a note') || text.includes('send without')) return true;
205
+ }
206
+ return false;
207
+ })()
208
+ `;
209
+ for (let attempt = 1; attempt <= 8; attempt++) {
210
+ const found = await this.evaluate(checkScript);
211
+ if (found)
212
+ return true;
213
+ await new Promise((r) => setTimeout(r, 1000));
214
+ }
215
+ throw new Error('Connection modal did not appear within 8 seconds');
216
+ }
217
+ async stepAddNote(message) {
218
+ await this.evaluate(`
219
+ (() => {
220
+ const buttons = document.querySelectorAll('button');
221
+ for (const btn of buttons) {
222
+ const text = (btn.innerText || btn.textContent || '').trim().toLowerCase();
223
+ if (text.includes('add a note')) {
224
+ btn.click();
225
+ return true;
226
+ }
227
+ }
228
+ return false;
229
+ })()
230
+ `);
231
+ await new Promise((r) => setTimeout(r, 500));
232
+ await this.evaluate(`
233
+ (() => {
234
+ const textarea = document.querySelector('#custom-message');
235
+ if (textarea) {
236
+ textarea.value = ${JSON.stringify(message)};
237
+ textarea.dispatchEvent(new Event('input', { bubbles: true }));
238
+ return true;
239
+ }
240
+ return false;
241
+ })()
242
+ `);
243
+ }
244
+ async stepSendRequest(withNote) {
245
+ if (withNote) {
246
+ const result = (await this.evaluate(`
247
+ (() => {
248
+ const buttons = document.querySelectorAll('button');
249
+ for (const btn of buttons) {
250
+ const text = (btn.innerText || btn.textContent || '').trim().toLowerCase();
251
+ if (text === 'send' && btn.classList.contains('artdeco-button--primary')) {
252
+ btn.click();
253
+ return { clicked: true };
254
+ }
255
+ }
256
+ return { clicked: false };
257
+ })()
258
+ `));
259
+ if (!result.clicked)
260
+ throw new Error('Could not find Send button in modal');
261
+ return true;
262
+ }
263
+ else {
264
+ const result = (await this.evaluate(`
265
+ (() => {
266
+ const buttons = document.querySelectorAll('button');
267
+ for (const btn of buttons) {
268
+ const text = (btn.innerText || btn.textContent || '').trim().toLowerCase();
269
+ if (text.includes('send without')) {
270
+ btn.click();
271
+ return { clicked: true };
272
+ }
273
+ }
274
+ return { clicked: false };
275
+ })()
276
+ `));
277
+ if (!result.clicked)
278
+ throw new Error('Could not find "Send without a note" button in modal');
279
+ return true;
280
+ }
281
+ }
282
+ async stepEndBrowserSession() {
283
+ if (!this.sessionId)
284
+ return;
285
+ const browserbase = new BrowserBaseBubble({
286
+ operation: 'end_session',
287
+ session_id: this.sessionId,
288
+ }, this.context, 'endsession');
289
+ await browserbase.action();
290
+ console.log(`[RecordableLinkedIn] Session ended: ${this.sessionId}`);
291
+ this.sessionId = null;
292
+ }
293
+ async evaluate(script) {
294
+ if (!this.sessionId)
295
+ throw new Error('No active session');
296
+ const browserbase = new BrowserBaseBubble({
297
+ operation: 'evaluate',
298
+ session_id: this.sessionId,
299
+ script,
300
+ }, this.context, 'evaluate');
301
+ const result = await browserbase.action();
302
+ if (!result.data.success) {
303
+ throw new Error(result.data.error || 'Evaluation failed');
304
+ }
305
+ return result.data.result;
306
+ }
307
+ async detectIPAddress() {
308
+ if (!this.sessionId)
309
+ return null;
310
+ try {
311
+ const result = await this.evaluate(`
312
+ (async () => {
313
+ try {
314
+ const response = await fetch('https://api.ipify.org?format=json');
315
+ const data = await response.json();
316
+ return data.ip;
317
+ } catch (e) {
318
+ return null;
319
+ }
320
+ })()
321
+ `);
322
+ return result;
323
+ }
324
+ catch {
325
+ return null;
326
+ }
327
+ }
328
+ async performAction() {
329
+ try {
330
+ await this.stepStartBrowserSession();
331
+ await this.stepNavigateToProfile();
332
+ const pageReady = await this.stepWaitForProfilePage();
333
+ if (!pageReady) {
334
+ console.log('[RecordableLinkedIn] Profile page slow to load, continuing anyway');
335
+ }
336
+ const profileInfo = await this.stepExtractProfileInfo();
337
+ await this.stepClickConnect();
338
+ await this.stepWaitForModal();
339
+ const { message } = this.params;
340
+ if (message) {
341
+ await this.stepAddNote(message);
342
+ }
343
+ await this.stepSendRequest(!!message);
344
+ return {
345
+ operation: 'send_connection',
346
+ success: true,
347
+ message: `Connection request sent to ${profileInfo?.name || 'profile'}`,
348
+ profile: profileInfo || undefined,
349
+ error: '',
350
+ };
351
+ }
352
+ catch (error) {
353
+ return {
354
+ operation: 'send_connection',
355
+ success: false,
356
+ error: error instanceof Error ? error.message : 'Unknown error',
357
+ };
358
+ }
359
+ finally {
360
+ await this.stepEndBrowserSession();
361
+ }
362
+ }
363
+ }
364
+ //# sourceMappingURL=tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../../../src/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EACL,iBAAiB,GAElB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EACL,kCAAkC,EAClC,kCAAkC,GAInC,MAAM,aAAa,CAAC;AAErB;;;;;;GAMG;AACH,MAAM,OAAO,sBAGX,SAAQ,UAA2C;IACnD,MAAM,CAAU,UAAU,GAAG,0BAAmC,CAAC;IACjE,MAAM,CAAU,MAAM,GAAG,kCAAkC,CAAC;IAC5D,MAAM,CAAU,YAAY,GAAG,kCAAkC,CAAC;IAClE,MAAM,CAAU,gBAAgB,GAC9B,oDAAoD,CAAC;IACvD,MAAM,CAAU,eAAe,GAAG;;;GAGjC,CAAC;IACF,MAAM,CAAU,KAAK,GAAG,qBAAqB,CAAC;IAC9C,MAAM,CAAU,IAAI,GAAG,MAAM,CAAC;IAEtB,SAAS,GAAkB,IAAI,CAAC;IAChC,SAAS,GAAkB,IAAI,CAAC;IAChC,OAAO,GAAuB,IAAI,CAAC;IAE3C,YACE,SAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,EAAE,EAAO,EAClE,OAAuB;QAEvB,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzB,CA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gBACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;aAChE,CAAC;QACJ,CAAC;gBAAS,CAAC;YACT,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;QACrC,CAAC;IACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { LinkedInReceivedInvitationsTool } from './tool.js';
2
+ export { LinkedInReceivedInvitationsToolParamsSchema, LinkedInReceivedInvitationsToolResultSchema, ReceivedInvitationInfoSchema, type LinkedInReceivedInvitationsToolParamsInput, type LinkedInReceivedInvitationsToolResult, type ReceivedInvitationInfo, } from './schema.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EACL,2CAA2C,EAC3C,2CAA2C,EAC3C,4BAA4B,EAC5B,KAAK,0CAA0C,EAC/C,KAAK,qCAAqC,EAC1C,KAAK,sBAAsB,GAC5B,MAAM,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { LinkedInReceivedInvitationsTool } from './tool.js';
2
+ export { LinkedInReceivedInvitationsToolParamsSchema, LinkedInReceivedInvitationsToolResultSchema, ReceivedInvitationInfoSchema, } from './schema.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EACL,2CAA2C,EAC3C,2CAA2C,EAC3C,4BAA4B,GAI7B,MAAM,aAAa,CAAC"}
@@ -0,0 +1,160 @@
1
+ import { z } from 'zod';
2
+ import { CredentialType } from '@bubblelab/shared-schemas';
3
+ export declare const ReceivedInvitationInfoSchema: z.ZodObject<{
4
+ name: z.ZodString;
5
+ headline: z.ZodOptional<z.ZodString>;
6
+ mutual_connections: z.ZodOptional<z.ZodString>;
7
+ received_date: z.ZodString;
8
+ profile_url: z.ZodOptional<z.ZodString>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ name: string;
11
+ received_date: string;
12
+ headline?: string | undefined;
13
+ profile_url?: string | undefined;
14
+ mutual_connections?: string | undefined;
15
+ }, {
16
+ name: string;
17
+ received_date: string;
18
+ headline?: string | undefined;
19
+ profile_url?: string | undefined;
20
+ mutual_connections?: string | undefined;
21
+ }>;
22
+ export type ReceivedInvitationInfo = z.infer<typeof ReceivedInvitationInfoSchema>;
23
+ export declare const LinkedInReceivedInvitationsToolParamsSchema: z.ZodObject<{
24
+ operation: z.ZodLiteral<"get_received_invitations">;
25
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
26
+ proxy: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
27
+ type: z.ZodLiteral<"none">;
28
+ }, "strip", z.ZodTypeAny, {
29
+ type: "none";
30
+ }, {
31
+ type: "none";
32
+ }>, z.ZodObject<{
33
+ type: z.ZodLiteral<"browserbase">;
34
+ }, "strip", z.ZodTypeAny, {
35
+ type: "browserbase";
36
+ }, {
37
+ type: "browserbase";
38
+ }>, z.ZodObject<{
39
+ type: z.ZodLiteral<"custom">;
40
+ proxy: z.ZodObject<{
41
+ id: z.ZodString;
42
+ server: z.ZodString;
43
+ username: z.ZodOptional<z.ZodString>;
44
+ password: z.ZodOptional<z.ZodString>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ id: string;
47
+ server: string;
48
+ password?: string | undefined;
49
+ username?: string | undefined;
50
+ }, {
51
+ id: string;
52
+ server: string;
53
+ password?: string | undefined;
54
+ username?: string | undefined;
55
+ }>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ type: "custom";
58
+ proxy: {
59
+ id: string;
60
+ server: string;
61
+ password?: string | undefined;
62
+ username?: string | undefined;
63
+ };
64
+ }, {
65
+ type: "custom";
66
+ proxy: {
67
+ id: string;
68
+ server: string;
69
+ password?: string | undefined;
70
+ username?: string | undefined;
71
+ };
72
+ }>]>>;
73
+ }, "strip", z.ZodTypeAny, {
74
+ operation: "get_received_invitations";
75
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
76
+ proxy?: {
77
+ type: "none";
78
+ } | {
79
+ type: "browserbase";
80
+ } | {
81
+ type: "custom";
82
+ proxy: {
83
+ id: string;
84
+ server: string;
85
+ password?: string | undefined;
86
+ username?: string | undefined;
87
+ };
88
+ } | undefined;
89
+ }, {
90
+ operation: "get_received_invitations";
91
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
92
+ proxy?: {
93
+ type: "none";
94
+ } | {
95
+ type: "browserbase";
96
+ } | {
97
+ type: "custom";
98
+ proxy: {
99
+ id: string;
100
+ server: string;
101
+ password?: string | undefined;
102
+ username?: string | undefined;
103
+ };
104
+ } | undefined;
105
+ }>;
106
+ export declare const LinkedInReceivedInvitationsToolResultSchema: z.ZodObject<{
107
+ operation: z.ZodLiteral<"get_received_invitations">;
108
+ success: z.ZodBoolean;
109
+ invitations: z.ZodOptional<z.ZodArray<z.ZodObject<{
110
+ name: z.ZodString;
111
+ headline: z.ZodOptional<z.ZodString>;
112
+ mutual_connections: z.ZodOptional<z.ZodString>;
113
+ received_date: z.ZodString;
114
+ profile_url: z.ZodOptional<z.ZodString>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ name: string;
117
+ received_date: string;
118
+ headline?: string | undefined;
119
+ profile_url?: string | undefined;
120
+ mutual_connections?: string | undefined;
121
+ }, {
122
+ name: string;
123
+ received_date: string;
124
+ headline?: string | undefined;
125
+ profile_url?: string | undefined;
126
+ mutual_connections?: string | undefined;
127
+ }>, "many">>;
128
+ total_count: z.ZodOptional<z.ZodNumber>;
129
+ message: z.ZodOptional<z.ZodString>;
130
+ error: z.ZodString;
131
+ }, "strip", z.ZodTypeAny, {
132
+ error: string;
133
+ success: boolean;
134
+ operation: "get_received_invitations";
135
+ message?: string | undefined;
136
+ total_count?: number | undefined;
137
+ invitations?: {
138
+ name: string;
139
+ received_date: string;
140
+ headline?: string | undefined;
141
+ profile_url?: string | undefined;
142
+ mutual_connections?: string | undefined;
143
+ }[] | undefined;
144
+ }, {
145
+ error: string;
146
+ success: boolean;
147
+ operation: "get_received_invitations";
148
+ message?: string | undefined;
149
+ total_count?: number | undefined;
150
+ invitations?: {
151
+ name: string;
152
+ received_date: string;
153
+ headline?: string | undefined;
154
+ profile_url?: string | undefined;
155
+ mutual_connections?: string | undefined;
156
+ }[] | undefined;
157
+ }>;
158
+ export type LinkedInReceivedInvitationsToolParamsInput = z.input<typeof LinkedInReceivedInvitationsToolParamsSchema>;
159
+ export type LinkedInReceivedInvitationsToolResult = z.output<typeof LinkedInReceivedInvitationsToolResultSchema>;
160
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;EAMvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAItD,CAAC;AAEH,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOtD,CAAC;AAEH,MAAM,MAAM,0CAA0C,GAAG,CAAC,CAAC,KAAK,CAC9D,OAAO,2CAA2C,CACnD,CAAC;AACF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAC1D,OAAO,2CAA2C,CACnD,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ import { CredentialType } from '@bubblelab/shared-schemas';
3
+ import { ProxyChoiceSchema } from '../_shared/schema.js';
4
+ export const ReceivedInvitationInfoSchema = z.object({
5
+ name: z.string().describe('Full name of the person'),
6
+ headline: z.string().optional().describe('Professional headline/tagline'),
7
+ mutual_connections: z.string().optional().describe('Mutual connections info'),
8
+ received_date: z.string().describe('When the invitation was received'),
9
+ profile_url: z.string().optional().describe('LinkedIn profile URL'),
10
+ });
11
+ export const LinkedInReceivedInvitationsToolParamsSchema = z.object({
12
+ operation: z.literal('get_received_invitations'),
13
+ credentials: z.record(z.nativeEnum(CredentialType), z.string()).optional(),
14
+ proxy: ProxyChoiceSchema.optional(),
15
+ });
16
+ export const LinkedInReceivedInvitationsToolResultSchema = z.object({
17
+ operation: z.literal('get_received_invitations'),
18
+ success: z.boolean(),
19
+ invitations: z.array(ReceivedInvitationInfoSchema).optional(),
20
+ total_count: z.number().optional(),
21
+ message: z.string().optional(),
22
+ error: z.string(),
23
+ });
24
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../src/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,IAAI,EAAE,CAAC,CAAC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