@curviate/cli 0.23.0 → 0.23.2

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 (31) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +65 -23
  3. package/dist/{account-MIPWTAG5.js → account-JBSYX6D2.js} +9 -10
  4. package/dist/{chunk-H6XD3F66.js → chunk-766W25QS.js} +1 -1
  5. package/dist/{chunk-ZYURL5VK.js → chunk-AHYUM2XQ.js} +93 -1
  6. package/dist/{chunk-56ORAZJO.js → chunk-LCIUD7S2.js} +1 -1
  7. package/dist/{chunk-3BO6GVS2.js → chunk-LCLYFE54.js} +1 -1
  8. package/dist/{chunk-MBO4LBLY.js → chunk-S6VAMUCC.js} +4 -6
  9. package/dist/{chunk-CUTMZWL6.js → chunk-SYRFLZ4D.js} +2 -94
  10. package/dist/{chunk-JA3NNST6.js → chunk-TKWW6BV6.js} +2 -2
  11. package/dist/{chunk-RFUO2G3M.js → chunk-VAUKRTRG.js} +5 -4
  12. package/dist/cli.js +107 -68
  13. package/dist/{comment-TUXC7K72.js → comment-SXYTJPXI.js} +6 -7
  14. package/dist/{company-LHYDAO2C.js → company-3UB4P77N.js} +9 -10
  15. package/dist/{config-FPWWYG7G.js → config-YKQ4QEBI.js} +4 -3
  16. package/dist/{connect-5S4TFQAF.js → connect-DFZEYMLV.js} +6 -6
  17. package/dist/{feed-ISNH4NXB.js → feed-ZY27EY52.js} +5 -5
  18. package/dist/{group-PHGUOOJE.js → group-DBE25EID.js} +5 -5
  19. package/dist/{inbox-3IQPPQMH.js → inbox-E6ME3ROZ.js} +5 -5
  20. package/dist/{inboxes-JK36F6SK.js → inboxes-JRX3J32A.js} +5 -5
  21. package/dist/{job-JQG34ATV.js → job-URLZ4GU7.js} +6 -6
  22. package/dist/{login-ZLDDIAFW.js → login-ERQVI27Q.js} +3 -3
  23. package/dist/{message-2WIZESSM.js → message-NPX7UX46.js} +5 -5
  24. package/dist/{notification-ORSZY2IJ.js → notification-XSSA5QOJ.js} +5 -5
  25. package/dist/{post-JRJMGV2I.js → post-OSM7JH65.js} +6 -7
  26. package/dist/{profile-SUKHRWQP.js → profile-HPZII6A5.js} +8 -8
  27. package/dist/{recruiter-NIKKDGMR.js → recruiter-VAZV2JJJ.js} +8 -9
  28. package/dist/{sales-nav-4MFL2JSE.js → sales-nav-LSUBIJWZ.js} +6 -6
  29. package/dist/{search-MZQJDJTX.js → search-52CISWQV.js} +19 -19
  30. package/dist/{webhook-7ESDSIRU.js → webhook-C43C5BK7.js} +5 -10
  31. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -8,6 +8,54 @@ a new command or flag is a minor; a breaking command/flag/exit-code change is a
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.23.2] - 2026-08-13
12
+
13
+ ### Changed
14
+
15
+ - **`@curviate/sdk` dependency floor raised to `^0.21.0`** (was `^0.20.1`).
16
+ The new SDK minor carries two changes that are breaking for a typed
17
+ consumer of the SDK directly (`total_count` and a search result's
18
+ `profile_url` are now nullable; profile section arrays gained a described
19
+ shape), but this CLI does not read any of those fields directly, so no CLI
20
+ behavior changes. Typecheck, lint, and the full test suite are unaffected.
21
+
22
+ ### Fixed
23
+
24
+ - **`profile` reported every past role as the person's current job, with no
25
+ job title and a malformed company name.** The `current_position` projection
26
+ read three field names that do not exist on the wire: `position` for the
27
+ title, `company` as if it were a name string, and `end` for the end date.
28
+ The visible result was `title: null` on every profile, a company object
29
+ emitted into `company_name` where the field is documented as a string, and
30
+ `is_current: true` for roles that ended years ago. It now reads `job_title`,
31
+ `company.name`, and `ended_on`. A role is current when `ended_on` is absent,
32
+ which is the only signal the platform provides. `company_id` is also
33
+ populated now, from `company.id`, instead of always being null.
34
+
35
+ If you consumed `current_position.is_current`, treat every previous reading
36
+ of `true` as unverified: it was returned unconditionally.
37
+
38
+ ## [0.23.1] - 2026-08-10
39
+
40
+ ### Fixed
41
+
42
+ - **A global flag placed before the subcommand was rejected, and any flag
43
+ value beginning with `-` was rejected.** `curviate --api-key <key> account
44
+ list` exited 2 with "unknown command", and a value like `--api-key
45
+ -something` exited 2 with "unknown flag". Both shared one root cause: the
46
+ dispatcher's flag scan never tracked which tokens it had already consumed
47
+ as another flag's value, so it re-inspected a value token as if it were
48
+ fresh input, misreading a flag's value as the subcommand name in the first
49
+ case and re-scanning a dash-prefixed value as its own (unknown) flag in the
50
+ second. Fixing the scan surfaced a second, more serious defect on the same
51
+ path: once a leading global flag was correctly found, the token AFTER it
52
+ was dropped entirely on the way to the resolved command, so the flag's
53
+ value silently never reached the request at all (a stored profile or
54
+ environment variable answered instead, with no error). All three are
55
+ fixed. Global flags now work in any position, and a flag value starting
56
+ with `-` (an API key, a negative `--limit`, a message beginning with a
57
+ dash) is bound exactly as typed.
58
+
11
59
  ## [0.23.0] - 2026-08-10
