@curviate/cli 0.15.0 → 0.15.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,63 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
6
  Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html):
7
7
  a new command or flag is a minor; a breaking command/flag/exit-code change is a major; a fix is a patch.
8
8
 
9
+ ## [0.15.1] - 2026-07-11
10
+
11
+ A patch release of agent-experience (AX) and developer-experience (DX)
12
+ improvements: clearer errors and help, a modest default pacing on `--all`
13
+ streams, one back-compatible reaction-signature unification, and a
14
+ `profile endorse` fix. No breaking changes.
15
+
16
+ ### Added
17
+
18
+ - **Successor hints for removed/renamed commands.** Reaching for a command that
19
+ moved or was removed in 0.15.0 — `post list`, `post comment`/`comments`,
20
+ `connect respond`, `profile connections`, `account connect-link`/`reconnect-link`/`reconnect`,
21
+ `inbox sync`/`sync-chat`, `recruiter add-candidate`/`project-jobs`/`sync`,
22
+ `sales-nav sync`, `webhook state-diff`, `company followers` — now prints a
23
+ one-line "did you mean" pointer to the replacement instead of a bare
24
+ "unknown command". The exit code is unchanged (2).
25
+ - **`--all` NDJSON-mode notice.** When `--all` streaming engages, a one-line
26
+ notice on stderr makes the format switch explicit (`--all` streams NDJSON —
27
+ one object per line — not the `{items, cursor}` envelope), so an agent
28
+ pattern-matching the plain-mode shape does not mis-parse the stream.
29
+ - **`--page-delay <ms>` and default `--all` pacing.** `--all` now pauses a
30
+ modest default between page fetches, keeping a long stream under the platform
31
+ rate gate. `--page-delay <ms>` overrides it (pass `0` to disable).
32
+ - **`job list --state ALL`.** A best-effort client-side union across every state
33
+ (DRAFT/OPEN/CLOSED/REVIEW/SUSPENDED): each state is queried, re-filtered
34
+ against its own state, then merged and de-duplicated by id. There is no
35
+ unified cursor — each state is walked independently and `--max-pages` applies
36
+ per state.
37
+ - **`--fields` unknown-field warning.** Projecting a field that matches nothing
38
+ on the response now emits one stderr warning naming the unmatched fields and
39
+ listing the available keys, instead of silently returning `{}`. The output is
40
+ unchanged — the known fields still project.
41
+
42
+ ### Changed
43
+
44
+ - **Reaction commands unified on the positional form.** `post react <post_id>
45
+ <reaction>` and `message react <chat_id> <message_id> <emoji>` now take the
46
+ reaction/emoji as a positional argument, matching `comment react`/`unreact`
47
+ and `post unreact`. The previous `--reaction` and `--emoji` flags still work as
48
+ deprecated aliases (no breaking removal). A missing value is now a usage error
49
+ (exit 2) rather than a silent empty reaction.
50
+ - **Constraint discoverability in help.** `job create`/`job update` help now
51
+ states the 200-character minimum on `--description` explicitly, and
52
+ `job publish --budget-amount` notes it must be non-negative.
53
+ - **List-lag notes.** `post user-posts`, `comment list`, `inbox messages`, and
54
+ `connect sent`/`received` help now note that a very recent create/delete may
55
+ take a few minutes to appear or clear (LinkedIn-side indexing), and that a
56
+ direct `get` reflects a change immediately.
57
+
58
+ ### Fixed
59
+
60
+ - **`profile endorse <slug|url>`** now resolves the handle to the member's
61
+ provider id before endorsing (via a contact-safe profile read), matching
62
+ `profile follow`/`unfollow`. Previously a slug or URL 404'd because the
63
+ endorse endpoint accepts only the provider id; the provider-id form was
64
+ unaffected.
65
+
9
66
  ## [0.15.0] - 2026-07-11
10
67
 
