@curviate/cli 0.50.0-next.3 → 0.50.0-next.5

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +14 -0
  3. package/dist/{account-LRQXYUPU.js → account-WF27VTZF.js} +10 -10
  4. package/dist/{analytics-IQ2ZE3TZ.js → analytics-Z7AE5JEI.js} +4 -4
  5. package/dist/{beta-consent-NWO2YQJC.js → beta-consent-VETVR6KP.js} +3 -3
  6. package/dist/{billing-JIC22PSI.js → billing-TYXPR6ZC.js} +4 -4
  7. package/dist/{chunk-VNK3HERF.js → chunk-5YQXZIFH.js} +1 -1
  8. package/dist/{chunk-A57ZILRU.js → chunk-6SBO4WXA.js} +1 -1
  9. package/dist/{chunk-QL55Z56R.js → chunk-EHTSCHKM.js} +1 -1
  10. package/dist/{chunk-WR6FIP24.js → chunk-GGJTO3PN.js} +1 -1
  11. package/dist/{chunk-AQCLTQXN.js → chunk-HOS3JH4L.js} +1 -1
  12. package/dist/{chunk-J2RPEWQB.js → chunk-I3HD5UFH.js} +1 -1
  13. package/dist/{chunk-TYNVJDYK.js → chunk-PHKICMO7.js} +14 -0
  14. package/dist/{chunk-VJTEJUO4.js → chunk-QLBNUWM2.js} +82 -32
  15. package/dist/{chunk-V2ENBR5Q.js → chunk-RLZP2PL4.js} +10 -10
  16. package/dist/{chunk-MYVSB7NJ.js → chunk-UFHZGBFD.js} +1 -1
  17. package/dist/{chunk-SOU3K3IZ.js → chunk-X62K5XDP.js} +5 -5
  18. package/dist/{chunk-GHMRPX5H.js → chunk-XDG3TOKG.js} +2 -0
  19. package/dist/cli.js +23 -23
  20. package/dist/{comment-FNQE64XL.js → comment-YAQSZNYS.js} +4 -4
  21. package/dist/{company-C4DRLLIU.js → company-4K75VGBM.js} +5 -5
  22. package/dist/{config-2OR7Y23Q.js → config-OESEJHKZ.js} +1 -1
  23. package/dist/{connect-5P53KY6N.js → connect-LZJQOYX2.js} +5 -5
  24. package/dist/{contact-WKF4REZ6.js → contact-XE7HK4RI.js} +6 -6
  25. package/dist/{contact-groups-4IM5RVLE.js → contact-groups-IHF7GMNG.js} +8 -8
  26. package/dist/{contact-import-MDPIZ67M.js → contact-import-SSPUBHAH.js} +8 -8
  27. package/dist/{core-74JCW5WM.js → core-524AMFTQ.js} +17 -17
  28. package/dist/{do-not-contact-73TURNLU.js → do-not-contact-LOUCA7JT.js} +4 -4
  29. package/dist/{doctor-WFEO7MCW.js → doctor-Q3434Q7N.js} +2 -2
  30. package/dist/{document-GFRWPQFV.js → document-RXBOZG6M.js} +1 -1
  31. package/dist/{draft-AFNYKVUZ.js → draft-SOO3UJIO.js} +2 -2
  32. package/dist/{enrollment-QA2UMNVS.js → enrollment-YQMSDXVJ.js} +5 -5
  33. package/dist/{examples-JJB4DZKK.js → examples-74FXGJ7X.js} +1 -1
  34. package/dist/{export-CFBKC74G.js → export-F6ZFNZ7L.js} +3 -3
  35. package/dist/{feed-UIVSY4JT.js → feed-YE4HOQ2M.js} +3 -3
  36. package/dist/{group-LFYIBVPL.js → group-OCKSOR65.js} +3 -3
  37. package/dist/{inbox-EY7NGUKV.js → inbox-VGCODDRH.js} +3 -3
  38. package/dist/{inboxes-G74QYE54.js → inboxes-XHP6F3MQ.js} +3 -3
  39. package/dist/{incoming-ZOUMXKAF.js → incoming-AA3MTRAG.js} +4 -4
  40. package/dist/{job-VPTJWSCJ.js → job-KFZNTBXT.js} +4 -4
  41. package/dist/{login-UNEMKIJN.js → login-BD7JQXGX.js} +1 -1
  42. package/dist/{message-2V66HGCG.js → message-IXUDKHBW.js} +4 -4
  43. package/dist/{motion-DTPCDJAM.js → motion-QSANYJKR.js} +9 -9
  44. package/dist/{network-GRZNGB2M.js → network-A5M6SLRI.js} +4 -4
  45. package/dist/{notification-C4ZBZOCV.js → notification-XRCV5XNX.js} +3 -3
  46. package/dist/{notifications-ASDF3HPE.js → notifications-SU7NKFGF.js} +4 -4
  47. package/dist/{post-EOJ7JA2F.js → post-YWXQ2MVL.js} +4 -4
  48. package/dist/{profile-K3TVVRBO.js → profile-JVNJAAZ7.js} +5 -5
  49. package/dist/{recruiter-45UOJBFV.js → recruiter-34G433BX.js} +6 -6
  50. package/dist/{sales-nav-C2F62WMI.js → sales-nav-34WK5HF6.js} +5 -5
  51. package/dist/{search-EVJFYKRW.js → search-43YUBUEH.js} +6 -6
  52. package/dist/{setup-GI36YFHD.js → setup-RFSXQVN6.js} +2 -2
  53. package/dist/{team-H3SRAP4J.js → team-WSRM74PS.js} +4 -4
  54. package/dist/{tier-HHTD226N.js → tier-JQYS4MMF.js} +3 -3
  55. package/dist/{unibox-MED2B6XX.js → unibox-LFTLITLA.js} +12 -5
  56. package/dist/{webhook-RE7YXPWW.js → webhook-HX2NOPNE.js} +4 -4
  57. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -12,8 +12,21 @@ Requires the next `@curviate/sdk` (a commit pin on the SDK PR build until it is
12
12
 
13
13
  ### Added
14
14
 
15
+ - `message new --to` is repeatable: two or more different people start a group chat, `--subject` its name. A person named twice counts once (`--preview` shows the list sent). A voice note stays out of groups.
16
+ - `message new` and `message send` (and the bare `message <chat_id>`) take `--share-post <id>` or `--share-job <id>`: a post or job posting shown natively beside the text. Text is required; both flags together, no text or `--attach` is exit `2` with nothing sent. A job URL reduces to its numeric id. Company-page, Sales Navigator and Recruiter chats do not take it. Whether a post id renders in the message is unproven until a live send.
17
+ - `unibox list` names a group chat in WITH: its title, else its other members (`group` on the Unibox chat; `--json` carries it whole).
15
18
  - `curviate account safety get|update <account>`: read and change one Account's limits and Active hours. `curviate account team-access on|off <account>`: share an Account with its Team or keep it to its person.
16
19
 
20
+ ### Account orchestration
21
+
22
+ - `motion create` / `motion update --file` accept `settings.priority` (`normal` | `prioritized`): the Motion's weighted share (1 : 2) of each sending Account's daily allowance. The vendored Motion schemas carry it.
23
+ - `settings.new_enrollments_per_account_per_day` and `settings.assign: even` are retired: still accepted, ignored by the API until 2027-01-28; its `SETTING_REMOVED` notice is printed. A read never returns them.
24
+ - `account get` shows `health` (`{state, factor, reasons, until}`; absent on an Account you can see but not operate); it was dropped by the default view. Strict rows in `quotas` carry `target` and `effective_target`.
25
+ - `account safety get|update` carry `auto_withdraw` and the rows' `target`; a row's `green` is its target.
26
+ - Same shape, new meaning: `connection_requests_no_note` counts every invitation; `used` is the invitation total. `connect --note` help names the noted limit (3 a month on a free profile, none on a paid one).
27
+ - `motion preview` help: the projection names the binding pool, `expected_actions_per_day` and `warnings[]` (`hours_below_share`, `no_sending_account`). `enrollment list`: `account_id` is null while an Enrollment waits in its Motion's pool.
28
+ - Help names the blind spot: actions sent by hand, or by another tool on the same Account, are invisible to Curviate.
29
+
17
30
  ### Fixed
18
31
 
19
32
  - `curviate contact export` no longer fails with exit 7 on any answer of more than one row.
package/README.md CHANGED
@@ -262,6 +262,20 @@ curviate core search jobs --keywords "founding engineer" --location "Berlin" --a
262
262
  curviate core job get "https://www.linkedin.com/jobs/view/4428113858" --account acc_1
263
263
  ```
264
264
 
265
+ ### 8. Start a group chat, share a post or a job
266
+
267
+ Repeat `--to` for a group chat; `--subject` is its name. A person named twice counts once. A voice note stays out of groups.
268
+
269
+ ```bash
270
+ curviate core message new --to janesmith --to ACoAAAexample --subject "Q4 intro" \
271
+ --account acc_1 "Hi both, you two should meet." --preview # nothing sent
272
+
273
+ # Show a post or job posting natively beside the text. Text is required, no --attach.
274
+ curviate core message send 2-YTQ3ODU3Njgt --share-job 4012345678 --account acc_1 "Thought of you for this one." --preview
275
+ ```
276
+
277
+ `--share-post` takes the post id from `curviate core post get` or a list (an activity id, URN or share URL also works); `--share-job` takes the numeric job id or a job URL. Both together, no text, or `--attach` is exit `2` with nothing sent. A company-page chat and Sales Navigator or Recruiter chats do not take shared content. Whether a post id renders in the message is unproven until a live send.
278
+
265
279
  ## Company
266
280
 
267
281
  Company commands (`curviate core company ...`) are Core-tier reads. `curviate core company <id>` accepts a public
@@ -3,14 +3,14 @@ import {
3
3
  slimAccountGet,
4
4
  slimAccountList,
5
5
  slimAccountListItem
6
- } from "./chunk-GHMRPX5H.js";
6
+ } from "./chunk-XDG3TOKG.js";
7
7
  import {
8
8
  GRAMMAR_ARGS,
9
9
  WINDOW_ARGS,
10
10
  grammarParams,
11
11
  renderOverview,
12
12
  windowParams
13
- } from "./chunk-SOU3K3IZ.js";
13
+ } from "./chunk-X62K5XDP.js";
14
14
  import {
15
15
  print,
16
16
  table
@@ -22,7 +22,7 @@ import {
22
22
  outputOpts,
23
23
  rootClient,
24
24
  usage
25
- } from "./chunk-WR6FIP24.js";
25
+ } from "./chunk-GGJTO3PN.js";
26
26
  import {
27
27
  buildPreviewOutput
28
28
  } from "./chunk-TCUYH5GO.js";
@@ -37,7 +37,7 @@ import {
37
37
  readablePage,
38
38
  rejectPaginationModifiersWithoutAll,
39
39
  streamAll
40
- } from "./chunk-MYVSB7NJ.js";
40
+ } from "./chunk-UFHZGBFD.js";
41
41
  import {
42
42
  isJsonMode,
43
43
  renderError,
@@ -53,7 +53,7 @@ import {
53
53
  import {
54
54
  createClient,
55
55
  resolveEffectiveConfig
56
- } from "./chunk-J2RPEWQB.js";
56
+ } from "./chunk-I3HD5UFH.js";
57
57
  import {
58
58
  GLOBAL_FLAGS,
59
59
  READ_SINGLE_FLAGS,
@@ -66,7 +66,7 @@ import {
66
66
  import {
67
67
  parseDocument,
68
68
  readFileFlag
69
- } from "./chunk-TYNVJDYK.js";
69
+ } from "./chunk-PHKICMO7.js";
70
70
  import "./chunk-FDJMAF7D.js";
71
71
  import {
72
72
  defaultReadStdin,
@@ -197,7 +197,7 @@ var ACCOUNT = { type: "positional", description: "The Account (acc_...)." };
197
197
  var getCmd = defineCommand3({
198
198
  meta: {
199
199
  name: "get",
200
- description: "One Account's safety policy: every budget row with its ceiling and effective_ceiling, Active hours, warm-up and pacing. A read: no LinkedIn call.",
200
+ description: "One Account's safety policy: every budget row with its ceiling, effective_ceiling and (strict rows) target and effective_target, Active hours, warm-up, pacing and auto_withdraw. A read: no LinkedIn call.",
201
201
  risk: "read",
202
202
  seeAlso: ["curviate account safety update", "curviate account get"],
203
203
  examples: ["curviate account safety get acc_YOUR_ACCOUNT_ID", "curviate account safety get acc_YOUR_ACCOUNT_ID --fields active_hours,warm_up"]
@@ -216,7 +216,7 @@ var getCmd = defineCommand3({
216
216
  var updateCmd = defineCommand3({
217
217
  meta: {
218
218
  name: "update",
219
- description: 'Change one Account\'s safety policy from a JSON document: `rows`, for example {"rows":[{"budget_row":"profile_views","ceiling":40}]}, and `active_hours`, for example {"active_hours":{"days":["mon","tue"],"start":"09:00","end":"17:00"}}. Fields you leave out stay as they are; null clears an override. Prints the policy.',
219
+ description: 'Change one Account\'s safety policy from a JSON document: `rows`, for example {"rows":[{"budget_row":"profile_views","ceiling":40}]}, `active_hours`, for example {"active_hours":{"days":["mon","tue"],"start":"09:00","end":"17:00"}}, and `auto_withdraw` (true or false: Curviate withdraws its own invitations older than 14 days once more than 400 are pending). A row\'s `green` is its target, what Motions aim at; the ceiling is the most it may do. Fields you leave out stay as they are; null clears an override. Prints the policy.',
220
220
  risk: "write",
221
221
  rules: {
222
222
  changes: "The Account's limits or Active hours, from the next action on.",
@@ -666,7 +666,7 @@ var connectRequestCommand = defineCommand4({
666
666
  meta: { name: "connect-request", description: "Connect a LinkedIn account without any credential passing through you: create a request, give the person its link, read it until done." },
667
667
  subCommands: { create: createCmd, get: getCmd2, cancel: cancelCmd },
668
668
  async run() {
669
- const { showHelp } = await import("./examples-JJB4DZKK.js");
669
+ const { showHelp } = await import("./examples-74FXGJ7X.js");
670
670
  await showHelp(connectRequestCommand, ["curviate", "account", "connect-request"]);
671
671
  }
672
672
  });
@@ -1668,7 +1668,7 @@ var accountListCommand = defineCommand5({
1668
1668
  var accountGetCommand = defineCommand5({
1669
1669
  meta: {
1670
1670
  name: "get",
1671
- description: "Get a connected LinkedIn account: its status (active, reconnect_needed, restricted, connecting or disconnected) and its per-action quotas. --verbose adds cached profile fields, which may be null.",
1671
+ description: "Get a connected LinkedIn account: its status (active, reconnect_needed, restricted, connecting or disconnected), its per-action quotas (the strict rows carry a target and an effective_target; connection_requests_no_note counts every invitation) and its health (state healthy, watch, slowed or stopped; factor; reasons). Curviate cannot see actions sent by hand or by another tool on the Account. --verbose adds cached profile fields, which may be null.",
1672
1672
  risk: "read",
1673
1673
  examples: [
1674
1674
  "curviate account get acc_YOUR_ACCOUNT_ID"
@@ -6,14 +6,14 @@ import {
6
6
  grammarParams,
7
7
  renderOverview,
8
8
  windowParams
9
- } from "./chunk-SOU3K3IZ.js";
9
+ } from "./chunk-X62K5XDP.js";
10
10
  import "./chunk-5S3MJVI5.js";
11
11
  import "./chunk-PPGKQJKU.js";
12
- import "./chunk-WR6FIP24.js";
12
+ import "./chunk-GGJTO3PN.js";
13
13
  import "./chunk-NNV2OYEF.js";
14
- import "./chunk-MYVSB7NJ.js";
14
+ import "./chunk-UFHZGBFD.js";
15
15
  import "./chunk-QM57YDJE.js";
16
- import "./chunk-J2RPEWQB.js";
16
+ import "./chunk-I3HD5UFH.js";
17
17
  import "./chunk-RYWWSZUH.js";
18
18
  import "./chunk-73DJ3KNE.js";
19
19
  import "./chunk-ZYURL5VK.js";
@@ -4,14 +4,14 @@ import {
4
4
  outputOpts,
5
5
  rootClient,
6
6
  usage
7
- } from "./chunk-WR6FIP24.js";
7
+ } from "./chunk-GGJTO3PN.js";
8
8
  import {
9
9
  buildPreviewOutput
10
10
  } from "./chunk-TCUYH5GO.js";
11
11
  import {
12
12
  renderSuccess
13
13
  } from "./chunk-QM57YDJE.js";
14
- import "./chunk-J2RPEWQB.js";
14
+ import "./chunk-I3HD5UFH.js";
15
15
  import {
16
16
  READ_SINGLE_FLAGS,
17
17
  WRITE_SINGLE_FLAGS,
@@ -72,7 +72,7 @@ var betaCommand = defineCommand({
72
72
  meta: { name: "beta", description: DESCRIPTIONS.beta },
73
73
  subCommands: { status: statusCmd, update: updateCmd },
74
74
  async run() {
75
- const { showHelp } = await import("./examples-JJB4DZKK.js");
75
+ const { showHelp } = await import("./examples-74FXGJ7X.js");
76
76
  await showHelp(betaCommand, ["curviate", "beta"]);
77
77
  }
78
78
  });
@@ -7,7 +7,7 @@ import {
7
7
  outputOpts,
8
8
  rootClient,
9
9
  usage
10
- } from "./chunk-WR6FIP24.js";
10
+ } from "./chunk-GGJTO3PN.js";
11
11
  import {
12
12
  intFlag
13
13
  } from "./chunk-NNV2OYEF.js";
@@ -18,14 +18,14 @@ import {
18
18
  readablePage,
19
19
  rejectPaginationModifiersWithoutAll,
20
20
  streamAll
21
- } from "./chunk-MYVSB7NJ.js";
21
+ } from "./chunk-UFHZGBFD.js";
22
22
  import {
23
23
  renderSuccess,
24
24
  writeNdjsonItem
25
25
  } from "./chunk-QM57YDJE.js";
26
26
  import {
27
27
  downloadBinary
28
- } from "./chunk-J2RPEWQB.js";
28
+ } from "./chunk-I3HD5UFH.js";
29
29
  import {
30
30
  GLOBAL_FLAGS,
31
31
  readOnly
@@ -115,7 +115,7 @@ var billingCommand = defineCommand({
115
115
  meta: { name: "billing", description: DESCRIPTIONS.billing },
116
116
  subCommands: { invoices: invoicesCmd },
117
117
  async run() {
118
- const { showHelp } = await import("./examples-JJB4DZKK.js");
118
+ const { showHelp } = await import("./examples-74FXGJ7X.js");
119
119
  await showHelp(billingCommand, ["curviate", "billing"]);
120
120
  }
121
121
  });
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  fail,
4
4
  outputOpts
5
- } from "./chunk-WR6FIP24.js";
5
+ } from "./chunk-GGJTO3PN.js";
6
6
 
7
7
  // src/lib/chunks.ts
8
8
  async function sendInChunks(ids, size, send, f) {
@@ -3,7 +3,7 @@ import {
3
3
  parseDocument,
4
4
  readFileFlag,
5
5
  readStdinCapped
6
- } from "./chunk-TYNVJDYK.js";
6
+ } from "./chunk-PHKICMO7.js";
7
7
  import {
8
8
  isStdinToken
9
9
  } from "./chunk-ZYURL5VK.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-UEAX6KUB.js";
5
5
  import {
6
6
  readableId
7
- } from "./chunk-MYVSB7NJ.js";
7
+ } from "./chunk-UFHZGBFD.js";
8
8
 
9
9
  // src/lib/member-id.ts
10
10
  var MEMBER_PROVIDER_ID_RE = /^A[CDE][A-Za-z0-9_-]{4,}$/;
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  createClient,
8
8
  resolveEffectiveConfig
9
- } from "./chunk-J2RPEWQB.js";
9
+ } from "./chunk-I3HD5UFH.js";
10
10
 
11
11
  // src/lib/root-command.ts
12
12
  var outputOpts = (f) => ({
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readablePage
4
- } from "./chunk-MYVSB7NJ.js";
4
+ } from "./chunk-UFHZGBFD.js";
5
5
  import {
6
6
  assertNoStdinPlaceholder
7
7
  } from "./chunk-ZYURL5VK.js";
@@ -274,7 +274,7 @@ import { AsyncLocalStorage } from "async_hooks";
274
274
  import { Curviate, CurviateError as CurviateError2 } from "@curviate/sdk";
275
275
 
276
276
  // package.json
277
- var version = "0.50.0-next.3";
277
+ var version = "0.50.0-next.5";
278
278
 
279
279
  // src/lib/client.ts
280
280
  function headerStrings(headers) {
@@ -980,6 +980,13 @@ var documents_default = {
980
980
  settings: {
981
981
  type: "object",
982
982
  properties: {
983
+ priority: {
984
+ type: "string",
985
+ enum: [
986
+ "normal",
987
+ "prioritized"
988
+ ]
989
+ },
983
990
  accounts_per_contact: {
984
991
  type: "integer",
985
992
  minimum: 1,
@@ -1167,6 +1174,13 @@ var documents_default = {
1167
1174
  settings: {
1168
1175
  type: "object",
1169
1176
  properties: {
1177
+ priority: {
1178
+ type: "string",
1179
+ enum: [
1180
+ "normal",
1181
+ "prioritized"
1182
+ ]
1183
+ },
1170
1184
  accounts_per_contact: {
1171
1185
  type: "integer",
1172
1186
  minimum: 1,
@@ -15,18 +15,19 @@ import {
15
15
  } from "./chunk-Q3ZPRFUX.js";
16
16
  import {
17
17
  normalizeChatId,
18
- resolveIdentifier
18
+ resolveIdentifier,
19
+ resolveJobIdentifier
19
20
  } from "./chunk-UEAX6KUB.js";
20
21
  import {
21
22
  requireAccount
22
- } from "./chunk-AQCLTQXN.js";
23
+ } from "./chunk-HOS3JH4L.js";
23
24
  import {
24
25
  buildPreviewOutput
25
26
  } from "./chunk-TCUYH5GO.js";
26
27
  import {
27
28
  readableId,
28
29
  readableObject
29
- } from "./chunk-MYVSB7NJ.js";
30
+ } from "./chunk-UFHZGBFD.js";
30
31
  import {
31
32
  renderError,
32
33
  renderSuccess,
@@ -36,7 +37,7 @@ import {
36
37
  createClient,
37
38
  downloadBinary,
38
39
  resolveEffectiveConfig
39
- } from "./chunk-J2RPEWQB.js";
40
+ } from "./chunk-I3HD5UFH.js";
40
41
  import {
41
42
  READ_SINGLE_FLAGS,
42
43
  WRITE_FLAGS,
@@ -112,6 +113,26 @@ function normalizeAttachPaths(attach) {
112
113
  if (!attach) return [];
113
114
  return Array.isArray(attach) ? attach : [attach];
114
115
  }
116
+ function readSharedContent(flags, text, attachPaths, out) {
117
+ const post = flags["share-post"];
118
+ const job = flags["share-job"];
119
+ if (post === void 0 && job === void 0) return void 0;
120
+ const refuse = (msg) => {
121
+ out.stderr.write(`error: ${msg}
122
+ `);
123
+ process.exit(2);
124
+ };
125
+ if (post !== void 0 && job !== void 0) refuse("pass --share-post or --share-job, not both.");
126
+ const flag = post !== void 0 ? "--share-post" : "--share-job";
127
+ const raw = (post ?? job ?? "").trim();
128
+ if (raw === "") refuse(`${flag} was given an empty value. Pass the id, or omit the flag.`);
129
+ if (text.trim() === "") refuse(`${flag} needs the message text: the ${post !== void 0 ? "post" : "job posting"} is shown beside it.`);
130
+ if (attachPaths.length > 0) refuse(`${flag} cannot be combined with --attach.`);
131
+ return post !== void 0 ? { type: "post", id: raw } : { type: "job_posting", id: resolveJobIdentifier(raw) };
132
+ }
133
+ function normalizeToValues(to) {
134
+ return (Array.isArray(to) ? to : to === void 0 ? [] : [to]).filter((v) => v !== "");
135
+ }
115
136
  var MEMBER_URN_RE = /^urn:li:member:\d+$/;
116
137
  var MEMBER_PROVIDER_ID_RE = /^A[CDE][A-Za-z0-9_-]{4,}$/;
117
138
  async function handleSdkError(err, outOpts, out) {
@@ -137,7 +158,7 @@ function willSendAsNotice(chatId) {
137
158
  async function runMessageNew(client, flags, out, _readStdin) {
138
159
  const subject = readChatSubjectFlag(flags, out);
139
160
  const accountId = await requireAccount(client, flags, out);
140
- const rawTo = flags.to ?? "";
161
+ const rawTos = normalizeToValues(flags.to);
141
162
  const rawText = flags.text ?? "";
142
163
  const attachPaths = normalizeAttachPaths(flags.attach);
143
164
  let attachBuffers = [];
@@ -154,24 +175,34 @@ async function runMessageNew(client, flags, out, _readStdin) {
154
175
  const ns = client.account(accountId);
155
176
  const outOpts = resolveOutputOpts(flags);
156
177
  const text = await resolveTextOrStdin(rawText, out, _readStdin);
157
- const resolvedSlugOrId = resolveIdentifier(rawTo);
158
- let providerId;
159
- if (MEMBER_PROVIDER_ID_RE.test(resolvedSlugOrId)) {
160
- providerId = resolvedSlugOrId;
161
- } else {
162
- try {
163
- providerId = readableId(await ns.users.get(resolvedSlugOrId, {}));
164
- } catch (err) {
165
- await handleSdkError(err, outOpts, out);
166
- return;
178
+ const sharedContent = readSharedContent(flags, text, attachPaths, out);
179
+ const attendeeIds = [];
180
+ for (const rawTo of rawTos) {
181
+ const resolvedSlugOrId = resolveIdentifier(rawTo);
182
+ let providerId;
183
+ if (MEMBER_PROVIDER_ID_RE.test(resolvedSlugOrId)) {
184
+ providerId = resolvedSlugOrId;
185
+ } else {
186
+ try {
187
+ providerId = readableId(await ns.users.get(resolvedSlugOrId, {}));
188
+ } catch (err) {
189
+ await handleSdkError(err, outOpts, out);
190
+ return;
191
+ }
167
192
  }
193
+ if (providerId !== void 0 && !attendeeIds.includes(providerId)) attendeeIds.push(providerId);
168
194
  }
169
195
  const attachmentPayloads = attachBuffers.map((buf, i) => toAttachmentPayload(attachPaths[i], buf));
170
196
  if (flags.preview) {
171
197
  const preview = buildPreviewOutput({
172
198
  method: "messaging.startChat",
173
- args: { attendees_ids: [providerId] },
174
- body: { attendees_ids: [providerId], text, ...subject !== void 0 ? { subject } : {} },
199
+ args: { attendees_ids: attendeeIds },
200
+ body: {
201
+ attendees_ids: attendeeIds,
202
+ text,
203
+ ...subject !== void 0 ? { subject } : {},
204
+ ...sharedContent ? { shared_content: sharedContent } : {}
205
+ },
175
206
  account: accountId,
176
207
  attachments: attachBuffers.map((buf, i) => ({
177
208
  name: attachPaths[i] ? attachPaths[i].split("/").pop() ?? attachPaths[i] : `attachment_${i}`,
@@ -182,12 +213,13 @@ async function runMessageNew(client, flags, out, _readStdin) {
182
213
  return;
183
214
  }
184
215
  const body = {
185
- attendees_ids: [providerId],
216
+ attendees_ids: attendeeIds,
186
217
  text,
187
218
  // Present only when the flag was given: an absent subject must leave the
188
219
  // key out, never send `subject: ""` (the server has no `.min(1)`).
189
220
  ...subject !== void 0 ? { subject } : {},
190
- ...attachmentPayloads.length > 0 ? { attachments: attachmentPayloads } : {}
221
+ ...attachmentPayloads.length > 0 ? { attachments: attachmentPayloads } : {},
222
+ ...sharedContent ? { shared_content: sharedContent } : {}
191
223
  };
192
224
  try {
193
225
  const result = await ns.messaging.startChat(body);
@@ -202,6 +234,7 @@ async function runMessageSend(client, flags, out, _readStdin) {
202
234
  const rawText = flags.text ?? "";
203
235
  const attachPaths = normalizeAttachPaths(flags.attach);
204
236
  const text = await resolveTextOrStdin(rawText, out, _readStdin);
237
+ const sharedContent = readSharedContent(flags, text, attachPaths, out);
205
238
  let attachBuffers = [];
206
239
  try {
207
240
  attachBuffers = await Promise.all(attachPaths.map((p) => readAttachment(p)));
@@ -217,7 +250,7 @@ async function runMessageSend(client, flags, out, _readStdin) {
217
250
  const preview = buildPreviewOutput({
218
251
  method: "messaging.sendMessage",
219
252
  args: { chat_id: chatId },
220
- body: { text },
253
+ body: { text, ...sharedContent ? { shared_content: sharedContent } : {} },
221
254
  account: accountId,
222
255
  attachments: attachBuffers.map((buf, i) => ({
223
256
  name: attachPaths[i] ? attachPaths[i].split("/").pop() ?? attachPaths[i] : `attachment_${i}`,
@@ -232,7 +265,8 @@ async function runMessageSend(client, flags, out, _readStdin) {
232
265
  const attachmentPayloads = attachBuffers.map((buf, i) => toAttachmentPayload(attachPaths[i], buf));
233
266
  const body = {
234
267
  text,
235
- ...attachmentPayloads.length > 0 ? { attachments: attachmentPayloads } : {}
268
+ ...attachmentPayloads.length > 0 ? { attachments: attachmentPayloads } : {},
269
+ ...sharedContent ? { shared_content: sharedContent } : {}
236
270
  };
237
271
  const ns = client.account(accountId);
238
272
  const outOpts = resolveOutputOpts(flags);
@@ -363,7 +397,7 @@ async function runMessageAttachment(client, flags, out, isTTY) {
363
397
  async function runMessageInMail(client, flags, out, _readStdin) {
364
398
  const subject = readInMailSubjectFlag(flags, out);
365
399
  const accountId = await requireAccount(client, flags, out);
366
- const rawTo = flags.to ?? "";
400
+ const rawTo = normalizeToValues(flags.to)[0] ?? "";
367
401
  if (!rawTo) {
368
402
  out.stderr.write(
369
403
  "error: --to: not a valid LinkedIn URL, slug, provider-id, or URN.\n"
@@ -424,21 +458,33 @@ async function runMessageInMailBalance(client, flags, out) {
424
458
  await handleSdkError(err, outOpts, out);
425
459
  }
426
460
  }
461
+ var SHARE_ARGS = {
462
+ "share-post": {
463
+ type: "string",
464
+ description: "Show a post natively in the message, beside the text (text required, no --attach). The post id from `curviate core post get` or a list; an activity id, URN or share URL also works. Not with --share-job. Whether a post id renders in the message is unproven until a live send."
465
+ },
466
+ "share-job": {
467
+ type: "string",
468
+ description: "Show a job posting natively in the message, beside the text (text required, no --attach). The numeric job id or a LinkedIn job URL. Not with --share-post."
469
+ }
470
+ };
427
471
  var messageNewCommand = defineCommand({
428
472
  meta: {
429
473
  name: "new",
430
474
  description: "Start a new chat with one or more members.",
431
475
  risk: "write",
432
476
  rules: {
433
- changes: "Starts a chat with the recipient and sends the opening message from your Account.",
434
- visible_to: "The recipient, in their LinkedIn inbox.",
477
+ changes: "Starts a chat with the recipient (a group chat with two or more --to) and sends the opening message from your Account.",
478
+ visible_to: "The recipient, or every member of a group, in their LinkedIn inbox.",
435
479
  budget_rows: ["messages_first_degree"],
436
480
  retry: "Not safe: requests carry no idempotency key, so a retry after a timeout can repeat it. Read `curviate core inbox list` first.",
437
481
  undo: "`curviate core message delete <chat_id> <message_id>` removes the message; the chat stays and the recipient may have read it."
438
482
  },
439
483
  errors: { ...AS_ACCOUNT, ...BUDGET, ...TARGET, RECIPIENT_UNREACHABLE: "LinkedIn will not let the Account message this person." },
440
484
  examples: [
441
- 'curviate core message new --to janesmith "Hi Jane, enjoyed your post on agent evals."'
485
+ 'curviate core message new --to janesmith "Hi Jane, enjoyed your post on agent evals."',
486
+ 'curviate core message new --to janesmith --to ACoAAAexample --subject "Q4 intro" "Hi both, meet each other." --preview',
487
+ 'curviate core message new --to janesmith --share-job 4012345678 "Thought of you for this one."'
442
488
  ]
443
489
  },
444
490
  args: {
@@ -446,15 +492,16 @@ var messageNewCommand = defineCommand({
446
492
  ...WRITE_FLAGS,
447
493
  to: {
448
494
  type: "string",
449
- description: "Recipient: LinkedIn profile URL (e.g. https://www.linkedin.com/in/some-slug), bare slug (e.g. some-slug), or provider ID (e.g. ACoAAA...). URL and slug inputs resolve the provider ID automatically.",
495
+ description: "Recipient (repeatable): LinkedIn profile URL (e.g. https://www.linkedin.com/in/some-slug), bare slug (e.g. some-slug), or provider ID (e.g. ACoAAA...). URL and slug inputs resolve the provider ID automatically. One --to starts a direct chat; two or more different people start a group chat. A person named twice counts once.",
450
496
  required: true
451
497
  },
452
498
  text: { type: "positional", stdinArg: true, description: "Opening message text. Pass - to read from stdin (e.g. via heredoc or pipe)." },
453
499
  subject: {
454
500
  type: "string",
455
- description: "Optional conversation name / subject line (at most 200 characters). Omit it for an unnamed chat; an empty value is a usage error."
501
+ description: "Optional conversation name / subject line (at most 200 characters). The group's name when there are two or more people. Omit it for an unnamed chat; an empty value is a usage error."
456
502
  },
457
- attach: { type: "string", description: "File to attach (repeatable)." }
503
+ attach: { type: "string", description: "File to attach (repeatable). Not with --share-post or --share-job. A voice note stays out of groups." },
504
+ ...SHARE_ARGS
458
505
  },
459
506
  async run({ args }) {
460
507
  const flags = args;
@@ -742,7 +789,8 @@ var messageSendCommand = defineCommand({
742
789
  },
743
790
  errors: { ...AS_ACCOUNT, ...BUDGET, ...TARGET, RECIPIENT_UNREACHABLE: "LinkedIn will not let the Account message this person.", CHAT_NOT_VISIBLE: "the chat is not visible to the Account." },
744
791
  examples: [
745
- 'curviate core message send 2-YTQ3ODU3Njgt "Thanks, that makes sense."'
792
+ 'curviate core message send 2-YTQ3ODU3Njgt "Thanks, that makes sense."',
793
+ 'curviate core message send 2-YTQ3ODU3Njgt --share-post 7380123456789012345 "This is the post I meant." --preview'
746
794
  ]
747
795
  },
748
796
  args: {
@@ -753,7 +801,8 @@ var messageSendCommand = defineCommand({
753
801
  description: "Chat ID or LinkedIn messaging thread URL. A COMPANY_ chat id sends as the company page; any other chat id sends as the connected member."
754
802
  },
755
803
  text: { type: "positional", stdinArg: true, description: "Message text. Pass - to read from stdin (e.g. via heredoc or pipe)." },
756
- attach: { type: "string", description: "File to attach (repeatable)." }
804
+ attach: { type: "string", description: "File to attach (repeatable). Not with --share-post or --share-job." },
805
+ ...SHARE_ARGS
757
806
  },
758
807
  async run({ args }) {
759
808
  const flags = args;
@@ -815,7 +864,7 @@ var MESSAGE_SUBCOMMANDS = [
815
864
  "inmail",
816
865
  "inmail-balance"
817
866
  ];
818
- var MESSAGE_USAGE = 'Usage: curviate core message new --to <attendee> "<text>" [--subject <s>] [--attach <file>...]\n curviate core message send <chat_id> "<text>" [--attach <file>...]\n curviate core message <chat_id> "<text>" [--attach <file>...]\n curviate core message get <chat_id> <message_id>\n curviate core message edit <chat_id> <message_id> "<text>"\n curviate core message delete <chat_id> <message_id>\n curviate core message react <chat_id> <message_id> <emoji>\n curviate core message attachment <chat_id> <message_id> <attachment_id> [-o <file>]\n curviate core message inmail --to <id> --subject <s> "<text>"\n curviate core message inmail-balance\n';
867
+ var MESSAGE_USAGE = 'Usage: curviate core message new --to <attendee>... "<text>" [--subject <s>] [--attach <file>... | --share-post <id> | --share-job <id>]\n curviate core message send <chat_id> "<text>" [--attach <file>... | --share-post <id> | --share-job <id>]\n curviate core message <chat_id> "<text>" [--attach <file>... | --share-post <id> | --share-job <id>]\n curviate core message get <chat_id> <message_id>\n curviate core message edit <chat_id> <message_id> "<text>"\n curviate core message delete <chat_id> <message_id>\n curviate core message react <chat_id> <message_id> <emoji>\n curviate core message attachment <chat_id> <message_id> <attachment_id> [-o <file>]\n curviate core message inmail --to <id> --subject <s> "<text>"\n curviate core message inmail-balance\n';
819
868
  function guardBareMessageForm(chatId, out) {
820
869
  if (!looksLikeCommandWord(chatId)) return;
821
870
  const suggestion = nearestSubcommand(chatId, [...MESSAGE_SUBCOMMANDS]);
@@ -863,7 +912,8 @@ var messageCommand = defineCommand({
863
912
  required: false
864
913
  },
865
914
  text: { type: "positional", stdinArg: true, description: "Message text. Pass - to read from stdin.", required: false },
866
- attach: { type: "string", description: "File to attach (repeatable)." }
915
+ attach: { type: "string", description: "File to attach (repeatable). Not with --share-post or --share-job." },
916
+ ...SHARE_ARGS
867
917
  },
868
918
  subCommands: {
869
919
  new: messageNewCommand,
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  requireAccount
4
- } from "./chunk-AQCLTQXN.js";
4
+ } from "./chunk-HOS3JH4L.js";
5
5
  import {
6
6
  writeAtomic
7
7
  } from "./chunk-GOICALYQ.js";
8
8
  import {
9
9
  sendInChunks
10
- } from "./chunk-VNK3HERF.js";
10
+ } from "./chunk-5YQXZIFH.js";
11
11
  import {
12
12
  fail,
13
13
  listFlag,
14
14
  outputOpts,
15
15
  rootClient,
16
16
  usage
17
- } from "./chunk-WR6FIP24.js";
17
+ } from "./chunk-GGJTO3PN.js";
18
18
  import {
19
19
  buildPreviewOutput
20
20
  } from "./chunk-TCUYH5GO.js";
@@ -29,14 +29,14 @@ import {
29
29
  readablePage,
30
30
  rejectPaginationModifiersWithoutAll,
31
31
  streamAll
32
- } from "./chunk-MYVSB7NJ.js";
32
+ } from "./chunk-UFHZGBFD.js";
33
33
  import {
34
34
  renderSuccess,
35
35
  writeNdjsonItem
36
36
  } from "./chunk-QM57YDJE.js";
37
37
  import {
38
38
  downloadBinary
39
- } from "./chunk-J2RPEWQB.js";
39
+ } from "./chunk-I3HD5UFH.js";
40
40
  import {
41
41
  GLOBAL_FLAGS,
42
42
  READ_SINGLE_FLAGS,
@@ -501,15 +501,15 @@ var contactCommand = defineCommand({
501
501
  create: createCmd,
502
502
  update: updateCmd,
503
503
  delete: deleteCmd,
504
- import: lazy("contactImport", () => import("./contact-import-MDPIZ67M.js").then((m) => m.contactImportCommand)),
504
+ import: lazy("contactImport", () => import("./contact-import-SSPUBHAH.js").then((m) => m.contactImportCommand)),
505
505
  export: exportCmd,
506
506
  enrich: enrichCmd,
507
- lists: lazy("contactLists", () => import("./contact-groups-4IM5RVLE.js").then((m) => m.contactListsCommand)),
508
- tags: lazy("contactTags", () => import("./contact-groups-4IM5RVLE.js").then((m) => m.contactTagsCommand)),
509
- imports: lazy("contactImports", () => import("./contact-import-MDPIZ67M.js").then((m) => m.contactImportsCommand))
507
+ lists: lazy("contactLists", () => import("./contact-groups-IHF7GMNG.js").then((m) => m.contactListsCommand)),
508
+ tags: lazy("contactTags", () => import("./contact-groups-IHF7GMNG.js").then((m) => m.contactTagsCommand)),
509
+ imports: lazy("contactImports", () => import("./contact-import-SSPUBHAH.js").then((m) => m.contactImportsCommand))
510
510
  },
511
511
  async run() {
512
- const { showHelp } = await import("./examples-JJB4DZKK.js");
512
+ const { showHelp } = await import("./examples-74FXGJ7X.js");
513
513
  await showHelp(contactCommand, ["curviate", "contact"]);
514
514
  }
515
515
  });
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-QM57YDJE.js";
6
6
  import {
7
7
  isPlainObject
8
- } from "./chunk-J2RPEWQB.js";
8
+ } from "./chunk-I3HD5UFH.js";
9
9
 
10
10
  // src/lib/paginate.ts
11
11
  import { CurviateError } from "@curviate/sdk";