12
60
 
13
61
  A security and correctness release. Upgrade promptly if `--account` is ever
package/README.md CHANGED
@@ -47,12 +47,14 @@ curviate --api-key <your-api-key> account list
47
47
  > history. Prefer `curviate login` or the `CURVIATE_API_KEY` environment
48
48
  > variable; reserve `--api-key` for one-off, low-trust contexts.
49
49
 
50
- Get your API key from the [Curviate dashboard](https://docs.curviate.com).
50
+ Get your API key from the [Curviate dashboard](https://app.curviate.com).
51
51
 
52
52
  ## Usage
53
53
 
54
54
  ```
55
- curviate [command] [subcommand] [flags]
55
+ curviate [flags] [command] [subcommand] [flags]
56
+
57
+ Global flags may appear anywhere in the invocation, before the command or after it.
56
58
 
57
59
  Global flags available on every command:
58
60
  --account Target a specific account ID
@@ -62,9 +64,11 @@ Global flags available on every command:
62
64
  --fields Comma-separated list of fields to include in JSON output
63
65
  --limit Maximum number of results to return per page
64
66
  --cursor Pagination cursor from a previous response
65
- --all Fetch all pages (streams results)
67
+ --all Stream all pages as NDJSON
66
68
  --max-pages Cap on the number of pages fetched with --all
69
+ --page-delay Milliseconds to pause between pages when --all is used (default 400)
67
70
  --preview Show what would happen without sending any write request
71
+ --verbose Output the full SDK response instead of the slim default
68
72
  --base-url Override the API base URL (for testing)
69
73
  --timeout Request timeout in milliseconds (default: 30000)
70
74
  ```
@@ -77,44 +81,59 @@ These examples show how coding agents compose the CLI in real workflows.
77
81
 
78
82
  ### 1. Find people and send connection requests
79
83
 
80
- Search for matching profiles, preview the invitations, then send them once satisfied:
84
+ Search for matching profiles, preview the invitations, then send them once satisfied.
85
+ `--location` on `search people` takes location **ids**, not free text; resolve a
86
+ human-readable place name to an id first with `curviate search parameters --type LOCATION`:
81
87
 
82
88
  ```bash
83
- # Look first: a search is a read, so it just runs (no --preview on reads)
89
+ curviate search parameters --type LOCATION --keywords "Berlin" --account acc_1 --json
90
+ # {"items":[{"id":"103035651","name":"Berlin, Germany"}, {"id":"106967730","name":"Berlin, Berlin, Germany"}, ...]}
91
+
92
+ # Look first, a search is a read, so it just runs (no --preview on reads)
84
93
  curviate search people \
85
94
  --keywords "AI engineer" \
86
- --location "Berlin" \
95
+ --location 103035651 \
96
+ --account acc_1 \
87
97
  --limit 10 \
88
98
  --json
89
99
 
90
100
  # Preview a single write before sending, then pipe IDs into connect, one request per person
91
- curviate connect "$SOME_ID" --note "Hi, I'd love to connect." --preview
101
+ curviate connect "$SOME_ID" --account acc_1 --note "Hi, I'd love to connect." --preview
92
102
 
93
- curviate search people --keywords "AI engineer" --location "Berlin" --all \
103
+ curviate search people --keywords "AI engineer" --location 103035651 --account acc_1 --all \
94
104
  | jq -r '.id' \
95
105
  | head -5 \
96
- | xargs -I{} curviate connect {} --note "Hi, I'd love to connect."
106
+ | xargs -I{} curviate connect {} --account acc_1 --note "Hi, I'd love to connect."
97
107
  ```
98
108
 
99
109
  ### 2. Triage the inbox and extract unread threads
100
110
 
101
- Pull the inbox as JSON, filter unread chats, and surface the most recent message from each:
111
+ Pull the inbox, filter unread chats, and surface the most recent message from each.
112
+ `--all` streams **NDJSON** (one JSON object per line), not a `{items:[...]}` envelope or a
113
+ bare array, so pipe each line straight into `jq` with no `.[]`. The chat's own id is `id`
114
+ (`chat_id` only appears nested inside `last_message`, pointing back at its own chat); the
115
+ unread signal is the integer `unread_count`, not a boolean `unread`; and `last_message` has
116
+ no `sender` object, only `sender_id` (a provider id, not a display name), so a
117
+ human-readable sender comes from the chat's own `user.display_name` instead (present on
118
+ 1:1 chats):
102
119
 
103
120
  ```bash
104
- curviate inbox list --json --all \
105
- | jq '[.[] | select(.unread == true) | {chat_id, sender: .last_message.sender, preview: .last_message.text[0:80]}]'
121
+ curviate inbox list --json --all --account acc_1 \
122
+ | jq -c 'select(.unread_count > 0) | {chat_id: .id, sender: (.user.display_name // .last_message.sender_id), preview: .last_message.text[0:80]}'
106
123
  ```
107
124
 
108
125
  ### 3. Warm up a prospect by reacting to their recent posts
109
126
 
110
- Read recent posts from a profile, then react to each, which is useful for ambient warm-up before outreach:
127
+ Read recent posts from a profile, then react to each, useful for ambient warm-up before outreach.
128
+ A post's id is `id` (there is no `post_id` field), and `--posts` returns a `{items:[...]}`
129
+ envelope, not a bare array:
111
130
 
112
131
  ```bash
113
132
  PROFILE_URL="https://www.linkedin.com/in/example"
114
133
 
115
- curviate profile "$PROFILE_URL" --posts --fields post_id --json \
116
- | jq -r '.[].post_id' \
117
- | xargs -I{} curviate post react {} --reaction like
134
+ curviate profile "$PROFILE_URL" --posts --fields id --account acc_1 --json \
135
+ | jq -r '.items[].id' \
136
+ | xargs -I{} curviate post react {} --account acc_1 --reaction like
118
137
  ```
119
138
 
120
139
  ### 4. Check tier entitlement before a Sales Navigator sweep
@@ -122,7 +141,7 @@ curviate profile "$PROFILE_URL" --posts --fields post_id --json \
122
141
  Exit code `5` means the account lacks the required add-on. Branch on it in a script:
123
142
 
124
143
  ```bash
125
- curviate sales-nav search people --keywords "VP Engineering" --json \
144
+ curviate sales-nav search people --keywords "VP Engineering" --account acc_1 --json \
126
145
  || {
127
146
  code=$?
128
147
  if [ "$code" -eq 5 ]; then
@@ -152,11 +171,13 @@ Exit `2` means the signature is invalid or the replay window has expired.
152
171
 
153
172
  ### 6. Export all accounts to a CSV (agent-friendly pipeline)
154
173
 
155
- List every connected account, select key fields, and format as CSV with `jq`:
174
+ List every connected account, select key fields, and format as CSV with `jq`. `--all` streams
175
+ NDJSON, so slurp it into an array first with `jq -s`; the fields are `account_id` and
176
+ `full_name`, not `id` / `name`:
156
177
 
157
178
  ```bash
158
179
  curviate account list --all --json \
159
- | jq -r '["id","name","status"], (.[] | [.id, .name, .status]) | @csv' \
180
+ | jq -s -r '["account_id","full_name","status"], (.[] | [.account_id, .full_name, .status]) | @csv' \
160
181
  > accounts.csv
161
182
  ```
162
183
 
@@ -229,10 +250,13 @@ curviate sales-nav save-lead ACwAAA1234567 --account acc_1 --list 987654
229
250
 
230
251
  ### 3. Start a new Sales Navigator chat
231
252
 
253
+ `--subject` is required for Sales Navigator messaging.
254
+
232
255
  ```bash
233
256
  curviate sales-nav message new \
234
257
  --to ACwAAA1234567 \
235
258
  --account acc_1 \
259
+ --subject "An opportunity at our company" \
236
260
  "Hi, I'd love to connect about an opportunity at our company."
237
261
  ```
238
262
 
@@ -314,8 +338,12 @@ curviate recruiter project-job get "$PROJECT_ID" --account acc_1 --json
314
338
 
315
339
  ### 3. Create a job posting draft, then publish it
316
340
 
317
- `recruiter job create` requires `--project-name` (the hiring project the posting opens) and takes
318
- the v2 job body. `recruiter job publish` is project-scoped and requires `--mode`
341
+ `recruiter job create` requires `--project-name` (the hiring project the posting opens) plus the
342
+ full v2 job body: `--job-title`, `--company-id`/`--company-name`, `--workplace-type`, `--location`,
343
+ `--employment-status`, `--seniority-level`, `--description` (200 characters minimum), `--industry`,
344
+ `--job-function`, and `--apply-method`. `--location`/`--industry`/`--job-function` take resolved
345
+ parameter ids, the same `search parameters --type LOCATION`/`--type INDUSTRY`/`--type JOB_FUNCTION`
346
+ resolution from example 1 above. `recruiter job publish` is project-scoped and requires `--mode`
319
347
  (`FREE | PROMOTED | PROMOTED_PLUS`); the paid modes also require the full `--budget-*` triple.
320
348
 
321
349
  ```bash
@@ -323,8 +351,15 @@ curviate recruiter job create \
323
351
  --account acc_1 \
324
352
  --project-name "Backend Hiring 2026" \
325
353
  --job-title "Senior Backend Engineer" \
326
- --description "Remote-first team building the core platform." \
354
+ --company-name "Curviate GmbH" \
355
+ --workplace-type REMOTE \
356
+ --location 103035651 \
327
357
  --employment-status FULL_TIME \
358
+ --seniority-level MID_SENIOR_LEVEL \
359
+ --description "We are looking for a senior backend engineer to join our remote-first team building the core platform that powers agent-native LinkedIn automation for thousands of developers and their AI agents worldwide." \
360
+ --industry 96 \
361
+ --job-function 15 \
362
+ --apply-method linkedin \
328
363
  --json
329
364
 
330
365
  curviate recruiter job publish "$PROJECT_ID" "$JOB_ID" --account acc_1 --mode FREE --json
@@ -380,7 +415,7 @@ curviate recruiter message new \
380
415
  --to AEM789 \
381
416
  --account acc_1 \
382
417
  --subject "A role you'd be a great fit for" \
383
- --signature "- Alex, Talent Team" \
418
+ --signature "Alex, Talent Team" \
384
419
  "Hi, I came across your profile and think you'd be a great fit for a role we're hiring for."
385
420
  ```
386
421
 
@@ -407,6 +442,13 @@ curviate recruiter job get "https://www.linkedin.com/jobs/view/4428113858" --acc
407
442
  | 3 | Authentication or authorization failure |
408
443
  | 4 | Resource not found |
409
444
  | 5 | Feature requires an add-on or higher plan |
445
+ | 6 | Rate limited |
446
+ | 7 | Transient platform error (retry likely to succeed) |
447
+ | 8 | Account or connection state blocks the request |
448
+ | 9 | Checkpoint flow error (expired, invalid code, or too many attempts) |
449
+ | 10 | Messaging window expired or recipient unreachable |
450
+ | 11 | Billing issue (payment required, failed, or seat cancelled) |
451
+ | 12 | Auth action needed (a pending checkpoint; not an error) |
410
452
 
411
453
  ## License
412
454
 
@@ -6,11 +6,11 @@ import {
6
6
  slimAccountGet,
7
7
  slimAccountList,
8
8
  slimAccountListItem
9
- } from "./chunk-RFUO2G3M.js";
9
+ } from "./chunk-VAUKRTRG.js";
10
10
  import {
11
11
  pageDelayFromFlags,
12
12
  streamAll
13
- } from "./chunk-H6XD3F66.js";
13
+ } from "./chunk-766W25QS.js";
14
14
  import {
15
15
  buildPreviewOutput
16
16
  } from "./chunk-R3VLWLVV.js";
@@ -20,15 +20,14 @@ import {
20
20
  renderSuccess,
21
21
  renderUnexpectedError,
22
22
  resolveEffectiveConfig
23
- } from "./chunk-JA3NNST6.js";
23
+ } from "./chunk-TKWW6BV6.js";
24
+ import "./chunk-SYRFLZ4D.js";
24
25
  import {
25
26
  GLOBAL_FLAGS,
26
27
  READ_SINGLE_FLAGS,
27
- WRITE_SINGLE_FLAGS
28
- } from "./chunk-CUTMZWL6.js";
29
- import {
28
+ WRITE_SINGLE_FLAGS,
30
29
  defaultReadStdin
31
- } from "./chunk-ZYURL5VK.js";
30
+ } from "./chunk-AHYUM2XQ.js";
32
31
  import {
33
32
  AUTH_NEEDED
34
33
  } from "./chunk-PMRQXBCP.js";
@@ -1101,11 +1100,11 @@ var accountCheckpointPollCommand = defineCommand({
1101
1100
  },
1102
1101
  // Override WRITE_SINGLE_FLAGS.timeout: on this command --timeout is the
1103
1102
  // --wait loop's own wall-clock bound in MILLISECONDS (requires --wait),
1104
- // NOT the SDK request timeout, and NOT seconds like `inbox sync-chat
1105
- // --timeout`. Default: the time remaining to the checkpoint's own expiry.
1103
+ // NOT the SDK request timeout. Default: the time remaining to the
1104
+ // checkpoint's own expiry.
1106
1105
  timeout: {
1107
1106
  type: "string",
1108
- description: "Wait-loop timeout in milliseconds (requires --wait; default: time remaining to the checkpoint's expiry). Note the unit: this is milliseconds; `inbox sync-chat --timeout` is seconds."
1107
+ description: "Wait-loop timeout in milliseconds (requires --wait; default: time remaining to the checkpoint's expiry)."
1109
1108
  }
1110
1109
  },
