linkedin-relay-mcp 3.11.0 → 3.12.1

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: linkedin-relay
3
- description: Research LinkedIn from the user's own account — search people/companies/jobs, read profiles, read the chronological feed — and, through the lnrelay CLI, post (text, image or video), comment, reply, react and delete under the approval mode the owner chose. Use when finding or evaluating people, companies or roles on LinkedIn, reading what the user's network is posting, or when the user asks to post or engage on LinkedIn. Not for messaging or connection requests, which do not exist.
3
+ description: Research LinkedIn from the user's own account — search people and companies, hunt jobs with every filter LinkedIn has and collect their apply links, read profiles, read the chronological feed — and, through the lnrelay CLI, post (text, image or video), comment, reply, react, delete and edit the user's own profile (headline, About, roles, skills) under the approval mode the owner chose. Use when finding or evaluating people, companies, roles or job openings on LinkedIn, when the user wants job listings or application links, when reading what the user's network is posting, or when the user asks to post, engage or update their profile on LinkedIn. Not for messaging, connection requests or applying to jobs, which do not exist.
4
4
  ---
5
5
 
6
6
  # linkedin-relay
@@ -44,6 +44,48 @@ risk / budget free — check standing BEFORE spending
44
44
  Search rows already carry name, headline, location and URL. **Rank on those.** Calling `profile` on
45
45
  every search result is how a day's budget disappears in one request.
46
46
 
47
+ ## Job hunting — the recipe
48
+
49
+ Jobs have their own commands, their own budget (150 job searches, 60 job reads a day) and their own
50
+ funnel. Each call moves 100 jobs, so a whole hunt is a few dozen calls, not hundreds.
51
+
52
+ ```
53
+ 1. job_filters (optional, 1 call) the ids for company / industry / title / place, and live counts
54
+ 2. jobs ALL keyword sets in ONE call, the same filters, compact:true
55
+ → one merged list; `matched` says which sets found each job
56
+ 3. rank on title, company, location, workplace, listed — from the rows alone
57
+ 4. job ALL finalists in ONE call (a list of ids) → description + apply.url
58
+ 5. report title · company · location · apply.url, and say how the list was cut
59
+ ```
60
+
61
+ A worked call, the shape to copy:
62
+
63
+ ```
64
+ jobs keywords:["frontend engineer", "AI agent developer", "agent engineer"]
65
+ location:"European Union" workplace:["remote"] posted:"week" limit:200 compact:true
66
+ job job:["4479248573", "4475225930", "4476083905"]
67
+ ```
68
+
69
+ From a shell the same is
70
+ `lnrelay jobs "frontend engineer" "AI agent developer" --location "European Union" --workplace remote --posted week --limit 200 --compact`
71
+ and `lnrelay job 4479248573 4475225930 4476083905`.
72
+
73
+ - **Put every keyword set in one `jobs` call**, never one call per keyword: the tool merges them by
74
+ job id, so you read each job once and `job` reads it once. Separate calls leave the merging to you
75
+ and spend reads twice on the same job.
76
+ - **Use filters, not keywords, to narrow.** `posted:"week"`, `workplace`, `experience` and `geoId`
77
+ cut a list from hundreds to tens. Keywords are matched loosely by LinkedIn, so "AI agent
78
+ developer" also returns plain frontend jobs; a narrow keyword is not a narrow search.
79
+ - **`compact:true` for the wide pass** (one line per job, under half the size of the full rows), the full rows or
80
+ `job` only for what you will actually judge.
81
+ - **`details:true` only when you need every job's apply link** (for a full export, say). It costs one
82
+ read per 100 jobs and adds the employer, applicant count and apply link to every row; add
83
+ `description:true` only if you will read them all, because descriptions are long.
84
+ - **Most results are promoted** (often three in four). That is LinkedIn's ranking, not a filter we
85
+ can turn off; `promoted` on each row says which.
86
+ - **This tool cannot apply.** It finds the job and the link. `apply.type: "external"` is the
87
+ employer's own site; `"easy-apply"` is LinkedIn's form, done by the user in a browser.
88
+
47
89
  ## Commands
