@todoforai/edge 0.13.20 → 0.13.21
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/index.js +32 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -48788,6 +48788,20 @@ var tool_catalog_default = {
|
|
|
48788
48788
|
description: "Authenticated raw X API access via `xurl <method> <path>`; login `xurl auth oauth2`.",
|
|
48789
48789
|
versionCmd: "xurl --version 2>/dev/null | head -1"
|
|
48790
48790
|
},
|
|
48791
|
+
"linkedin-api": {
|
|
48792
|
+
category: "social",
|
|
48793
|
+
pkg: "@todoforai/linkedin-api",
|
|
48794
|
+
installer: "npm",
|
|
48795
|
+
label: "LinkedIn",
|
|
48796
|
+
statusCmd: `linkedin-api whoami 2>/dev/null | grep -oP '"publicId":\\s*"\\K[^"]+' | head -1`,
|
|
48797
|
+
loginCmd: "linkedin-api auth",
|
|
48798
|
+
credentialPaths: [
|
|
48799
|
+
"~/.config/linkedin-api/credentials.json"
|
|
48800
|
+
],
|
|
48801
|
+
capabilities: "Read profiles, list & read conversations, send DMs, send connection requests — raw LinkedIn Voyager API via cookie auth",
|
|
48802
|
+
description: "Authenticated LinkedIn Voyager API CLI. Cookie auth: `linkedin-api auth <li_at> <jsessionid>` (from browser DevTools).",
|
|
48803
|
+
versionCmd: "linkedin-api --version 2>/dev/null | head -1"
|
|
48804
|
+
},
|
|
48791
48805
|
"tiktok-uploader": {
|
|
48792
48806
|
category: "social",
|
|
48793
48807
|
pkg: "tiktok-uploader",
|
|
@@ -53249,14 +53263,30 @@ class TODOforAIEdge {
|
|
|
53249
53263
|
}
|
|
53250
53264
|
startHeartbeat(ws2, onStale) {
|
|
53251
53265
|
this.stopHeartbeat();
|
|
53266
|
+
const intervalMs = 30000;
|
|
53267
|
+
const resumeGapMs = 60000;
|
|
53268
|
+
let lastTick = Date.now();
|
|
53252
53269
|
let pongReceived = true;
|
|
53253
53270
|
ws2.on("pong", () => {
|
|
53254
53271
|
pongReceived = true;
|
|
53255
53272
|
});
|
|
53256
53273
|
this.heartbeatTimer = setInterval(() => {
|
|
53274
|
+
const now = Date.now();
|
|
53275
|
+
const elapsed = now - lastTick;
|
|
53276
|
+
lastTick = now;
|
|
53277
|
+
if (elapsed > resumeGapMs) {
|
|
53278
|
+
console.log(`[warn] Heartbeat delayed ${Math.round(elapsed / 1000)}s (sleep/resume likely), reconnecting`);
|
|
53279
|
+
try {
|
|
53280
|
+
ws2.terminate();
|
|
53281
|
+
} catch {}
|
|
53282
|
+
onStale();
|
|
53283
|
+
return;
|
|
53284
|
+
}
|
|
53257
53285
|
if (!pongReceived) {
|
|
53258
53286
|
console.log("[warn] No pong received, terminating stale connection");
|
|
53259
|
-
|
|
53287
|
+
try {
|
|
53288
|
+
ws2.terminate();
|
|
53289
|
+
} catch {}
|
|
53260
53290
|
onStale();
|
|
53261
53291
|
return;
|
|
53262
53292
|
}
|
|
@@ -53264,7 +53294,7 @@ class TODOforAIEdge {
|
|
|
53264
53294
|
try {
|
|
53265
53295
|
ws2.ping();
|
|
53266
53296
|
} catch {}
|
|
53267
|
-
},
|
|
53297
|
+
}, intervalMs);
|
|
53268
53298
|
}
|
|
53269
53299
|
stopHeartbeat() {
|
|
53270
53300
|
if (this.heartbeatTimer) {
|