1111
1110
  async run({ args }) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  renderNotices
4
- } from "./chunk-JA3NNST6.js";
4
+ } from "./chunk-TKWW6BV6.js";
5
5
 
6
6
  // src/lib/paginate.ts
7
7
  var PaginateError = class extends Error {
@@ -73,11 +73,103 @@ async function resolveTextOrStdin(rawText, out, readStdin) {
73
73
  return text;
74
74
  }
75
75
 
76
+ // src/lib/global-flags.ts
77
+ var GLOBAL_FLAGS = {
78
+ // Auth / config
79
+ "api-key": {
80
+ type: "string",
81
+ description: "API key (overrides env and profile). Note: a key passed on the command line is visible to other processes via `ps` and is saved in shell history; prefer the CURVIATE_API_KEY env var or `curviate login`."
82
+ },
83
+ profile: {
84
+ type: "string",
85
+ description: "Named profile to use from the config file."
86
+ },
87
+ account: {
88
+ type: "string",
89
+ description: "Account id for account-scoped commands."
90
+ },
91
+ "base-url": {
92
+ type: "string",
93
+ description: "Override the API base URL."
94
+ },
95
+ timeout: {
96
+ type: "string",
97
+ description: "Request timeout in milliseconds."
98
+ },
99
+ // Output
100
+ json: {
101
+ type: "boolean",
102
+ description: "Emit JSON output (default when stdout is not a TTY).",
103
+ default: false
104
+ },
105
+ fields: {
106
+ type: "string",
107
+ description: "Comma-separated dot-path field projection (e.g. id,name)."
108
+ },
109
+ limit: {
110
+ type: "string",
111
+ description: "Maximum items per page."
112
+ },
113
+ cursor: {
114
+ type: "string",
115
+ description: "Pagination cursor (opaque token from a previous response)."
116
+ },
117
+ all: {
118
+ type: "boolean",
119
+ description: "Stream all pages as NDJSON.",
120
+ default: false
121
+ },
122
+ "max-pages": {
123
+ type: "string",
124
+ description: "Maximum number of pages to fetch when --all is used."
125
+ },
126
+ "page-delay": {
127
+ type: "string",
128
+ 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."
129
+ },
130
+ preview: {
131
+ type: "boolean",
132
+ description: "Render the request that would be sent without calling the API.",
133
+ default: false
134
+ },
135
+ verbose: {
136
+ type: "boolean",
137
+ description: "Output the full SDK response instead of the slim default.",
138
+ default: false
139
+ }
140
+ };
141
+ var WRITE_FLAGS = {
142
+ "api-key": GLOBAL_FLAGS["api-key"],
143
+ profile: GLOBAL_FLAGS.profile,
144
+ account: GLOBAL_FLAGS.account,
145
+ "base-url": GLOBAL_FLAGS["base-url"],
146
+ timeout: GLOBAL_FLAGS.timeout,
147
+ json: GLOBAL_FLAGS.json,
148
+ preview: GLOBAL_FLAGS.preview,
149
+ verbose: GLOBAL_FLAGS.verbose
150
+ };
151
+ var READ_SINGLE_FLAGS = {
152
+ "api-key": GLOBAL_FLAGS["api-key"],
153
+ profile: GLOBAL_FLAGS.profile,
154
+ account: GLOBAL_FLAGS.account,
155
+ "base-url": GLOBAL_FLAGS["base-url"],
156
+ timeout: GLOBAL_FLAGS.timeout,
157
+ json: GLOBAL_FLAGS.json,
158
+ fields: GLOBAL_FLAGS.fields,
159
+ preview: GLOBAL_FLAGS.preview,
160
+ verbose: GLOBAL_FLAGS.verbose
161
+ };
162
+ var WRITE_SINGLE_FLAGS = READ_SINGLE_FLAGS;
163
+
76
164
  export {
77
165
  STDIN_SENTINEL,
78
166
  defaultReadStdin,
79
167
  isStdinToken,
80
168
  restoreLiteralDashes,
81
169
  assertNoStdinPlaceholder,
82
- resolveTextOrStdin
170
+ resolveTextOrStdin,
171
+ GLOBAL_FLAGS,
172
+ WRITE_FLAGS,
173
+ READ_SINGLE_FLAGS,
174
+ WRITE_SINGLE_FLAGS
83
175
  };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  isStdinToken
4
- } from "./chunk-ZYURL5VK.js";
4
+ } from "./chunk-AHYUM2XQ.js";
5
5
 