11
68
  Full v2 API-surface parity — the coupled release with `@curviate/sdk` 0.15.0. A large
@@ -17,20 +17,21 @@ import {
17
17
  slimAccountListItem
18
18
  } from "./chunk-45KHSWCV.js";
19
19
  import {
20
+ pageDelayFromFlags,
20
21
  streamAll
21
- } from "./chunk-DNTRQZBT.js";
22
+ } from "./chunk-EEMJDJ4W.js";
22
23
  import {
23
24
  createClient,
24
25
  renderError,
25
26
  renderSuccess,
26
27
  renderUnexpectedError,
27
28
  resolveEffectiveConfig
28
- } from "./chunk-JXF47TRY.js";
29
+ } from "./chunk-M33MI53G.js";
29
30
  import {
30
31
  GLOBAL_FLAGS,
31
32
  READ_SINGLE_FLAGS,
32
33
  WRITE_SINGLE_FLAGS
33
- } from "./chunk-4JHGVY7R.js";
34
+ } from "./chunk-TMU3CSPR.js";
34
35
 
35
36
  // src/commands/account.ts
36
37
  import { defineCommand } from "citty";
@@ -225,7 +226,8 @@ async function runAccountList(client, flags, out) {
225
226
  const fn = (p) => client.accounts.list(p);
226
227
  for await (const item of streamAll(fn, params, {
227
228
  maxPages,
228
- out
229
+ out,
230
+ pageDelayMs: pageDelayFromFlags(flags)
229
231
  })) {
230
232
  const projected = outOpts.verbose ? item : slimAccountListItem(item);
231
233
  out.stdout.write(JSON.stringify(projected) + "\n");
@@ -12,11 +12,27 @@ function truncationProseNote(pagesFetched) {
12
12
  return `Streaming truncated at ${pagesFetched} page(s). Use --all --max-pages or --cursor for manual paging.
13
13
  `;
14
14
  }
15
+ function ndjsonModeNotice() {
16
+ return "--all streams NDJSON: one object per line; the {items,cursor} envelope is not used\n";
17
+ }
18
+ var DEFAULT_PAGE_DELAY_MS = 400;
19
+ function pageDelayFrom(raw) {
20
+ if (raw === void 0 || raw === "") return void 0;
21
+ const n = Number(raw);
22
+ if (!Number.isInteger(n) || n < 0) return void 0;
23
+ return n;
24
+ }
25
+ function pageDelayFromFlags(flags) {
26
+ return pageDelayFrom(flags["page-delay"]);
27
+ }
28
+ var realSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
15
29
  function truncationSentinelLine(pagesFetched, hasMore) {
16
30
  return JSON.stringify({ object: "stream_truncated", pages_fetched: pagesFetched, has_more: hasMore }) + "\n";
17
31
  }
18
32
  async function* streamAll(fn, params, opts = {}) {
19
33
  const maxPages = opts.maxPages ?? 100;
34
+ const pageDelayMs = opts.pageDelayMs ?? DEFAULT_PAGE_DELAY_MS;
35
+ const sleep = opts.sleep ?? realSleep;
20
36
  let cursor = void 0;
21
37
  let pageCount = 0;
22
38
  let firstPage = true;
@@ -30,7 +46,10 @@ async function* streamAll(fn, params, opts = {}) {
30
46
  "--all requires a paginated method (response must have `items` or `data` array). Remove --all for non-list commands."
31
47
  );
32
48
  }
33
- firstPage = false;
49
+ if (firstPage) {
50
+ if (opts.out) opts.out.stderr.write(ndjsonModeNotice());
51
+ firstPage = false;
52
+ }
34
53
  if (Array.isArray(items)) {
35
54
  for (const item of items) {
36
55
  yield item;
@@ -49,9 +68,13 @@ async function* streamAll(fn, params, opts = {}) {
49
68
  }
50
69
  break;
51
70
  }
71
+ if (pageDelayMs > 0) await sleep(pageDelayMs);
52
72
  }
53
73
  }
54
74
 
55
75
  export {
76
+ ndjsonModeNotice,
77
+ DEFAULT_PAGE_DELAY_MS,
78
+ pageDelayFromFlags,
56
79
  streamAll
57
80
  };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readConfig
4
- } from "./chunk-4JHGVY7R.js";
4
+ } from "./chunk-TMU3CSPR.js";
5
5
 