48
90
 
49
91
  ### `search` — cheap. The net.
@@ -61,16 +103,29 @@ presenting it as a data problem.
61
103
 
62
104
  ### `jobs` — 1 job-search call per 100 results. Job search with every filter.
63
105
  ```
64
- jobs keywords:"<terms>" [location:"<place>" | geoId:"<id>"] [distance:<miles>]
106
+ jobs keywords:"<terms>" | ["<terms>", "<terms>", …] [location:"<place>" | geoId:"<id>"] [distance:<miles>]
65
107
  [posted:"24h|week|month|<N>h|<N>d"] [experience:[internship|entry|associate|mid-senior|director|executive]]
66
108
  [type:[full-time|part-time|contract|temporary|volunteer|internship|other]]
67
109
  [workplace:[on-site|remote|hybrid]] [easyApply] [under10] [verified] [inNetwork] [fairChance]
68
110
  [company|industry|function|title|place:[ids]] [filter:["key=v1,v2"]] [sort:recent|relevant]
69
- [limit:1-100] [start:N] [details] [description] [compact]
111
+ [limit:1-1000 per keyword set] [start:N] [details] [description] [compact]
70
112
  ```
71
- Each item: `id`, `title`, `company`, `location`, `workplace`, `listed` (YYYY-MM-DD), `easyApply`,
72
- `promoted`, `salary` (when the card shows one), `insights`, `url`. `compact` gives one line per job.
113
+ CLI: `lnrelay jobs "<terms>" ["<more terms>" …] [--location … | --geo …] [--workplace remote,hybrid]
114
+ [--posted week] [--experience mid-senior] [--easy-apply] [--limit N] [--details] [--compact]` — every
115
+ option is in `lnrelay help`; list options take commas or repeat.
73
116
 
117
+ Each item: `id`, `title`, `company`, `location`, `workplace`, `listed` (YYYY-MM-DD), `easyApply`,
118
+ `promoted`, `salary` (when the card shows one), `insights`, `url`, and `matched` with several
119
+ keyword sets. `compact` gives one line per job:
120
+ `<id> | <title> | <company> | <location> | <workplace> | <listed> | easy apply | promoted | matched: a + b`.
121
+
122
+ - **Several keyword sets in one call.** Pass `keywords` as a list: each set is searched with the
123
+ same filters, and the results are merged by job id. A job found by several sets comes back once,
124
+ with `matched` naming them; the most-matched come first. Treat that order as a hint, not a
125
+ ranking: LinkedIn matches keywords loosely ("AI agent developer" returns plain frontend jobs),
126
+ so a generic job can match every set. Rank on title and company.
127
+ `meta.searches` has each set's total, count, state and `next`; `meta.duplicates` is how many
128
+ repeats were merged. One set failing leaves the others, with `state: "failed"` in its entry.
74
129
  - **Rank on the rows, then read the finalists with `job`.** `details` reads every row in full, 100
75
130
  per job read, to add the apply link, applicants and employment type.
76
131
  - **Check `data.location`.** A typed location is resolved by LinkedIn, and the place it chose is