6
6
  // src/lib/search-filters.ts
7
7
  import { readFile } from "fs/promises";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  assertNoStdinPlaceholder
4
- } from "./chunk-ZYURL5VK.js";
4
+ } from "./chunk-AHYUM2XQ.js";
5
5
  import {
6
6
  getExitCode
7
7
  } from "./chunk-PMRQXBCP.js";
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-UEAX6KUB.js";
19
19
  import {
20
20
  requireAccount
21
- } from "./chunk-3BO6GVS2.js";
21
+ } from "./chunk-LCLYFE54.js";
22
22
  import {
23
23
  buildPreviewOutput
24
24
  } from "./chunk-R3VLWLVV.js";
@@ -28,14 +28,12 @@ import {
28
28
  renderSuccess,
29
29
  renderUnexpectedError,
30
30
  resolveEffectiveConfig
31
- } from "./chunk-JA3NNST6.js";
31
+ } from "./chunk-TKWW6BV6.js";
32
32
  import {
33
33
  READ_SINGLE_FLAGS,
34
- WRITE_FLAGS
35
- } from "./chunk-CUTMZWL6.js";
36
- import {
34
+ WRITE_FLAGS,
37
35
  resolveTextOrStdin
38
- } from "./chunk-ZYURL5VK.js";
36
+ } from "./chunk-AHYUM2XQ.js";
39
37
 