6
6
  // src/lib/resolve.ts
7
7
  var DEFAULT_BASE_URL = "https://api.curviate.com";
@@ -73,10 +73,42 @@ function applyProjection(data, fields) {
73
73
  }
74
74
  return data;
75
75
  }
76
+ function firstProjectableItem(data) {
77
+ const isPlainObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
78
+ if (Array.isArray(data)) {
79
+ return data.length > 0 && isPlainObject(data[0]) ? data[0] : null;
80
+ }
81
+ if (isPlainObject(data)) {
82
+ const items = data["items"];
83
+ if (Array.isArray(items)) {
84
+ return items.length > 0 && isPlainObject(items[0]) ? items[0] : null;
85
+ }
86
+ return data;
87
+ }
88
+ return null;
89
+ }
90
+ function detectUnknownFields(data, fields) {
91
+ if (fields.length === 0) return null;
92
+ const first = firstProjectableItem(data);
93
+ if (first === null) return null;
94
+ const available = Object.keys(first);
95
+ const unknown = fields.filter((f) => {
96
+ const topKey = f.split(".")[0];
97
+ return !Object.prototype.hasOwnProperty.call(first, topKey);
98
+ });
99
+ return unknown.length > 0 ? { unknown, available } : null;
100
+ }
76
101
  function renderSuccess(data, opts, out) {
77
102
  const json = isJsonMode(opts);
78
103
  const fields = opts.fields ? opts.fields.split(",").map((f) => f.trim()).filter(Boolean) : [];
79
104
  const slimmed = !opts.verbose && opts.slim ? opts.slim(data) : data;
105
+ const unknownFields = detectUnknownFields(slimmed, fields);
106
+ if (unknownFields) {
107
+ out.stderr.write(
108
+ `warning: --fields not present on the response: ${unknownFields.unknown.join(", ")}. Available keys: ${unknownFields.available.join(", ")}.
109
+ `
110
+ );
111
+ }
80
112
  const projected = applyProjection(slimmed, fields);
81
113
  if (json) {
82
114
  out.stdout.write(JSON.stringify(projected) + "\n");
@@ -176,6 +176,10 @@ var GLOBAL_FLAGS = {
176
176
  type: "string",
177
177
  description: "Maximum number of pages to fetch when --all is used."
178
178
  },
179
+ "page-delay": {
180
+ type: "string",
181
+ description: "Milliseconds to pause between pages when --all is used (default 400; pass 0 to disable). A modest delay keeps a long stream under the platform rate gate."
182
+ },
179
183
  preview: {
180
184
  type: "boolean",
181
185
  description: "Render the request that would be sent without calling the API.",
package/dist/cli.js CHANGED
@@ -9,6 +9,47 @@ import { createRequire } from "module";
9
9
 
10
10
  // src/dispatch.ts
11
11
  import { runCommand } from "citty";
12
+ var REMOVED_COMMANDS = {
13
+ post: {
14
+ list: "`post list` was removed \u2014 use `post user-posts <user_id>` (accepts `me`).",
15
+ comment: "post comments are their own group now \u2014 use `comment add <post_id> <text>`.",
16
+ comments: "post comments are their own group now \u2014 use `comment list <post_id>`."
17
+ },
18
+ connect: {
19
+ respond: "`connect respond` was split \u2014 use `connect accept <id>` or `connect decline <id>`."
20
+ },
21
+ profile: {
22
+ connections: "`profile connections` was renamed \u2014 use `profile relations`."
23
+ },
24
+ account: {
25
+ "connect-link": "`account connect-link` was removed \u2014 use `account link [--account-id <id>]`.",
26
+ "reconnect-link": "`account reconnect-link` was removed \u2014 use `account link [--account-id <id>]`.",
27
+ reconnect: "`account reconnect` was removed \u2014 use `account link [--account-id <id>]`."
28
+ },
29
+ inbox: {
30
+ sync: "`inbox sync` was removed \u2014 history syncs automatically; just read `inbox messages <chat_id>`.",
31
+ "sync-chat": "`inbox sync-chat` was removed \u2014 history syncs automatically; just read `inbox messages <chat_id>`."
32
+ },
33
+ recruiter: {
34
+ "add-candidate": "`recruiter add-candidate` was renamed \u2014 use `recruiter save-candidate <project_id> --stage-id <id> --candidate-id <id>`.",
35
+ "project-jobs": "`recruiter project-jobs` was renamed \u2014 use `recruiter project-job get <project_id>`.",
36
+ sync: "`recruiter sync` was removed \u2014 Recruiter data syncs automatically now.",
37
+ "add-applicant": "`recruiter add-applicant` was removed with no replacement.",
38
+ "reject-applicant": "`recruiter reject-applicant` was removed with no replacement."
39
+ },
40
+ "sales-nav": {
41
+ sync: "`sales-nav sync` was removed \u2014 Sales Navigator data syncs automatically now."
42
+ },
43
+ webhook: {
44
+ "state-diff": "`webhook state-diff` was removed with no replacement."
45
+ },
46
+ company: {
47
+ followers: "`company followers` was removed with no replacement."
48
+ }
49
+ };
50
+ function successorHint(group, token) {
51
+ return REMOVED_COMMANDS[group]?.[token] ?? null;
52
+ }
12
53
  async function resolveValue(input) {
13
54
  return typeof input === "function" ? input() : input;
14
55
  }
@@ -108,8 +149,10 @@ function hasEmptyFields(rawArgs) {
108
149
  }
109
150
  return false;
110
151
  }
111
- function usageError(message) {
152
+ function usageError(message, hint) {
112
153
  process.stderr.write(`error: ${message}
154
+ `);
155
+ if (hint) process.stderr.write(`hint: ${hint}
113
156
  `);
114
157
  process.stderr.write("Run `curviate --help` for usage.\n");
115
158
  process.exit(2);
@@ -124,6 +167,12 @@ async function resolveLeaf(cmd, rawArgs) {
124
167
  const sub = await resolveValue(subCommands[token]);
125
168
  return resolveLeaf(sub, rawArgs.slice(idx + 1));
126
169
  }
170
+ if (token !== void 0) {
171
+ const hint = successorHint(await nodeName(cmd), token);
172
+ if (hint) {
173
+ usageError(`unknown command \`${token}\``, hint);
174
+ }
175
+ }
127
176
  if (token !== void 0 && hasBarePositional) {
128
177
  const booleanFlags = await booleanFlagNames(cmd);
129
178
  const positionals = positionalTokens(rawArgs, booleanFlags);
@@ -201,24 +250,24 @@ var main = defineCommand({
201
250
  // Subcommand registry — names and descriptions are static for help rendering;
202
251
  // the handler implementation is loaded lazily on first invocation.
203
252
  subCommands: {
204
- login: () => import("./login-BBVQLXM7.js").then((m) => m.loginCommand),
205
- config: () => import("./config-Q2AEWSEC.js").then((m) => m.configCommand),
253
+ login: () => import("./login-MFB45PVZ.js").then((m) => m.loginCommand),
254
+ config: () => import("./config-P5CPF5WC.js").then((m) => m.configCommand),
206
255
  // ---------------------------------------------------------------------------
207
256
  // Noun groups — lazy-loaded on first invocation.
208
257
  // ---------------------------------------------------------------------------
209
- profile: () => import("./profile-I6YMVXSS.js").then((m) => m.profileCommand),
210
- company: () => import("./company-LGID3SK3.js").then((m) => m.companyCommand),
211
- job: () => import("./job-TFTTCP5B.js").then((m) => m.jobCommand),
212
- connect: () => import("./connect-A7HEKKEE.js").then((m) => m.connectCommand),
213
- search: () => import("./search-6C72M563.js").then((m) => m.searchCommand),
214
- inbox: () => import("./inbox-44JRTJAP.js").then((m) => m.inboxCommand),
215
- message: () => import("./message-FOJTDPW3.js").then((m) => m.messageCommand),
216
- post: () => import("./post-FC6NZXM5.js").then((m) => m.postCommand),
217
- comment: () => import("./comment-Y5IU42CR.js").then((m) => m.commentCommand),
218
- account: () => import("./account-VB52GIUA.js").then((m) => m.accountCommand),
219
- webhook: () => import("./webhook-NSXEIU44.js").then((m) => m.webhookCommand),
220
- "sales-nav": () => import("./sales-nav-6IYKQ4TC.js").then((m) => m.salesNavCommand),
221
- recruiter: () => import("./recruiter-BHT5OJD7.js").then((m) => m.recruiterCommand)
258
+ profile: () => import("./profile-57RJEL7H.js").then((m) => m.profileCommand),
259
+ company: () => import("./company-IYTMW64G.js").then((m) => m.companyCommand),
260
+ job: () => import("./job-YARGTHUY.js").then((m) => m.jobCommand),
261
+ connect: () => import("./connect-TTJHMBUP.js").then((m) => m.connectCommand),
262
+ search: () => import("./search-RD4TXNV7.js").then((m) => m.searchCommand),
263
+ inbox: () => import("./inbox-EOOGJ3ZN.js").then((m) => m.inboxCommand),
264
+ message: () => import("./message-2DLIQIE6.js").then((m) => m.messageCommand),
265
+ post: () => import("./post-GRIJ7X52.js").then((m) => m.postCommand),
266
+ comment: () => import("./comment-NCDXERSI.js").then((m) => m.commentCommand),
267
+ account: () => import("./account-FM473HEK.js").then((m) => m.accountCommand),
268
+ webhook: () => import("./webhook-CEP7SGP5.js").then((m) => m.webhookCommand),
269
+ "sales-nav": () => import("./sales-nav-NUMEYOEO.js").then((m) => m.salesNavCommand),
270
+ recruiter: () => import("./recruiter-CTYH7AYG.js").then((m) => m.recruiterCommand)
222
271
  },
223
272
  async run() {
224
273
  const { runMain } = await import("citty");
@@ -16,19 +16,20 @@ import {
16
16
  } from "./chunk-R3VLWLVV.js";
17
17
  import "./chunk-DMQZEPQE.js";
18
18
  import {
19
+ pageDelayFromFlags,
19
20
  streamAll
20
- } from "./chunk-DNTRQZBT.js";
21
+ } from "./chunk-EEMJDJ4W.js";
21
22
  import {
22
23
  createClient,
23
24
  renderError,
24
25
  renderSuccess,
25
26
  renderUnexpectedError,
26
27
  resolveEffectiveConfig
27
- } from "./chunk-JXF47TRY.js";
28
+ } from "./chunk-M33MI53G.js";
28
29
  import {
29
30
  GLOBAL_FLAGS,
30
31
  WRITE_SINGLE_FLAGS
31
- } from "./chunk-4JHGVY7R.js";
32
+ } from "./chunk-TMU3CSPR.js";
32
33
 
33
34
  // src/commands/comment.ts
34
35
  import { defineCommand } from "citty";
@@ -103,7 +104,8 @@ async function runCommentList(client, flags, out) {
103
104
  const fn = (p) => ns.posts.listComments(postId, p);
104
105
  for await (const item of streamAll(fn, params, {
105
106
  maxPages,
106
- out
107
+ out,
108
+ pageDelayMs: pageDelayFromFlags(flags)
107
109
  })) {
108
110
  out.stdout.write(JSON.stringify(item) + "\n");
109
111
  }
@@ -130,7 +132,8 @@ async function runCommentReplies(client, flags, out) {
130
132
  const fn = (p) => ns.comments.listReplies(postId, commentId, p);
131
133
  for await (const item of streamAll(fn, params, {
132
134
  maxPages,
133
- out
135
+ out,
136
+ pageDelayMs: pageDelayFromFlags(flags)
134
137
  })) {
135
138
  out.stdout.write(JSON.stringify(item) + "\n");
136
139
  }
@@ -157,7 +160,8 @@ async function runCommentReactions(client, flags, out) {
157
160
  const fn = (p) => ns.comments.listReactions(postId, commentId, p);
158
161
  for await (const item of streamAll(fn, params, {
159
162
  maxPages,
160
- out
163
+ out,
164
+ pageDelayMs: pageDelayFromFlags(flags)
161
165
  })) {
162
166
  out.stdout.write(JSON.stringify(item) + "\n");
163
167
  }
@@ -189,7 +193,8 @@ async function runCommentUser(client, flags, out) {
189
193
  const fn = (p) => ns.comments.listUserComments(userId, p);
190
194
  for await (const item of streamAll(fn, params, {
191
195
  maxPages,
192
- out
196
+ out,
197
+ pageDelayMs: pageDelayFromFlags(flags)
193
198
  })) {
194
199
  out.stdout.write(JSON.stringify(item) + "\n");
195
200
  }
@@ -401,7 +406,7 @@ async function withClient(flags, fn) {
401
406
  await fn(client, { ...flags, account: flags.account ?? cfg.account }, out);
402
407
  }
403
408
  var commentListCommand = defineCommand({
404
- meta: { name: "list", description: "List the comments on a post." },
409
+ meta: { name: "list", description: "List the comments on a post. A very recent add/delete may take a few minutes to appear or clear here (LinkedIn-side indexing)." },
405
410
  args: {
406
411
  ...GLOBAL_FLAGS,
407
412
  postId: { type: "positional", description: "Post id (or share URN) to list comments for." }
@@ -9,18 +9,19 @@ import {
9
9
  resolveIdentifier
10
10
  } from "./chunk-DMQZEPQE.js";
11
11
  import {
12
+ pageDelayFromFlags,
12
13
  streamAll
13
- } from "./chunk-DNTRQZBT.js";
14
+ } from "./chunk-EEMJDJ4W.js";
14
15
  import {
15
16
  createClient,
16
17
  renderError,
17
18
  renderSuccess,
18
19
  renderUnexpectedError,
19
20
  resolveEffectiveConfig
20
- } from "./chunk-JXF47TRY.js";
21
+ } from "./chunk-M33MI53G.js";
21
22
  import {
22
23
  GLOBAL_FLAGS
23
- } from "./chunk-4JHGVY7R.js";
24
+ } from "./chunk-TMU3CSPR.js";
24
25
 
25
26
  // src/commands/company.ts
26
27
  import { defineCommand } from "citty";
@@ -105,7 +106,8 @@ async function runCompanyEmployees(client, flags, out) {
105
106
  const fn = (p) => ns.companies.employees(identifier, p);
106
107
  for await (const item of streamAll(fn, params, {
107
108
  maxPages,
108
- out
109
+ out,
110
+ pageDelayMs: pageDelayFromFlags(flags)
109
111
  })) {
110
112
  out.stdout.write(JSON.stringify(item) + "\n");
111
113
  }
@@ -132,7 +134,8 @@ async function runCompanyPosts(client, flags, out) {
132
134
  const fn = (p) => ns.companies.posts(identifier, p);
133
135
  for await (const item of streamAll(fn, params, {
134
136
  maxPages,
135
- out
137
+ out,
138
+ pageDelayMs: pageDelayFromFlags(flags)
136
139
  })) {
137
140
  out.stdout.write(JSON.stringify(item) + "\n");
138
141
  }
@@ -160,7 +163,8 @@ async function runCompanyJobs(client, flags, out) {
160
163
  const fn = (p) => ns.companies.jobs(identifier, p);
161
164
  for await (const item of streamAll(fn, params, {
162
165
  maxPages,
163
- out
166
+ out,
167
+ pageDelayMs: pageDelayFromFlags(flags)
164
168
  })) {
165
169
  out.stdout.write(JSON.stringify(item) + "\n");
166
170
  }
@@ -7,7 +7,7 @@ import {
7
7
  renameProfile,
8
8
  setActiveProfile,
9
9
  updateProfileField
10
- } from "./chunk-4JHGVY7R.js";
10
+ } from "./chunk-TMU3CSPR.js";
11
11
 
12
12
  // src/commands/config.ts
13
13
  import { defineCommand } from "citty";
@@ -12,19 +12,20 @@ import {
12
12
  resolveIdentifier
13
13
  } from "./chunk-DMQZEPQE.js";
14
14
  import {
15
+ pageDelayFromFlags,
15
16
  streamAll
16
- } from "./chunk-DNTRQZBT.js";
17
+ } from "./chunk-EEMJDJ4W.js";
17
18
  import {
18
19
  createClient,
19
20
  renderError,
20
21
  renderSuccess,
21
22
  renderUnexpectedError,
22
23
  resolveEffectiveConfig
23
- } from "./chunk-JXF47TRY.js";
24
+ } from "./chunk-M33MI53G.js";
24
25
  import {
25
26
  GLOBAL_FLAGS,
26
27
  WRITE_FLAGS
27
- } from "./chunk-4JHGVY7R.js";
28
+ } from "./chunk-TMU3CSPR.js";
28
29
 
29
30
  // src/commands/connect.ts
30
31
  import { defineCommand } from "citty";
@@ -106,7 +107,8 @@ async function runConnectSent(client, flags, out) {
106
107
  const fn = (p) => ns.invites.listSent(p);
107
108
  for await (const item of streamAll(fn, params, {
108
109
  maxPages,
109
- out
110
+ out,
111
+ pageDelayMs: pageDelayFromFlags(flags)
110
112
  })) {
111
113
  const projected = !flags.verbose ? slimInviteSentItem(item) : item;
112
114
  out.stdout.write(JSON.stringify(projected) + "\n");
@@ -143,7 +145,8 @@ async function runConnectReceived(client, flags, out) {
143
145
  const fn = (p) => ns.invites.listReceived(p);
144
146
  for await (const item of streamAll(fn, params, {
145
147
  maxPages,
146
- out
148
+ out,
149
+ pageDelayMs: pageDelayFromFlags(flags)
147
150
  })) {
148
151
  const projected = !flags.verbose ? slimInviteReceivedItem(item) : item;
149
152
  out.stdout.write(JSON.stringify(projected) + "\n");
@@ -253,7 +256,7 @@ async function runConnectCancel(client, flags, out) {
253
256
  var connectSentCommand = defineCommand({
254
257
  meta: {
255
258
  name: "sent",
256
- description: "Returns pending sent invitations only \u2014 accepted and declined invitations are not returned (LinkedIn API limitation). Use `id` with `connect cancel`; use `user.id` (native member URN \u2014 the sent-variant carries no public slug) to identify the recipient. `created_at` is the platform's own ISO-8601 timestamp (not an approximation). No total count is available; use `connect sent --all` and count client-side."
259
+ description: "Returns pending sent invitations only \u2014 accepted and declined invitations are not returned (LinkedIn API limitation). Use `id` with `connect cancel`; use `user.id` (native member URN \u2014 the sent-variant carries no public slug) to identify the recipient. `created_at` is the platform's own ISO-8601 timestamp (not an approximation). No total count is available; use `connect sent --all` and count client-side. A very recently sent invitation may take a few minutes to appear here (LinkedIn-side indexing)."
257
260
  },
258
261
  args: { ...GLOBAL_FLAGS },
259
262
  async run({ args }) {
@@ -277,7 +280,7 @@ var connectSentCommand = defineCommand({
277
280
  var connectReceivedCommand = defineCommand({
278
281
  meta: {
279
282
  name: "received",
280
- description: "Returns pending received invitations only \u2014 already-handled invitations are not returned. The `user.*` fields (`public_identifier`, `display_name`, `first_name`, `last_name`) identify who sent the request. Use the `id` field with `connect accept` or `connect decline`."
283
+ description: "Returns pending received invitations only \u2014 already-handled invitations are not returned. The `user.*` fields (`public_identifier`, `display_name`, `first_name`, `last_name`) identify who sent the request. Use the `id` field with `connect accept` or `connect decline`. A very recently received invitation may take a few minutes to appear here (LinkedIn-side indexing)."
281
284
  },
282
285
  args: { ...GLOBAL_FLAGS },
283
286
  async run({ args }) {
@@ -6,20 +6,21 @@ import {
6
6
  normalizeChatId
7
7
  } from "./chunk-DMQZEPQE.js";
8
8
  import {
9
+ pageDelayFromFlags,
9
10
  streamAll
10
- } from "./chunk-DNTRQZBT.js";
11
+ } from "./chunk-EEMJDJ4W.js";
11
12
  import {
12
13
  createClient,
13
14
  renderError,
14
15
  renderSuccess,
15
16
  renderUnexpectedError,
16
17
  resolveEffectiveConfig
17
- } from "./chunk-JXF47TRY.js";
18
+ } from "./chunk-M33MI53G.js";
18
19
  import {
19
20
  GLOBAL_FLAGS,
20
21
  READ_SINGLE_FLAGS,
21
22
  WRITE_SINGLE_FLAGS
22
- } from "./chunk-4JHGVY7R.js";
23
+ } from "./chunk-TMU3CSPR.js";
23
24
 
24
25
  // src/commands/inbox.ts
25
26
  import { defineCommand } from "citty";
@@ -96,7 +97,8 @@ async function runInboxList(client, flags, out) {
96
97
  const fn = (p) => ns.messaging.listChats(p);
97
98
  for await (const item of streamAll(fn, params, {
98
99
  maxPages,
99
- out
100
+ out,
101
+ pageDelayMs: pageDelayFromFlags(flags)
100
102
  })) {
101
103
  out.stdout.write(JSON.stringify(item) + "\n");
102
104
  }
@@ -162,7 +164,8 @@ async function runInboxMessages(client, flags, out) {
162
164
  const fn = (p) => ns.messaging.listMessages(chatId, p);
163
165
  for await (const item of streamAll(fn, params, {
164
166
  maxPages,
165
- out
167
+ out,
168
+ pageDelayMs: pageDelayFromFlags(flags)
166
169
  })) {
167
170
  out.stdout.write(JSON.stringify(item) + "\n");
168
171
  }
@@ -253,7 +256,7 @@ var inboxMarkReadCommand = defineCommand({
253
256
  }
254
257
  });
255
258
  var inboxMessagesCommand = defineCommand({
256
- meta: { name: "messages", description: "List messages in a chat." },
259
+ meta: { name: "messages", description: "List messages in a chat. A very recent send/delete may take a few minutes to appear or clear here (LinkedIn-side indexing); `message get <chat_id> <message_id>` reflects it immediately." },
257
260
  args: {
258
261
  ...GLOBAL_FLAGS,
259
262
  chatId: { type: "positional", description: "Chat ID." },