@bubblelab/bubble-core 0.1.150 → 0.1.151
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/dist/bubble-bundle.d.ts +76 -76
- package/dist/bubbles/service-bubble/agi-inc.d.ts +20 -20
- package/dist/bubbles/service-bubble/ai-agent.d.ts +74 -74
- package/dist/bubbles/service-bubble/airtable.d.ts +76 -76
- package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts +2 -2
- package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts +8 -8
- package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.d.ts +2 -2
- package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts +22 -22
- package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-detail.d.ts +38 -38
- package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts +52 -52
- package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts +6 -6
- package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts +12 -12
- package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts +12 -12
- package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts +126 -126
- package/dist/bubbles/service-bubble/apify/apify.d.ts +18 -18
- package/dist/bubbles/service-bubble/ashby/ashby.d.ts +2 -2
- package/dist/bubbles/service-bubble/ashby/ashby.schema.d.ts +2 -2
- package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +38 -1
- package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/browserbase/browserbase.js +80 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.js.map +1 -1
- package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +34 -1
- package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/browserbase/browserbase.schema.js +30 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.schema.js.map +1 -1
- package/dist/bubbles/service-bubble/firecrawl.d.ts +334 -334
- package/dist/bubbles/service-bubble/followupboss.d.ts +4 -4
- package/dist/bubbles/service-bubble/github.d.ts +60 -60
- package/dist/bubbles/service-bubble/gmail.d.ts +164 -164
- package/dist/bubbles/service-bubble/google-calendar.d.ts +6 -6
- package/dist/bubbles/service-bubble/google-drive.d.ts +9 -9
- package/dist/bubbles/service-bubble/google-drive.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/google-drive.js +37 -1
- package/dist/bubbles/service-bubble/google-drive.js.map +1 -1
- package/dist/bubbles/service-bubble/http.d.ts +2 -2
- package/dist/bubbles/service-bubble/insforge-db.d.ts +8 -8
- package/dist/bubbles/service-bubble/jira/jira.d.ts +30 -30
- package/dist/bubbles/service-bubble/jira/jira.schema.d.ts +36 -36
- package/dist/bubbles/service-bubble/notion/notion.d.ts +164 -164
- package/dist/bubbles/service-bubble/notion/property-schemas.d.ts +8 -8
- package/dist/bubbles/service-bubble/postgresql.d.ts +8 -8
- package/dist/bubbles/service-bubble/resend.d.ts +4 -4
- package/dist/bubbles/service-bubble/salesforce/index.d.ts +4 -0
- package/dist/bubbles/service-bubble/salesforce/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/index.js +4 -0
- package/dist/bubbles/service-bubble/salesforce/index.js.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.d.ts +1331 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.js +618 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.js.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.schema.d.ts +1445 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.schema.js +609 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.utils.d.ts +87 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.utils.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.utils.js +181 -0
- package/dist/bubbles/service-bubble/salesforce/salesforce.utils.js.map +1 -0
- package/dist/bubbles/service-bubble/slack/slack.d.ts +328 -328
- package/dist/bubbles/service-bubble/slack/slack.utils.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/slack/slack.utils.js +17 -2
- package/dist/bubbles/service-bubble/slack/slack.utils.js.map +1 -1
- package/dist/bubbles/service-bubble/stripe/stripe.d.ts +24 -24
- package/dist/bubbles/service-bubble/stripe/stripe.schema.d.ts +28 -28
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +6 -6
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +8 -8
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.d.ts +66 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.js +484 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.js.map +1 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.types.d.ts +85 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.types.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.types.js +2 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-browser-agent.types.js.map +1 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-fallback-step.d.ts +27 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-fallback-step.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-fallback-step.js +77 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/ai-fallback-step.js.map +1 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/index.d.ts +4 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/index.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/index.js +3 -0
- package/dist/bubbles/tool-bubble/browser-tools/_shared/ai/index.js.map +1 -0
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/tool.js +254 -195
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.d.ts +2 -0
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.js +346 -229
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/tool.d.ts +34 -33
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/tool.js +212 -151
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/tool.d.ts +33 -32
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/tool.js +188 -127
- package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +20 -20
- package/dist/bubbles/tool-bubble/linkedin-connection-tool/linkedin-connection-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +380 -380
- package/dist/bubbles/tool-bubble/people-search-tool.d.ts +44 -44
- package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +10 -10
- package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +60 -60
- package/dist/bubbles/tool-bubble/twitter-tool.d.ts +134 -134
- package/dist/bubbles/tool-bubble/yc-scraper-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/youtube-tool.d.ts +20 -20
- package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +12 -12
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +8 -8
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +2 -2
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +18 -18
- package/dist/bubbles.json +73 -2
- package/package.json +1 -1
|
@@ -1,72 +1,129 @@
|
|
|
1
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
2
|
+
var useValue = arguments.length > 2;
|
|
3
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
4
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
5
|
+
}
|
|
6
|
+
return useValue ? value : void 0;
|
|
7
|
+
};
|
|
8
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
9
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
10
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
11
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
12
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
13
|
+
var _, done = false;
|
|
14
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
15
|
+
var context = {};
|
|
16
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
17
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
18
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
19
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
20
|
+
if (kind === "accessor") {
|
|
21
|
+
if (result === void 0) continue;
|
|
22
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
23
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
24
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
25
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
26
|
+
}
|
|
27
|
+
else if (_ = accept(result)) {
|
|
28
|
+
if (kind === "field") initializers.unshift(_);
|
|
29
|
+
else descriptor[key] = _;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
33
|
+
done = true;
|
|
34
|
+
};
|
|
1
35
|
import { ToolBubble } from '../../../../types/tool-bubble-class.js';
|
|
36
|
+
import { AIFallbackStep } from '../_shared/ai/ai-fallback-step.js';
|
|
2
37
|
import { BrowserBaseBubble, } from '../../../service-bubble/browserbase/index.js';
|
|
3
38
|
import { CredentialType } from '@bubblelab/shared-schemas';
|
|
4
39
|
import { parseBrowserSessionData, buildProxyConfig } from '../_shared/utils.js';
|
|
5
40
|
import { LinkedInAcceptInvitationsToolParamsSchema, LinkedInAcceptInvitationsToolResultSchema, } from './schema.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (sessionData) {
|
|
29
|
-
this.contextId = sessionData.contextId;
|
|
30
|
-
this.cookies = sessionData.cookies;
|
|
41
|
+
let LinkedInAcceptInvitationsTool = (() => {
|
|
42
|
+
let _classSuper = ToolBubble;
|
|
43
|
+
let _instanceExtraInitializers = [];
|
|
44
|
+
let _stepNavigateToInvitationManager_decorators;
|
|
45
|
+
let _stepWaitForInvitationsPage_decorators;
|
|
46
|
+
let _stepAcceptTopInvitations_decorators;
|
|
47
|
+
return class LinkedInAcceptInvitationsTool extends _classSuper {
|
|
48
|
+
static {
|
|
49
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
50
|
+
_stepNavigateToInvitationManager_decorators = [AIFallbackStep('Navigate to invitation manager', {
|
|
51
|
+
taskDescription: 'Navigate to the LinkedIn invitation manager page',
|
|
52
|
+
})];
|
|
53
|
+
_stepWaitForInvitationsPage_decorators = [AIFallbackStep('Wait for invitations to load', {
|
|
54
|
+
taskDescription: 'Wait for the received invitations list to fully load with Accept buttons',
|
|
55
|
+
})];
|
|
56
|
+
_stepAcceptTopInvitations_decorators = [AIFallbackStep('Accept top invitations', {
|
|
57
|
+
taskDescription: 'Click Accept on the top N connection invitations and extract their info',
|
|
58
|
+
})];
|
|
59
|
+
__esDecorate(this, null, _stepNavigateToInvitationManager_decorators, { kind: "method", name: "stepNavigateToInvitationManager", static: false, private: false, access: { has: obj => "stepNavigateToInvitationManager" in obj, get: obj => obj.stepNavigateToInvitationManager }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
60
|
+
__esDecorate(this, null, _stepWaitForInvitationsPage_decorators, { kind: "method", name: "stepWaitForInvitationsPage", static: false, private: false, access: { has: obj => "stepWaitForInvitationsPage" in obj, get: obj => obj.stepWaitForInvitationsPage }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
61
|
+
__esDecorate(this, null, _stepAcceptTopInvitations_decorators, { kind: "method", name: "stepAcceptTopInvitations", static: false, private: false, access: { has: obj => "stepAcceptTopInvitations" in obj, get: obj => obj.stepAcceptTopInvitations }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
62
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
31
63
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
throw new Error(result.data.error || 'Failed to start browser session');
|
|
64
|
+
static bubbleName = 'linkedin-accept-invitations-tool';
|
|
65
|
+
static schema = LinkedInAcceptInvitationsToolParamsSchema;
|
|
66
|
+
static resultSchema = LinkedInAcceptInvitationsToolResultSchema;
|
|
67
|
+
static shortDescription = 'Accept top N LinkedIn connection invitations';
|
|
68
|
+
static longDescription = 'Recordable tool that navigates to the LinkedIn invitation manager page and accepts the top N received connection invitations.';
|
|
69
|
+
static alias = 'linkedin-accept-invitations';
|
|
70
|
+
static type = 'tool';
|
|
71
|
+
sessionId = (__runInitializers(this, _instanceExtraInitializers), null);
|
|
72
|
+
contextId = null;
|
|
73
|
+
cookies = null;
|
|
74
|
+
constructor(params = { operation: 'accept_invitations' }, context) {
|
|
75
|
+
super(params, context);
|
|
45
76
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
77
|
+
chooseCredential() {
|
|
78
|
+
const { credentials } = this.params;
|
|
79
|
+
return credentials?.[CredentialType.LINKEDIN_CRED];
|
|
80
|
+
}
|
|
81
|
+
async stepStartBrowserSession() {
|
|
82
|
+
if (this.sessionId)
|
|
83
|
+
return;
|
|
84
|
+
const sessionData = parseBrowserSessionData(this.chooseCredential());
|
|
85
|
+
if (sessionData) {
|
|
86
|
+
this.contextId = sessionData.contextId;
|
|
87
|
+
this.cookies = sessionData.cookies;
|
|
88
|
+
}
|
|
89
|
+
const proxyConfig = buildProxyConfig(this.params.proxy);
|
|
90
|
+
const browserbase = new BrowserBaseBubble({
|
|
91
|
+
operation: 'start_session',
|
|
92
|
+
context_id: this.contextId || undefined,
|
|
93
|
+
cookies: this.cookies || undefined,
|
|
94
|
+
credentials: this.params.credentials,
|
|
95
|
+
stealth: { solveCaptchas: true },
|
|
96
|
+
timeout_seconds: 1200,
|
|
97
|
+
...proxyConfig,
|
|
98
|
+
}, this.context, 'startsession');
|
|
99
|
+
const result = await browserbase.action();
|
|
100
|
+
if (!result.data.success || !result.data.session_id) {
|
|
101
|
+
throw new Error(result.data.error || 'Failed to start browser session');
|
|
102
|
+
}
|
|
103
|
+
this.sessionId = result.data.session_id;
|
|
104
|
+
if (result.data.context_id)
|
|
105
|
+
this.contextId = result.data.context_id;
|
|
106
|
+
console.log(`[AcceptInvitations] Session started: ${this.sessionId}`);
|
|
107
|
+
const ip = await this.detectIPAddress();
|
|
108
|
+
if (ip)
|
|
109
|
+
console.log(`[AcceptInvitations] Browser IP: ${ip}`);
|
|
110
|
+
}
|
|
111
|
+
async stepNavigateToInvitationManager() {
|
|
112
|
+
if (!this.sessionId)
|
|
113
|
+
throw new Error('No active session');
|
|
114
|
+
const browserbase = new BrowserBaseBubble({
|
|
115
|
+
operation: 'navigate',
|
|
116
|
+
session_id: this.sessionId,
|
|
117
|
+
url: 'https://www.linkedin.com/mynetwork/invitation-manager/',
|
|
118
|
+
wait_until: 'domcontentloaded',
|
|
119
|
+
timeout: 30000,
|
|
120
|
+
}, this.context, 'navigate');
|
|
121
|
+
const result = await browserbase.action();
|
|
122
|
+
if (!result.data.success)
|
|
123
|
+
throw new Error(result.data.error || 'Navigation failed');
|
|
124
|
+
}
|
|
125
|
+
async stepWaitForInvitationsPage() {
|
|
126
|
+
const checkScript = `(() => {
|
|
70
127
|
const buttons = document.querySelectorAll('button');
|
|
71
128
|
let hasAcceptButton = false;
|
|
72
129
|
for (const btn of buttons) {
|
|
@@ -78,25 +135,25 @@ export class LinkedInAcceptInvitationsTool extends ToolBubble {
|
|
|
78
135
|
const peopleLabel = document.body.innerText.match(/People\\s*\\(\\d+\\)/i);
|
|
79
136
|
return hasAcceptButton || !!peopleLabel;
|
|
80
137
|
})()`;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
138
|
+
for (let attempt = 1; attempt <= 15; attempt++) {
|
|
139
|
+
const found = await this.evaluate(checkScript);
|
|
140
|
+
if (found)
|
|
141
|
+
return true;
|
|
142
|
+
await new Promise((r) => setTimeout(r, 1000));
|
|
143
|
+
}
|
|
144
|
+
return false;
|
|
86
145
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
// Step 1: Find first visible Accept button, extract card info, tag it with a temp ID
|
|
99
|
-
const extractResult = (await this.evaluate(`
|
|
146
|
+
async stepAcceptTopInvitations() {
|
|
147
|
+
const count = this.params.count ?? 5;
|
|
148
|
+
const accepted = [];
|
|
149
|
+
let skipped = 0;
|
|
150
|
+
let availableCount = 0;
|
|
151
|
+
const TEMP_ID = '__bubblelab_accept_target__';
|
|
152
|
+
const MAX_CLICK_RETRIES = 2;
|
|
153
|
+
const POST_ACCEPT_SETTLE_MS = 1500;
|
|
154
|
+
for (let i = 0; i < count; i++) {
|
|
155
|
+
// Step 1: Find first visible Accept button, extract card info, tag it with a temp ID
|
|
156
|
+
const extractResult = (await this.evaluate(`
|
|
100
157
|
(() => {
|
|
101
158
|
// Clean up any previous temp ID
|
|
102
159
|
const prev = document.getElementById('${TEMP_ID}');
|
|
@@ -203,24 +260,24 @@ export class LinkedInAcceptInvitationsTool extends ToolBubble {
|
|
|
203
260
|
};
|
|
204
261
|
})()
|
|
205
262
|
`));
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
263
|
+
if (extractResult.done) {
|
|
264
|
+
console.log(`[AcceptInvitations] No more invitations to accept after ${accepted.length}`);
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
// Track available invitations on first iteration
|
|
268
|
+
if (i === 0)
|
|
269
|
+
availableCount = extractResult.buttonCount;
|
|
270
|
+
const prevButtonCount = extractResult.buttonCount;
|
|
271
|
+
// Step 2: Click the tagged button with retries (re-tag on failure)
|
|
272
|
+
if (!this.sessionId)
|
|
273
|
+
throw new Error('No active session');
|
|
274
|
+
let clickSucceeded = false;
|
|
275
|
+
for (let retry = 0; retry <= MAX_CLICK_RETRIES; retry++) {
|
|
276
|
+
// On retry, wait for DOM to settle then re-tag the button
|
|
277
|
+
if (retry > 0) {
|
|
278
|
+
console.log(`[AcceptInvitations] Retrying click for invitation ${i + 1} (attempt ${retry + 1})`);
|
|
279
|
+
await new Promise((r) => setTimeout(r, 1500));
|
|
280
|
+
await this.evaluate(`
|
|
224
281
|
(() => {
|
|
225
282
|
const prev = document.getElementById('${TEMP_ID}');
|
|
226
283
|
if (prev) prev.removeAttribute('id');
|
|
@@ -234,70 +291,70 @@ export class LinkedInAcceptInvitationsTool extends ToolBubble {
|
|
|
234
291
|
return true;
|
|
235
292
|
})()
|
|
236
293
|
`);
|
|
294
|
+
}
|
|
295
|
+
const clickBubble = new BrowserBaseBubble({
|
|
296
|
+
operation: 'click',
|
|
297
|
+
session_id: this.sessionId,
|
|
298
|
+
selector: `#${TEMP_ID}`,
|
|
299
|
+
wait_for_navigation: false,
|
|
300
|
+
timeout: 5000,
|
|
301
|
+
}, this.context, 'clickaccept');
|
|
302
|
+
const clickResult = await clickBubble.action();
|
|
303
|
+
if (clickResult.data.success) {
|
|
304
|
+
clickSucceeded = true;
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
237
307
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
timeout: 5000,
|
|
244
|
-
}, this.context, 'clickaccept');
|
|
245
|
-
const clickResult = await clickBubble.action();
|
|
246
|
-
if (clickResult.data.success) {
|
|
247
|
-
clickSucceeded = true;
|
|
248
|
-
break;
|
|
308
|
+
if (!clickSucceeded) {
|
|
309
|
+
console.log(`[AcceptInvitations] Click failed for invitation ${i + 1} after ${MAX_CLICK_RETRIES + 1} attempts, skipping`);
|
|
310
|
+
skipped++;
|
|
311
|
+
await new Promise((r) => setTimeout(r, 1000));
|
|
312
|
+
continue;
|
|
249
313
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
console.log(`[AcceptInvitations] Accepted ${i + 1}/${count}: ${extractResult.info.name}`);
|
|
260
|
-
}
|
|
261
|
-
// Step 3: Wait for DOM to update — poll until Accept button count decreases
|
|
262
|
-
const MAX_WAIT_POLLS = 15;
|
|
263
|
-
for (let poll = 0; poll < MAX_WAIT_POLLS; poll++) {
|
|
264
|
-
await new Promise((r) => setTimeout(r, 500));
|
|
265
|
-
const currentCount = (await this.evaluate(`
|
|
314
|
+
if (extractResult.info) {
|
|
315
|
+
accepted.push(extractResult.info);
|
|
316
|
+
console.log(`[AcceptInvitations] Accepted ${i + 1}/${count}: ${extractResult.info.name}`);
|
|
317
|
+
}
|
|
318
|
+
// Step 3: Wait for DOM to update — poll until Accept button count decreases
|
|
319
|
+
const MAX_WAIT_POLLS = 15;
|
|
320
|
+
for (let poll = 0; poll < MAX_WAIT_POLLS; poll++) {
|
|
321
|
+
await new Promise((r) => setTimeout(r, 500));
|
|
322
|
+
const currentCount = (await this.evaluate(`
|
|
266
323
|
Array.from(document.querySelectorAll('button')).filter(btn => {
|
|
267
324
|
const text = (btn.innerText || btn.textContent || '').trim().toLowerCase();
|
|
268
325
|
return text === 'accept' && btn.offsetParent !== null && !btn.disabled;
|
|
269
326
|
}).length
|
|
270
327
|
`));
|
|
271
|
-
|
|
272
|
-
|
|
328
|
+
if (currentCount < prevButtonCount)
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
// Extra settle time for LinkedIn UI animations before next iteration
|
|
332
|
+
await new Promise((r) => setTimeout(r, POST_ACCEPT_SETTLE_MS));
|
|
273
333
|
}
|
|
274
|
-
|
|
275
|
-
await new Promise((r) => setTimeout(r, POST_ACCEPT_SETTLE_MS));
|
|
334
|
+
return { accepted, skipped, availableCount };
|
|
276
335
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
try {
|
|
300
|
-
return (await this.evaluate(`
|
|
336
|
+
async stepEndBrowserSession() {
|
|
337
|
+
if (!this.sessionId)
|
|
338
|
+
return;
|
|
339
|
+
const browserbase = new BrowserBaseBubble({ operation: 'end_session', session_id: this.sessionId }, this.context, 'endsession');
|
|
340
|
+
await browserbase.action();
|
|
341
|
+
console.log(`[AcceptInvitations] Session ended: ${this.sessionId}`);
|
|
342
|
+
this.sessionId = null;
|
|
343
|
+
}
|
|
344
|
+
async evaluate(script) {
|
|
345
|
+
if (!this.sessionId)
|
|
346
|
+
throw new Error('No active session');
|
|
347
|
+
const browserbase = new BrowserBaseBubble({ operation: 'evaluate', session_id: this.sessionId, script }, this.context, 'evaluate');
|
|
348
|
+
const result = await browserbase.action();
|
|
349
|
+
if (!result.data.success)
|
|
350
|
+
throw new Error(result.data.error || 'Evaluation failed');
|
|
351
|
+
return result.data.result;
|
|
352
|
+
}
|
|
353
|
+
async detectIPAddress() {
|
|
354
|
+
if (!this.sessionId)
|
|
355
|
+
return null;
|
|
356
|
+
try {
|
|
357
|
+
return (await this.evaluate(`
|
|
301
358
|
(async () => {
|
|
302
359
|
try {
|
|
303
360
|
const r = await fetch('https://api.ipify.org?format=json');
|
|
@@ -306,48 +363,50 @@ export class LinkedInAcceptInvitationsTool extends ToolBubble {
|
|
|
306
363
|
} catch { return null; }
|
|
307
364
|
})()
|
|
308
365
|
`));
|
|
366
|
+
}
|
|
367
|
+
catch {
|
|
368
|
+
return null;
|
|
369
|
+
}
|
|
309
370
|
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
finally {
|
|
349
|
-
await this.stepEndBrowserSession();
|
|
371
|
+
async performAction() {
|
|
372
|
+
try {
|
|
373
|
+
await this.stepStartBrowserSession();
|
|
374
|
+
await this.stepNavigateToInvitationManager();
|
|
375
|
+
const pageReady = await this.stepWaitForInvitationsPage();
|
|
376
|
+
if (!pageReady)
|
|
377
|
+
console.log('[AcceptInvitations] Page slow to load, continuing');
|
|
378
|
+
const { accepted, skipped, availableCount } = await this.stepAcceptTopInvitations();
|
|
379
|
+
const count = this.params.count ?? 5;
|
|
380
|
+
// Success if we accepted all requested, OR if fewer were available than requested
|
|
381
|
+
const allAvailableAccepted = availableCount < count
|
|
382
|
+
? accepted.length >= availableCount
|
|
383
|
+
: accepted.length >= count;
|
|
384
|
+
return {
|
|
385
|
+
operation: 'accept_invitations',
|
|
386
|
+
success: allAvailableAccepted,
|
|
387
|
+
accepted,
|
|
388
|
+
accepted_count: accepted.length,
|
|
389
|
+
skipped_count: skipped,
|
|
390
|
+
message: allAvailableAccepted
|
|
391
|
+
? `Accepted ${accepted.length} invitation(s)${availableCount < count ? ` (only ${availableCount} available)` : ''}`
|
|
392
|
+
: `Accepted ${accepted.length}/${count} invitation(s), ${skipped} failed`,
|
|
393
|
+
error: allAvailableAccepted
|
|
394
|
+
? ''
|
|
395
|
+
: `Failed to accept ${skipped} invitation(s)`,
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
catch (error) {
|
|
399
|
+
return {
|
|
400
|
+
operation: 'accept_invitations',
|
|
401
|
+
success: false,
|
|
402
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
finally {
|
|
406
|
+
await this.stepEndBrowserSession();
|
|
407
|
+
}
|
|
350
408
|
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
409
|
+
};
|
|
410
|
+
})();
|
|
411
|
+
export { LinkedInAcceptInvitationsTool };
|
|
353
412
|
//# sourceMappingURL=tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../../../src/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/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,yCAAyC,EACzC,yCAAyC,GAI1C,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../../../src/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,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,yCAAyC,EACzC,yCAAyC,GAI1C,MAAM,aAAa,CAAC;IAER,6BAA6B;sBAGhC,UAAU;;;;;iBAHP,6BAGX,SAAQ,WAAkD;;;2DA6DzD,cAAc,CAAC,gCAAgC,EAAE;oBAChD,eAAe,EAAE,kDAAkD;iBACpE,CAAC;sDAmBD,cAAc,CAAC,8BAA8B,EAAE;oBAC9C,eAAe,EACb,0EAA0E;iBAC7E,CAAC;oDAsBD,cAAc,CAAC,wBAAwB,EAAE;oBACxC,eAAe,EACb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AAI,KAAK,mBAAmB,OAAO,SAAS;oBAC3E,KAAK,EAAE,oBAAoB;wBACzB,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC,oBAAoB,OAAO,gBAAgB;iBAChD,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,SAAS,EAAE,oBAAoB;oBAC/B,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;iBAChE,CAAC;YACJ,CAAC;oBAAS,CAAC;gBACT,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACrC,CAAC;QACH,CAAC;;;SA/ZU,6BAA6B"}
|
|
@@ -148,6 +148,8 @@ export declare class LinkedInConnectionTool<T extends LinkedInConnectionToolPara
|
|
|
148
148
|
static readonly longDescription = "\n Recordable LinkedIn Connection Tool for automating connection requests.\n Records each step with screenshots and timing information for debugging.\n ";
|
|
149
149
|
static readonly alias = "linkedin-recordable";
|
|
150
150
|
static readonly type = "tool";
|
|
151
|
+
/** JS helper to query elements across main document, iframes, and shadow DOM */
|
|
152
|
+
private static readonly CROSS_DOM_QUERY;
|
|
151
153
|
private sessionId;
|
|
152
154
|
private contextId;
|
|
153
155
|
private cookies;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../../../../src/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../../../../src/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OA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