40
38
  // src/commands/message.ts
41
39
  import { defineCommand } from "citty";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  assertNoStdinPlaceholder
4
- } from "./chunk-ZYURL5VK.js";
4
+ } from "./chunk-AHYUM2XQ.js";
5
5
 
6
6
  // src/lib/config.ts
7
7
  import {
@@ -130,94 +130,6 @@ async function updateProfileField(profileName, field, value) {
130
130
  await writeConfig(cfg);
131
131
  }
132
132
 
133
- // src/lib/global-flags.ts
134
- var GLOBAL_FLAGS = {
135
- // Auth / config
136
- "api-key": {
137
- type: "string",
138
- description: "API key (overrides env and profile). Note: a key passed on the command line is visible to other processes via `ps` and is saved in shell history; prefer the CURVIATE_API_KEY env var or `curviate login`."
139
- },
140
- profile: {
141
- type: "string",
142
- description: "Named profile to use from the config file."
143
- },
144
- account: {
145
- type: "string",
146
- description: "Account id for account-scoped commands."
147
- },
148
- "base-url": {
149
- type: "string",
150
- description: "Override the API base URL."
151
- },
152
- timeout: {
153
- type: "string",
154
- description: "Request timeout in milliseconds."
155
- },
156
- // Output
157
- json: {
158
- type: "boolean",
159
- description: "Emit JSON output (default when stdout is not a TTY).",
160
- default: false
161
- },
162
- fields: {
163
- type: "string",
164
- description: "Comma-separated dot-path field projection (e.g. id,name)."
165
- },
166
- limit: {
167
- type: "string",
168
- description: "Maximum items per page."
169
- },
170
- cursor: {
171
- type: "string",
172
- description: "Pagination cursor (opaque token from a previous response)."
173
- },
174
- all: {
175
- type: "boolean",
176
- description: "Stream all pages as NDJSON.",
177
- default: false
178
- },
179
- "max-pages": {
180
- type: "string",
181
- description: "Maximum number of pages to fetch when --all is used."
182
- },
183
- "page-delay": {
184
- type: "string",
185
- 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."
186
- },
187
- preview: {
188
- type: "boolean",
189
- description: "Render the request that would be sent without calling the API.",
190
- default: false
191
- },
192
- verbose: {
193
- type: "boolean",
194
- description: "Output the full SDK response instead of the slim default.",
195
- default: false
196
- }
197
- };
198
- var WRITE_FLAGS = {
199
- "api-key": GLOBAL_FLAGS["api-key"],
200
- profile: GLOBAL_FLAGS.profile,
201
- account: GLOBAL_FLAGS.account,
202
- "base-url": GLOBAL_FLAGS["base-url"],
203
- timeout: GLOBAL_FLAGS.timeout,
204
- json: GLOBAL_FLAGS.json,
205
- preview: GLOBAL_FLAGS.preview,
206
- verbose: GLOBAL_FLAGS.verbose
207
- };
208
- var READ_SINGLE_FLAGS = {
209
- "api-key": GLOBAL_FLAGS["api-key"],
210
- profile: GLOBAL_FLAGS.profile,
211
- account: GLOBAL_FLAGS.account,
212
- "base-url": GLOBAL_FLAGS["base-url"],
213
- timeout: GLOBAL_FLAGS.timeout,
214
- json: GLOBAL_FLAGS.json,
215
- fields: GLOBAL_FLAGS.fields,
216
- preview: GLOBAL_FLAGS.preview,
217
- verbose: GLOBAL_FLAGS.verbose
218
- };
219
- var WRITE_SINGLE_FLAGS = READ_SINGLE_FLAGS;
220
-
221
133
  export {
222
134
  getConfigPath,
223
135
  readConfig,
@@ -225,9 +137,5 @@ export {
225
137
  setActiveProfile,
226
138
  renameProfile,
227
139
  removeProfile,
228
- updateProfileField,
229
- GLOBAL_FLAGS,
230
- WRITE_FLAGS,
231
- READ_SINGLE_FLAGS,
232
- WRITE_SINGLE_FLAGS
140
+ updateProfileField
233
141
  };
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readConfig
4
- } from "./chunk-CUTMZWL6.js";
4
+ } from "./chunk-SYRFLZ4D.js";
5
5
  import {
6
6
  assertNoStdinPlaceholder
7
- } from "./chunk-ZYURL5VK.js";
7
+ } from "./chunk-AHYUM2XQ.js";
8
8
 
9
9
  // src/lib/resolve.ts
10
10
  var DEFAULT_BASE_URL = "https://api.curviate.com";
@@ -6,11 +6,12 @@ function synthesizeCurrentPosition(workExperience) {
6
6
  return null;
7
7
  }
8
8
  const entry = workExperience[0];
9
+ const company = entry["company"] !== null && typeof entry["company"] === "object" ? entry["company"] : null;
9
10
  return {
10
- title: entry["position"] ?? null,
11
- company_name: entry["company"] ?? null,
12
- company_id: null,
13
- is_current: entry["end"] == null
11
+ title: entry["job_title"] ?? null,
12
+ company_name: company?.["name"] ?? null,
13
+ company_id: company?.["id"] ?? null,
14
+ is_current: entry["ended_on"] == null
14
15
  };
15
16
  }
16
17
  function synthesizeHeadquarters(locations) {