Skip to content

Open-source, local-first social media research agent for Instagram, TikTok, and LinkedIn. Jev routes read-only steps; socai CLI captures cited browser evidence.

Add LinkedIn as a Jev route and document the public socai CLI.

Tony Chongd066b0f9d0d3
diff --git a/README.md b/README.md
index c17f745..03e83c6 100644
--- a/README.md
+++ b/README.md
@@ -1,186 +1,108 @@
-<img src="docs/banner.png" alt="Jev Social — typed decisions and real social data" width="100%" />
+<img src="docs/banner.png" alt="Jev × socai" width="100%" />
# Jev × socai
-**Jev decides the route. [socai](https://github.com/socai-io/socai) does the real browser work. You get searchable posts, downloaded videos, a complete table, and an evidence-led agent report in one local page.**
+**Jev is cool. Giving it access to your social media is cooler.**
+
+Jev makes one typed decision — Instagram, TikTok, LinkedIn, or no. [socai](https://github.com/socai-io/socai) opens your real Chrome and does the research. Posts, profiles, comments, downloaded video, a table, a report. Not a chatbot guessing what the feed looked like.
<p>
<img src="docs/platforms/instagram.png" height="32" alt="Instagram">
&nbsp;&nbsp;
<img src="docs/platforms/tiktok.png" height="32" alt="TikTok">
+ &nbsp;&nbsp;
+ <img src="docs/platforms/linkedin.svg" height="32" alt="LinkedIn">
</p>
-<p><sub>Instagram · TikTok</sub></p>
-
-[socai on GitHub](https://github.com/socai-io/socai) · [Discord](https://discord.gg/CpQdA7bwt8) · [Meet Jev at TypeSafe](https://typesafe.ai/)
-
-## See it run
-
-![Jev × socai live social research demo](docs/jev-social.gif)
-
-Give the demo a social research goal such as “find the fastest-growing AI wearable conversations on TikTok.” Jev makes one typed choice—Instagram, TikTok, or unsupported—then the local socai CLI searches the live site. TikTok results continue into `get-videos --download-media`, so the result page can play the files socai actually captured instead of showing a fabricated preview. The new non-interactive `socai research` command then runs the real socai agent loop, streams captured evidence into the page, and writes the final Markdown report.
-
-## From half an hour to one minute
-
-A manual social scan is a chain of small tasks: choose a network, search, open posts, copy captions and engagement, download videos, normalize rows, and assemble evidence. Jev × socai turns that chain into one request.
-
-| Workflow | Manual research baseline | Jev × socai demo target | Reduction |
-| --- | ---: | ---: | ---: |
-| Search one social topic | 5–10 min | 10–20 s | up to 30× faster |
-| Open and inspect 10 posts | 10–15 min | 20–30 s | up to 45× faster |
-| Download video evidence | 5–10 min | included in the run | no separate step |
-| Build a normalized results table | 5–15 min | immediate | no copy/paste |
-| **End-to-end trend scan** | **about 30 min** | **about 50 s** | **about 36× faster** |
-
-The 30-minute baseline and 50-second target are an illustrative demo comparison, not a universal benchmark. Live duration depends on result count, video size, login state, network conditions, and platform throttling. The UI always shows the measured elapsed time for the current run.
-## What the demo returns
+[socai](https://github.com/socai-io/socai) · [Discord](https://discord.gg/CpQdA7bwt8) · [Jev](https://typesafe.ai/)
-The result page is designed for a screen recording and stays on one page:
+![Live run](docs/jev-social.gif)
-- live elapsed time while Jev and socai work;
-- streamed evidence cards instead of a frozen loading screen or raw CLI log;
-- a top-to-bottom TypeSafe-inspired gradient scan during capture;
-- every returned post or video as a rich evidence card;
-- local playback for videos downloaded by socai;
-- captions, authors, dates, engagement, duration, comments, and source links;
-- a complete, normalized evidence table;
-- a socai agent report with an executive summary, evidence, themes, audience signals, limits, and sources.
+## Why this pairing
-Example table shape:
+Jev is absurdly good at *choosing*. It is a waste of that to make it pick CSS selectors.
-| Platform | Author | Title / caption | Published | Views | Likes | Comments | Shares | Duration | Media |
-| --- | --- | --- | --- | ---: | ---: | ---: | ---: | ---: | --- |
-| TikTok | creator handle | Captured post caption | ISO timestamp | 128K | 9.4K | 312 | 840 | 34s | Downloaded |
-| Instagram | creator handle | Captured reel or post | ISO timestamp | — | 4.1K | 96 | — | — | Preview |
+socai already knows the sites. Search, open a reel, read a LinkedIn profile, expand comments, keep the file. The model never sees a shell. The Node process launches `socai` with an argument array.
-The saved run still retains the structured CLI result for reproducibility, while the recording UI stays focused on posts, video, timing, the comparison table, and the final report.
-
-## One goal, one typed route, real CLI execution
+One goal in. Evidence out.
```text
-research goal
- │
- ▼
-Jev typed decision ── instagram_search ──┐
- ├─ tiktok_search ─────┼─► socai browser workflow
- └─ unsupported ───────┘ │
- ├─ search results
- ├─ post details
- ├─ comments
- ├─ downloaded video
- └─ research agent
- │
- ▼
- cards + table + report
+"find the loudest AI wearable posts on Instagram"
+ │
+ ▼
+ Jev · one choice
+ │
+ ├─ instagram ──► socai instagram search …
+ ├─ tiktok ──► socai tiktok search … + get-videos --download-media
+ ├─ linkedin ──► socai linkedin search …
+ └─ no ──► stop
+ │
+ ▼
+ cards · table · report
```
-Jev receives the complete natural-language request. socai receives the normalized literal search term expected by its adapter. The model cannot supply shell fragments, selectors, or browser actions; the Node process launches socai with an argument array.
-
-For TikTok, a successful run uses both stable CLI stages:
-
-```bash
-socai tiktok search "AI wearables" --num 10 --pretty
-socai tiktok get-videos --video <url> --download-media --pretty
-```
+If your demo is "watch an LLM wander around a website," this is not that demo.
-Instagram search uses the native dev adapter:
+## Half an hour → about a minute
-```bash
-socai instagram search "AI wearables" --num 10 --pretty
-```
+A manual social scan is a chain of small tasks: pick a network, search, open posts, copy captions, download videos, build a table, write it up. This turns that chain into one request.
-Both routes finish through the same non-interactive agent entrypoint:
+| Workflow | Manual | Jev × socai | |
+| --- | ---: | ---: | ---: |
+| Search one social topic | 5–10 min | 10–20 s | up to 30× |
+| Open and inspect 10 posts | 10–15 min | 20–30 s | up to 45× |
+| Download video evidence | 5–10 min | included | no extra step |
+| Build a results table | 5–15 min | immediate | no copy/paste |
+| **End-to-end trend scan** | **~30 min** | **~50 s** | **~36×** |
-```bash
-socai research "Compare the strongest signals and cite the captured posts" \
- --platform instagram --max-steps 6 --pretty
-```
+These are demo targets, not a benchmark. Live time depends on result count, video size, login, and the site. The UI always shows the measured elapsed time for the current run.
-## Run the recording demo
+## Run it
-Requirements: Node.js 20+, an OpenRouter key with Jev access, and the included socai dev build.
+Node 20+, an OpenRouter key with Jev access, and a current [socai](https://github.com/socai-io/socai) CLI (the public build now ships Instagram and LinkedIn search).
```bash
+curl -fsSL https://github.com/socai-io/socai/releases/latest/download/install.sh | sh
npm install
-cp .env.example .env
-# Add OPENROUTER_API_KEY to .env.
+cp .env.example .env # OPENROUTER_API_KEY=…
npm start
```
-The browser opens directly at `http://127.0.0.1:8766`. The server binds only to the loopback interface, so no local API token or token-bearing URL is required. For the cleanest recording:
-
-1. Enter a goal and leave the platform on **Jev · auto**.
-2. Start the run and keep the live timer and streamed evidence cards in frame.
-3. Wait for the captured-post grid.
-4. Play a downloaded video directly in its card.
-5. Scroll through the complete table and the **socai research report**.
-
-The header includes direct links to the [socai GitHub repository](https://github.com/socai-io/socai) and the [socai Discord](https://discord.gg/CpQdA7bwt8).
-
-## Configuration
+Opens `http://127.0.0.1:8766`. Loopback only. Leave the platform on **Jev · auto**, type a goal, watch the timer.
-The app loads the first available environment source:
-
-1. `JEV_SOCIAL_ENV_FILE`, when explicitly set;
-2. this repository's `.env`;
-3. `docs/work/20260918-2/.env` in the parent socai workspace.
-
-Both `OPENROUTER_API_KEY=...` and the existing lowercase `openrouter=...` form are accepted. `SOCAI_BIN` can point to a custom build. In this workspace the default resolver discovers:
-
-```text
-docs/work/20260918/worktrees/dev-platform-validation/target/debug/socai
+```bash
+npm start -- search "find emerging design creators on Instagram" --platform auto --limit 4
+npm start -- search "find AI wearable trends on TikTok" --platform auto --limit 4
+npm start -- search "find AI product managers in San Francisco on LinkedIn" --platform auto --limit 4
```
-That build is based on socai dev / v0.5.6 and exposes Instagram search, TikTok search, detail reading, comments, media download, and the non-interactive research agent used by this demo.
-
-Browser selection follows socai instead of being overridden by the demo. With no override, socai uses the existing Chrome debugging session and can reuse an authenticated profile such as the validated Deeptensor Profile 5. Set `SOCAI_CHROME_PROFILE=managed` only for an isolated browser, or set `SOCAI_CDP_WS` / `SOCAI_CDP_URL` for an explicit remote browser endpoint.
-
-## CLI usage
+Or call socai directly:
```bash
-npm start -- status
-npm start -- search "find AI wearable trends on TikTok" --platform auto --limit 10
-npm start -- search "find emerging design creators on Instagram" --platform auto --limit 10
-npm start -- serve --port 8766 --no-open
+socai instagram search "AI wearables" --num 10 --pretty
+socai tiktok search "AI wearables" --num 10 --pretty
+socai tiktok get-videos --video <url> --download-media --pretty
+socai linkedin search "AI product managers" --num 10 --pretty
+socai linkedin search "AI agents" --type content --num 10 --pretty
```
-The `--limit` option remains available to the command-line interface. The web demo intentionally captures and displays up to four previewable records, prioritizing downloaded video, playable video URLs, posters, and thumbnails so the recording stays fast and avoids empty cards.
-
-## Why this is genuinely socai
-
-- **The server launches the configured socai executable.** It does not contain a second browser scraper.
-- **Progress is streamed from the child process.** Browser and download activity appears while the run is still active.
-- **Video playback uses a file written by socai.** Local media paths are validated under the socai run directory and exposed through short-lived loopback-only URLs with HTTP range support.
-- **The final report comes from the socai agent.** The UI renders the Markdown report emitted by `socai research`; it does not generate a browser-side summary.
-- **Failures stay visible.** Login gates, challenges, rate limits, invalid JSON, missing adapters, download failures, and timeouts are reported instead of replaced with fixtures.
-- **Credentials remain separated.** The OpenRouter key stays in the Node process and is removed from the socai child environment.
-
-## Small enough to audit
-
-| File | Responsibility |
-| --- | --- |
-| [`src/classifier.js`](src/classifier.js) | Jev route schema and OpenRouter Decisions request |
-| [`src/query.js`](src/query.js) | Natural-language goal to literal search query |
-| [`src/socai.js`](src/socai.js) | socai capability checks, search, video hydration, downloads, research, and stdout parsing |
-| [`src/app.js`](src/app.js) | Evidence capture, agent research, and result merging |
-| [`src/server.js`](src/server.js) | NDJSON streaming, loopback security, and range-based local media serving |
-| [`public/app.js`](public/app.js) | Live timer, progress stream, video cards, details, table, and final output |
-
-## Evidence and limits
+## What we will not do
-The local Instagram smoke test on September 19, 2026 used `typesafe/jev-1.13-20260917`; Jev selected Instagram and the real socai CLI returned live results successfully. Timing from one smoke test is evidence of execution, not a latency guarantee.
+- Invent posts when the site is empty, gated, or rate-limited
+- Let Jev write selectors, shell, or browser actions
+- Scrape in this repo — if socai did not write the file, the page does not play it
+- Post, like, follow, or message anyone
-Remote sites still control availability. Login state, challenges, regional behavior, rate limits, changing layouts, and expiring media URLs can affect a run. The application is read-only: it does not post, like, follow, message, or silently substitute sample data.
+Remote sites still win. Login, challenges, and disappearing media URLs are their problem, and we show the failure.
-## Development
+## Tests
```bash
npm test
-npm run check
```
-Tests use local mock binaries and do not require live model calls. Real searches call OpenRouter and launch the configured socai browser workflow. Run records remain under `~/.jev-social/runs/`; credentials and `.env` files remain ignored.
+Mocks only. A live run needs OpenRouter and a real socai browser session.
---
-Built with [Jev by TypeSafe](https://typesafe.ai/) and [socai](https://github.com/socai-io/socai). If this workflow is useful, [star socai](https://github.com/socai-io/socai) or [join the Discord](https://discord.gg/CpQdA7bwt8).
+If this is useful, [star socai](https://github.com/socai-io/socai) or [join the Discord](https://discord.gg/CpQdA7bwt8).
diff --git a/bin/jev-social.js b/bin/jev-social.js
index a73d0a1..c255c4b 100755
--- a/bin/jev-social.js
+++ b/bin/jev-social.js
@@ -19,7 +19,7 @@ Usage:
jev-social serve [--port 8766] [--no-open] Start local preview
Search options:
- --platform <auto|instagram|tiktok> Platform hint (default: auto)
+ --platform <auto|instagram|tiktok|linkedin> Platform hint (default: auto)
--limit <1-100> Result limit (default: 10)
Configuration (normally auto-loaded from .env):
diff --git a/docs/platforms/linkedin.svg b/docs/platforms/linkedin.svg
new file mode 100644
index 0000000..0f32c3e
--- /dev/null
+++ b/docs/platforms/linkedin.svg
@@ -0,0 +1 @@
+<svg fill="#0A66C2" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>LinkedIn</title><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>
\ No newline at end of file
diff --git a/package.json b/package.json
index 9db2e0a..e25b441 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "jev-social",
"version": "0.1.0",
- "description": "Jev-routed Instagram and TikTok research through the socai CLI",
+ "description": "Jev-routed Instagram, TikTok, and LinkedIn research through the socai CLI",
"type": "module",
"bin": {
"jev-social": "./bin/jev-social.js"
@@ -31,6 +31,7 @@
"socai",
"instagram",
"tiktok",
+ "linkedin",
"research"
],
"license": "MIT"
diff --git a/public/app.js b/public/app.js
index 97b17e7..1bc2aeb 100644
--- a/public/app.js
+++ b/public/app.js
@@ -136,7 +136,7 @@ async function refreshStatus() {
const status = await api("/api/status");
setStatus("jev", status.jevConfigured, status.jevConfigured ? "Jev ready" : "Jev needs a key");
const caps = status.socai.capabilities || {};
- const ready = status.socai.installed && (caps.instagram || caps.tiktok);
+ const ready = status.socai.installed && (caps.instagram || caps.tiktok || caps.linkedin);
setStatus("socai", ready, ready ? "socai ready" : "socai unavailable");
} catch (error) {
showError(error);
diff --git a/public/index.html b/public/index.html
index a84a157..6849cf6 100644
--- a/public/index.html
+++ b/public/index.html
@@ -30,8 +30,9 @@
<p class="platform-logos" aria-label="Supported platforms">
<img src="/platforms/instagram.png" width="28" height="28" alt="Instagram" />
<img src="/platforms/tiktok.png" width="28" height="28" alt="TikTok" />
+ <img src="/platforms/linkedin.svg" width="28" height="28" alt="LinkedIn" />
</p>
- <p class="intro">Describe one Instagram or TikTok research goal. Jev routes it; the local socai CLI searches, reads, downloads, and returns the evidence.</p>
+ <p class="intro">Describe one Instagram, TikTok, or LinkedIn research goal. Jev routes it; the local socai CLI searches, reads, downloads, and returns the evidence.</p>
<form id="search-form" class="composer">
<textarea id="query" name="query" required autocomplete="off" rows="3" placeholder="Find emerging AI creators and their most engaging posts"></textarea>
@@ -42,6 +43,7 @@
<option value="auto">Jev · auto</option>
<option value="instagram">Instagram</option>
<option value="tiktok">TikTok</option>
+ <option value="linkedin">LinkedIn</option>
</select>
</label>
<div class="readiness" aria-live="polite">
diff --git a/public/platforms/linkedin.svg b/public/platforms/linkedin.svg
new file mode 100644
index 0000000..0f32c3e
--- /dev/null
+++ b/public/platforms/linkedin.svg
@@ -0,0 +1 @@
+<svg fill="#0A66C2" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>LinkedIn</title><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>
\ No newline at end of file
diff --git a/src/app.js b/src/app.js
index df3c23f..6d0a0d4 100644
--- a/src/app.js
+++ b/src/app.js
@@ -36,7 +36,7 @@ export async function runSearch(
client,
});
if (!classification.platform) {
- throw new AppError("Jev classified this request as unsupported. Choose Instagram or TikTok and use a read-only search.", {
+ throw new AppError("Jev classified this request as unsupported. Choose Instagram, TikTok, or LinkedIn and use a read-only search.", {
code: "UNSUPPORTED_TASK",
details: { classification },
});
diff --git a/src/classifier.js b/src/classifier.js
index 1639e10..e26cd12 100644
--- a/src/classifier.js
+++ b/src/classifier.js
@@ -1,6 +1,11 @@
import { AppError } from "./errors.js";
-export const SUPPORTED_PLATFORMS = new Set(["instagram", "tiktok"]);
+export const SUPPORTED_PLATFORMS = new Set(["instagram", "tiktok", "linkedin"]);
+const ROUTE_TO_PLATFORM = {
+ instagram_search: "instagram",
+ tiktok_search: "tiktok",
+ linkedin_search: "linkedin",
+};
export async function classifySearch({
goal,
@@ -28,6 +33,7 @@ export async function classifySearch({
supported_workflows: [
"Read-only Instagram search via the socai CLI",
"Read-only TikTok search via the socai CLI",
+ "Read-only LinkedIn search via the socai CLI",
],
},
questions: {
@@ -44,6 +50,7 @@ export async function classifySearch({
criteria: {
instagram_search: "Search or research Instagram content, profiles, posts, or reels.",
tiktok_search: "Search or research TikTok content, creators, or videos.",
+ linkedin_search: "Search or research LinkedIn people, companies, posts, or professional experience.",
unsupported:
"Anything else, including posting, liking, following, messaging, or an ambiguous auto route.",
},
@@ -64,7 +71,7 @@ export async function classifySearch({
const answer = response?.answers?.route;
const selected = answer?.choice;
- const platform = selected === "instagram_search" ? "instagram" : selected === "tiktok_search" ? "tiktok" : null;
+ const platform = ROUTE_TO_PLATFORM[selected] || null;
const confidence = answer?.confidence;
const probabilities = answer?.probabilities;
const probabilitiesValid =
@@ -77,7 +84,7 @@ export async function classifySearch({
));
if (
answer?.type !== "choice" ||
- !["instagram_search", "tiktok_search", "unsupported"].includes(selected) ||
+ !["instagram_search", "tiktok_search", "linkedin_search", "unsupported"].includes(selected) ||
typeof confidence !== "number" ||
!Number.isFinite(confidence) ||
confidence < 0 ||
diff --git a/src/query.js b/src/query.js
index 79a8310..a46026e 100644
--- a/src/query.js
+++ b/src/query.js
@@ -1,4 +1,4 @@
-const PLATFORM = "(?:instagram|tiktok)";
+const PLATFORM = "(?:instagram|tiktok|linkedin)";
const ENGLISH_ACTION = "(?:search|find|look\\s+up|research)";
const ENGLISH_POLITE = "(?:(?:could|can|would)\\s+you\\s+)?(?:please\\s+)?";
const TRAILING_ENGLISH_INSTRUCTION =
diff --git a/src/socai.js b/src/socai.js
index 9750271..d82f872 100644
--- a/src/socai.js
+++ b/src/socai.js
@@ -2,7 +2,7 @@ import { AppError } from "./errors.js";
import { configuredSocaiBin, defaultInstalledSocaiBin } from "./config.js";
import { formatCommand, runProcess } from "./process.js";
-const PLATFORMS = ["instagram", "tiktok"];
+const PLATFORMS = ["instagram", "tiktok", "linkedin"];
export async function resolveSocaiBin(config = {}, env = process.env) {
return configuredSocaiBin(config, env) || (await defaultInstalledSocaiBin());
diff --git a/test/classifier.test.js b/test/classifier.test.js
index 3e68e40..b6424b5 100644
--- a/test/classifier.test.js
+++ b/test/classifier.test.js
@@ -58,6 +58,30 @@ test("classifySearch calls OpenRouter's Decisions endpoint", async () => {
assert.equal(result.platform, "instagram");
});
+test("classifySearch routes LinkedIn through the same typed choice", async () => {
+ const client = {
+ async systemOne() {
+ return {
+ answers: {
+ route: {
+ type: "choice",
+ choice: "linkedin_search",
+ confidence: 0.88,
+ probabilities: { instagram_search: 0.04, tiktok_search: 0.03, linkedin_search: 0.88, unsupported: 0.05 },
+ },
+ },
+ };
+ },
+ };
+ const result = await classifySearch({
+ goal: "find AI product managers in San Francisco",
+ requestedPlatform: "linkedin",
+ client,
+ });
+ assert.equal(result.platform, "linkedin");
+ assert.equal(result.route, "linkedin_search");
+});
+
test("classifySearch rejects unknown platforms before any model call", async () => {
await assert.rejects(
classifySearch({ goal: "query", requestedPlatform: "youtube", client: {} }),
diff --git a/test/query.test.js b/test/query.test.js
index f8352df..88311ed 100644
--- a/test/query.test.js
+++ b/test/query.test.js
@@ -14,6 +14,8 @@ test("extractSearchQuery removes English platform-routing language", () => {
assert.equal(extractSearchQuery("Search for AI creators on Instagram please"), "AI creators");
assert.equal(extractSearchQuery("Search Instagram for AI creators please"), "AI creators");
assert.equal(extractSearchQuery("look up 'new design tools' on instagram"), "new design tools");
+ assert.equal(extractSearchQuery("find AI product managers on LinkedIn"), "AI product managers");
+ assert.equal(extractSearchQuery("search LinkedIn for staff engineers"), "staff engineers");
});
test("extractSearchQuery removes Chinese platform-routing language", () => {
@@ -27,6 +29,7 @@ test("extractSearchQuery removes Chinese platform-routing language", () => {
assert.equal(extractSearchQuery("请帮我搜索一下 Instagram 上的 AI creators"), "AI creators");
assert.equal(extractSearchQuery("在 TikTok 上搜索 AI creators 返回 10 条结果"), "AI creators");
assert.equal(extractSearchQuery("在 TikTok 搜索 AI creators 并返回 10 条结果"), "AI creators");
+ assert.equal(extractSearchQuery("在 LinkedIn 搜索 AI product managers"), "AI product managers");
});
test("extractSearchQuery preserves an already literal search term", () => {
diff --git a/test/socai.test.js b/test/socai.test.js
index eda1060..aa16b91 100644
--- a/test/socai.test.js
+++ b/test/socai.test.js
@@ -23,6 +23,22 @@ test("buildSearchArgs owns the stable socai CLI contract", () => {
"--pretty",
]);
assert.throws(() => buildSearchArgs("tiktok", "x", 0), /between 1 and 100/);
+ assert.deepEqual(buildSearchArgs("linkedin", "AI PM", 8), [
+ "linkedin",
+ "search",
+ "AI PM",
+ "--num",
+ "8",
+ "--pretty",
+ ]);
+ assert.deepEqual(buildSearchArgs("instagram", "AI wearables", 10), [
+ "instagram",
+ "search",
+ "AI wearables",
+ "--num",
+ "10",
+ "--pretty",
+ ]);
});
test("buildTikTokVideoArgs requests real media downloads for every result", () => {
@@ -118,7 +134,7 @@ if (args.length === 1 && args[0] === "--help") {
const env = { ...process.env, SOCAI_BIN: mock, OPENROUTER_API_KEY: "must-not-leak" };
const status = await probeSocai({}, env);
assert.equal(status.installed, true);
- assert.deepEqual(status.capabilities, { instagram: false, tiktok: true });
+ assert.deepEqual(status.capabilities, { instagram: false, tiktok: true, linkedin: false });
const progress = [];
const result = await runSocaiSearch({