@@ -80,9 +135,9 @@ Each item: `id`, `title`, `company`, `location`, `workplace`, `listed` (YYYY-MM-
80
135
  batch, and `meta.state` is `complete` only when the results ran out. LinkedIn serves at most 1000
81
136
  per search; narrow the query rather than paging deep.
82
137
  - Job hunting has its own budget: 150 job-search calls and 60 job reads a day, apart from the
83
- people and company `search`. A search call returns 100 jobs, so ten keyword searches of a few
84
- hundred results each take about 30 calls. The same job turns
85
- up under several keywords; merge the lists by `id` before reading any in full.
138
+ people and company `search`. A search call returns 100 jobs, so ten keyword sets of a few
139
+ hundred results each take about 30 calls. Reposts and recruiter copies of one role carry
140
+ different ids, so they are not merged: judge those by company, title and description.
86
141
 
87
142
  ### `job` — 1 job read per 100 jobs. Jobs, in full.
88
143
  ```
@@ -227,7 +282,10 @@ Every collection carries:
227
282
  |---|---|
228
283
  | `state: complete` | every reference resolved; an empty `items` here genuinely means none |
229
284
  | `state: partial` | **some references failed to resolve** — the record is incomplete, not small |
230
- | `state: unknown` | we stopped at the limit and cannot prove exhaustion (all searches) |
285
+ | `state: unknown` | we stopped at the limit and cannot prove exhaustion (people/company `search`, `post`, `reactions`) |
286
+ | `next` | `jobs`: the `start` that continues this search; absent when the results ran out |
287
+ | `searches` / `duplicates` | `jobs` with several keyword sets: each set's own count and state, and how many repeats were merged |
288
+ | `unread` | `jobs --details` / `job`: jobs LinkedIn did not return in full — they are not closed, just unread |
231
289
  | `returnedCount` vs `claimedCount` | `claimed > 0` with `returned === 0` is a **failed fetch**, never "no results" |
232
290
  | `excludedCount` | ads and UI chrome deliberately dropped |
233
291
  | `unknownCount` / `unknownTypes` | **LinkedIn shipped a shape we don't recognise.** Data is still returned, but the parser is behind. Worth telling the user. |
package/README.md CHANGED
@@ -10,6 +10,9 @@ Sibling to [`x-relay`](../x-relay), [`github-relay`](../github-relay) and
10
10
  npm i -g linkedin-relay-mcp
11
11
  lnrelay login # mint a session from your own Chrome
12
12
  lnrelay search people "rust developer" # ranked rows: name, headline, location, url
13
+ lnrelay jobs "frontend engineer" "AI agent developer" --workplace remote --posted week --compact
14
+ # one merged job list across keyword sets
15
+ lnrelay job 4479248573 4475225930 # full jobs, with their apply links
13
16
  lnrelay feed --compact # your feed, with engagement counts
14
17
  lnrelay post <activity-urn> # a post's comment thread
15
18
  lnrelay sync connections
@@ -18,7 +21,9 @@ lnrelay local "rust" # then search it offline, free
18
21
 
19
22
  ## As an MCP server
20
23
 
21
- Thirteen read-only tools, so an agent does the reading. Writes are not on that surface at any price.
24
+ Nineteen read-only tools, so an agent does the reading. Writes are not on that surface at any price.
25
+ The bundled Claude Code skill (`.claude/skills/linkedin-relay/SKILL.md`) teaches an agent the
26
+ funnels, the budget, and how to read `meta` — including a step-by-step job-hunting recipe.
22
27
 
23
28
  ```bash
24
29
  claude mcp add linkedin-relay -s user -- bun "$(npm root -g)/linkedin-relay-mcp/dist/mcp-shim.js"
@@ -28,11 +33,15 @@ claude mcp add linkedin-relay -s user -- bun "$(npm root -g)/linkedin-relay-mcp/
28
33
 
29
34
  | | |
30
35
  |---|---|
31
- | `search` · `profile` · `feed` | the research surface — people, companies, jobs |
36
+ | `search` · `profile` · `feed` | the research surface — people and companies |
37
+ | `jobs` · `job` · `job-filters` | job search with every filter, several keyword sets merged in one call, and apply links |
32
38
  | `post` · `reactions` | a post's comment thread, and who engaged |
39
+ | `scheduled` · `experience` · `skills` | your queued posts, and your own roles and skills |
33
40
  | `sync` · `local` · `connections` · `my-posts` | fill a local cache, then query it for free |
34
41
  | `whoami` · `doctor` · `risk` · `budget` · `cache-status` | session, standing and spend |
35
- | `oauth` · `share` · `comment` · `react` · `delete` | writes — OAuth when available, private API otherwise |
42
+ | `share` · `comment` · `reply` · `edit` · `react` · `delete` | writes to your feed — OAuth when available, private API otherwise |
43
+ | `edit headline\|about` · `role` · `skill` | writes to your own profile |
44
+ | `oauth` · `approval` | the write credential, and how writes are approved |
36
45
  | `purge` | delete cached data |
37
46
 
38
47
  Every command prints a JSON envelope on stdout. `--compact` and `--fields a,b` trim the output;
@@ -56,8 +65,41 @@ private API using the same session your reads use. It breaches §8.2 and puts th
56
65
  the prompt says so, names the transport, and asks anyway. An expired OAuth token is never silently
57
66
  demoted to it. Reasoning and alternatives: **[docs/DECISION-writes.md](docs/DECISION-writes.md)**.
58
67
 
59
- Every write stops at an interactive terminal and shows exactly what it will send, over which
60
- surface, and how reversible it is — no TTY means no write and no network call. There is no `--yes`.
68
+ Every write shows exactly what it will send, over which surface, and how reversible it is, and is
69
+ approved the way **you** chose with `lnrelay approval set` (only at a real terminal):
70
+
71
+ | mode | how a write is approved |
72
+ |---|---|
73
+ | `interactive` (default) | a token typed at the terminal; no TTY means no write and no network call |
74
+ | `agent` | `--plan` returns a preview and a token; you approve it in chat; `--confirm <token>` runs exactly that content |
75
+ | `unattended` | runs as given |
76
+
77
+ There is no `--yes` and no environment variable. Every approval and outcome is logged to
78
+ `~/.lnrelay/writes.jsonl`.
79
+
80
+ ## Job hunting
81
+
82
+ ```bash
83
+ lnrelay job-filters "frontend engineer" --location "European Union" # every filter, its ids and counts
84
+ lnrelay jobs "frontend engineer" "AI agent developer" "agent engineer" \
85
+ --location "European Union" --workplace remote --posted week --limit 200 --compact
86
+ lnrelay job <id> <id> <id> # finalists in full, apply links
87
+ ```
88
+
89
+ - **Every filter the jobs page has:** location or exact geo id, distance, date posted, experience,
90
+ job type, workplace, Easy Apply, under 10 applicants, verified, in your network, fair chance,
91
+ company, industry, function, title, city, sort — and any other by its own name with
92
+ `--filter key=value`.
93
+ - **Several keyword sets, one list.** Each set is searched with the same filters and the results are
94
+ merged by job id: a job found by three sets comes back once, saying which. Live, four sets of 200
95
+ gave 800 rows, of which 280 were repeats.
96
+ - **100 jobs a call, both ways.** Searches ask for 100 results a page (the browser asks for 25), and
97
+ `job` / `--details` read up to 100 jobs in full in one batch call. 250 jobs with every apply link
98
+ took 6 calls.
99
+ - **The apply link** is the employer's own site (`external`) or LinkedIn's Easy Apply. This tool
100
+ finds jobs; it does not apply to them.
101
+ - Job hunting has its own daily budget — 150 search calls, 60 job reads — so it neither uses up nor
102
+ is stopped by people and company research.
61
103
 
62
104
  ## Design in one screen
63
105
 
@@ -76,7 +118,8 @@ surface, and how reversible it is — no TTY means no write and no network call.
76
118
  `claimedCount`; a claimed-but-empty response is an error, not "no results".
77
119
  - **Third-party data is not cached by default.** When retained, a 30-day TTL swept on the read path;
78
120
  on expiry the body dies and only an identity stub survives.
79
- - **Writes need a human at a terminal.** No TTY, no write — and no network call on that path.
121
+ - **Writes are approved under a mode only the owner can set** — at a terminal, behind a typed token.
122
+ An agent can plan a write but never choose its own approval.
80
123
  - **Single account by construction** — multi-account isn't disallowed, it's unrepresentable.
81
124
 
82
125
  Full reasoning: **[docs/DESIGN.md](docs/DESIGN.md)** · Engine internals:
@@ -109,7 +152,7 @@ position under argument. The convergence and the full disagreement record are in
109
152
  ## Development
110
153
 
111
154
  ```bash
112
- bun run check # typecheck + lint + 366 tests
155
+ bun run check # typecheck + lint + tests
113
156
  bun run build
114
157
  bun run dev -- <command>
115
158
  ```
package/dist/cli.js CHANGED
@@ -3279,6 +3279,7 @@ function compactJob(j) {
3279
3279
  if (j.promoted) parts.push("promoted");
3280
3280
  parts.push(j.salary);
3281
3281
  if (j.apply?.url !== void 0) parts.push(`apply: ${j.apply.url}`);
3282
+ if (j.matched !== void 0) parts.push(`matched: ${j.matched.join(" + ")}`);
3282
3283
  return parts.filter((p) => p !== void 0 && p !== "").map((p) => p.replaceAll(" | ", " / ")).join(" | ");
3283
3284
  }
3284
3285
  function shape(rows, opts, line) {
@@ -3287,9 +3288,17 @@ function shape(rows, opts, line) {
3287
3288
  return project(rows, opts.fields);
3288
3289
  return rows;
3289
3290
  }
3290
- function queryOf(req, filters) {
3291
+ function keywordSets(keywords) {
3292
+ const given = keywords === void 0 ? [] : Array.isArray(keywords) ? keywords : [keywords];
3293
+ const out = [];
3294
+ for (const k of given.map((g) => g.trim())) {
3295
+ if (k !== "" && !out.some((o) => o.toLowerCase() === k.toLowerCase())) out.push(k);
3296
+ }
3297
+ return out;
3298
+ }
3299
+ function queryOf(req, filters, keywords) {
3291
3300
  return {
3292
- ...req.keywords ? { keywords: req.keywords } : {},
3301
+ ...keywords ? { keywords } : {},
3293
3302
  ...req.location ? { location: req.location } : {},
3294
3303
  ...req.geoId ? { geoId: req.geoId } : {},
3295
3304
  filters
@@ -3310,7 +3319,9 @@ async function collect(get, query, first, want) {
3310
3319
  for (const [k, n] of Object.entries(page.unknownTypes))
3311
3320
  out.unknownTypes[k] = (out.unknownTypes[k] ?? 0) + n;
3312
3321
  const fresh = page.jobs.filter((j) => !out.jobs.some((x) => x.id === j.id));
3313
- out.jobs.push(...fresh.slice(0, want - out.jobs.length));
3322
+ const room = want - out.jobs.length;
3323
+ out.jobs.push(...fresh.slice(0, room));
3324
+ if (fresh.length > room) break;
3314
3325
  if (page.jobs.length === 0 || out.total !== void 0 && start + PAGE_SIZE2 >= out.total) {
3315
3326
  out.exhausted = true;
3316
3327
  break;
@@ -3342,14 +3353,87 @@ async function addDetails(get, rows, withDescription) {
3342
3353
  const unread = rows.filter((r) => !read.jobs.has(r.id)).length;
3343
3354
  return read.stoppedBy === void 0 ? { unread } : { unread, stoppedBy: read.stoppedBy };
3344
3355
  }
3356
+ function reportOf(keywords, found, first) {
3357
+ const report = {
3358
+ ...keywords !== void 0 ? { keywords } : {},
3359
+ claimedCount: found.total,
3360
+ returnedCount: found.jobs.length,
3361
+ state: found.stoppedBy === void 0 && found.exhausted ? "complete" : "partial"
3362
+ };
3363
+ if (!found.exhausted) report.next = first + found.jobs.length;
3364
+ if (found.stoppedBy !== void 0) report.stoppedBy = found.stoppedBy;
3365
+ return report;
3366
+ }
3367
+ function mergeInto(out, byId, jobs, keywords) {
3368
+ for (const job of jobs) {
3369
+ const seen = byId.get(job.id);
3370
+ if (seen !== void 0) {
3371
+ out.duplicates++;
3372
+ if (keywords !== void 0) seen.matched?.push(keywords);
3373
+ continue;
3374
+ }
3375
+ const row = keywords !== void 0 ? { ...job, matched: [keywords] } : job;
3376
+ byId.set(job.id, row);
3377
+ out.rows.push(row);
3378
+ }
3379
+ }
3380
+ async function searchAll(get, sets, base, first, want) {
3381
+ const out = { rows: [], searches: [], duplicates: 0, unknownTypes: {} };
3382
+ const byId = /* @__PURE__ */ new Map();
3383
+ for (const keywords of sets) {
3384
+ const found = await collect(get, { ...base, ...keywords ? { keywords } : {} }, first, want);
3385
+ if ("ok" in found) {
3386
+ out.failure = out.failure ?? found;
3387
+ out.searches.push({
3388
+ ...keywords !== void 0 ? { keywords } : {},
3389
+ returnedCount: 0,
3390
+ state: "failed",
3391
+ stoppedBy: found.code
3392
+ });
3393
+ continue;
3394
+ }
3395
+ out.searches.push(reportOf(keywords, found, first));
3396
+ out.resolved = out.resolved ?? found.resolved;
3397
+ for (const [k, n] of Object.entries(found.unknownTypes))
3398
+ out.unknownTypes[k] = (out.unknownTypes[k] ?? 0) + n;
3399
+ mergeInto(out, byId, found.jobs, sets.length > 1 ? keywords : void 0);
3400
+ }
3401
+ if (sets.length > 1) out.rows.sort((x, y) => (y.matched?.length ?? 0) - (x.matched?.length ?? 0));
3402
+ return out;
3403
+ }
3404
+ function metaOf(merged, single, first, unread, readStop) {
3405
+ const searched = merged.searches;
3406
+ const allComplete = searched.every((r) => r.state === "complete");
3407
+ const meta = {
3408
+ state: allComplete && unread === 0 && readStop === void 0 ? "complete" : "partial",
3409
+ operation: "jobs"
3410
+ };
3411
+ if (single) {
3412
+ const { keywords: _k, state: _s, ...report } = searched[0];
3413
+ Object.assign(meta, report, { start: first });
3414
+ if (readStop !== void 0) meta.stoppedBy = meta.stoppedBy ?? readStop;
3415
+ } else {
3416
+ Object.assign(meta, {
3417
+ returnedCount: merged.rows.length,
3418
+ duplicates: merged.duplicates,
3419
+ start: first,
3420
+ searches: searched,
3421
+ ...readStop !== void 0 ? { stoppedBy: readStop } : {}
3422
+ });
3423
+ }
3424
+ if (unread > 0) meta.unread = unread;
3425
+ if (Object.keys(merged.unknownTypes).length > 0) meta.unknownTypes = merged.unknownTypes;
3426
+ return meta;
3427
+ }
3345
3428
  async function runJobs(req, opts = {}, fetch2) {
3346
- const hasQuery = [req.keywords, req.location, req.geoId].some((v) => v !== void 0 && v !== "");
3429
+ const sets = keywordSets(req.keywords);
3430
+ const hasQuery = sets.length > 0 || [req.location, req.geoId].some((v) => v !== void 0 && v !== "");
3347
3431
  if (!hasQuery) {
3348
3432
  return err(
3349
3433
  "jobs",
3350
3434
  "INVALID_INPUT",
3351
3435
  "give keywords, a location, or both",
3352
- 'lnrelay jobs "<keywords>" [--location "<place>" | --geo <id>] [filters]'
3436
+ 'lnrelay jobs "<keywords>" ["<more keywords>" ...] [--location "<place>" | --geo <id>] [filters]'
3353
3437
  );
3354
3438
  }
3355
3439
  const selection2 = jobFilterSelection(req.filter ?? {});
@@ -3359,31 +3443,26 @@ async function runJobs(req, opts = {}, fetch2) {
3359
3443
  if (typeof get !== "function") return get;
3360
3444
  const first = Math.max(0, req.start ?? 0);
3361
3445
  const want = Math.max(1, Math.min(req.limit, MAX_RESULTS - first));
3362
- const query = queryOf(req, selection2.filters);
3363
- const found = await collect(get, query, first, want);
3364
- if ("ok" in found) return err("jobs", found.code, found.message, found.hint);
3446
+ const base = queryOf(req, selection2.filters);
3447
+ const merged = await searchAll(get, sets.length > 0 ? sets : [void 0], base, first, want);
3448
+ if (merged.rows.length === 0 && merged.failure !== void 0) {
3449
+ const f = merged.failure;
3450
+ return err("jobs", f.code, f.message, f.hint);
3451
+ }
3365
3452
  let unread = 0;
3453
+ let readStop;
3366
3454
  if (req.details === true) {
3367
- const added = await addDetails(get, found.jobs, req.description === true);
3368
- found.stoppedBy = found.stoppedBy ?? added.stoppedBy;
3455
+ const added = await addDetails(get, merged.rows, req.description === true);
3369
3456
  unread = added.unread;
3457
+ readStop = added.stoppedBy;
3370
3458
  }
3371
- const { jobs, stoppedBy, exhausted, unknownTypes } = found;
3459
+ const single = sets.length <= 1;
3460
+ const meta = metaOf(merged, single, first, unread, readStop);
3372
3461
  return ok("jobs", {
3373
- query,
3374
- ...found.resolved !== void 0 ? { location: found.resolved } : {},
3375
- items: shape(jobs, opts, compactJob),
3376
- meta: {
3377
- state: stoppedBy === void 0 && exhausted && unread === 0 ? "complete" : "partial",
3378
- operation: "jobs",
3379
- claimedCount: found.total,
3380
- returnedCount: jobs.length,
3381
- start: first,
3382
- next: exhausted ? void 0 : first + jobs.length,
3383
- ...stoppedBy !== void 0 ? { stoppedBy } : {},
3384
- ...unread > 0 ? { unread } : {},
3385
- ...Object.keys(unknownTypes).length > 0 ? { unknownTypes } : {}
3386
- }
3462
+ query: { ...base, ...sets.length > 0 ? { keywords: single ? sets[0] : sets } : {} },
3463
+ ...merged.resolved !== void 0 ? { location: merged.resolved } : {},
3464
+ items: shape(merged.rows, opts, compactJob),
3465
+ meta
3387
3466
  });
3388
3467
  }
3389
3468
  async function runJob(input, opts = {}, fetch2) {
@@ -3429,11 +3508,24 @@ async function runJob(input, opts = {}, fetch2) {
3429
3508
  });
3430
3509
  }
3431
3510
  async function runJobFilters(req, opts = {}, fetch2) {
3511
+ const sets = keywordSets(req.keywords);
3512
+ if (sets.length > 1) {
3513
+ return err(
3514
+ "job-filters",
3515
+ "INVALID_INPUT",
3516
+ "job-filters takes one keyword set: its counts belong to that one query",
3517
+ 'lnrelay job-filters "<keywords>" [filters]'
3518
+ );
3519
+ }
3432
3520
  const selection2 = jobFilterSelection(req.filter ?? {});
3433
3521
  if (!selection2.ok) return err("job-filters", selection2.code, selection2.message);
3434
3522
  const get = fetch2 ?? liveFetch("job-filters", opts.quiet === true);
3435
3523
  if (typeof get !== "function") return get;
3436
- const url = jobFiltersUrl({ ...queryOf(req, selection2.filters), start: 0, count: PAGE_SIZE2 });
3524
+ const url = jobFiltersUrl({
3525
+ ...queryOf(req, selection2.filters, sets[0]),
3526
+ start: 0,
3527
+ count: PAGE_SIZE2
3528
+ });
3437
3529
  const res = await get(url, "jobSearch");
3438
3530
  const parsed = res.ok ? parseJobFilters(res.json) : res;
3439
3531
  if (!parsed.ok) return err("job-filters", parsed.code, parsed.message, parsed.hint);
@@ -4110,7 +4202,7 @@ var COMMANDS = [
4110
4202
  {
4111
4203
  name: "search",
4112
4204
  cost: "cheap \u2014 the net",
4113
- summary: "Search people, companies or jobs. Cast wide, then deep-read the finalists.",
4205
+ summary: "Search people or companies. Cast wide, then deep-read the finalists. Jobs: `jobs`.",
4114
4206
  usage: 'lnrelay search people|companies|jobs "<query>" [--limit N] (jobs: see `jobs`)\n [--compact | --fields a,b,c] [--retain] [--raw]',
4115
4207
  audience: ["cli", "mcp"],
4116
4208
  risk: "read",
@@ -4120,7 +4212,7 @@ var COMMANDS = [
4120
4212
  name: "jobs",
4121
4213
  cost: "1 job-search call per 100 jobs; --details adds 1 job read per 100 jobs",
4122
4214
  summary: "Job search with every filter the jobs page has. Cards carry id, title, company, place, workplace, listed date, Easy Apply. Read finalists with `job`.",
4123
- usage: 'lnrelay jobs "<keywords>" [--location "<place>" | --geo <id>] [--distance <miles>]\n [--posted 24h|week|month|<N>h|<N>d] [--experience internship,entry,associate,\n mid-senior,director,executive] [--type full-time,part-time,contract,temporary,\n volunteer,internship,other] [--workplace on-site,remote,hybrid] [--easy-apply]\n [--under-10] [--verified] [--in-network] [--fair-chance] [--company <ids>]\n [--industry <ids>] [--function <codes>] [--title <ids>] [--place <geo-ids>]\n [--filter key=v1,v2 ...] [--sort recent|relevant] [--limit N] [--start N]\n [--details [--description]] [--compact | --fields a,b,c]\n Ids for --company/--industry/--title/--place/--filter come from `job-filters`.\n The resolved place is in data.location: check it, "Vienna" may resolve narrow.',
4215
+ usage: 'lnrelay jobs "<keywords>" ["<more keywords>" ...] [--location "<place>" | --geo <id>]\n [--distance <miles>]\n [--posted 24h|week|month|<N>h|<N>d] [--experience internship,entry,associate,\n mid-senior,director,executive] [--type full-time,part-time,contract,temporary,\n volunteer,internship,other] [--workplace on-site,remote,hybrid] [--easy-apply]\n [--under-10] [--verified] [--in-network] [--fair-chance] [--company <ids>]\n [--industry <ids>] [--function <codes>] [--title <ids>] [--place <geo-ids>]\n [--filter key=v1,v2 ...] [--sort recent|relevant] [--limit N] [--start N]\n [--details [--description]] [--compact | --fields a,b,c]\n Ids for --company/--industry/--title/--place/--filter come from `job-filters`.\n The resolved place is in data.location: check it, "Vienna" may resolve narrow.',
4124
4216
  audience: ["cli", "mcp"],
4125
4217
  risk: "read",
4126
4218
  implemented: true
@@ -6675,8 +6767,7 @@ function jobsRequest(args) {
6675
6767
  const sort = str(args, "sort");
6676
6768
  if (sort !== void 0) filter.sort = sort;
6677
6769
  const req = { limit: num(args, "limit") ?? 25, filter };
6678
- const keywords = args.positionals[0];
6679
- if (keywords !== void 0) req.keywords = keywords;
6770
+ if (args.positionals.length > 0) req.keywords = [...args.positionals];
6680
6771
  const location = str(args, "location");
6681
6772
  if (location !== void 0) req.location = location;
6682
6773
  const geo = str(args, "geo");