@curviate/cli 0.24.2 → 0.25.0

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 (27) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/README.md +10 -0
  3. package/dist/{account-JBSYX6D2.js → account-52BUCCTZ.js} +3 -3
  4. package/dist/{chunk-SYRFLZ4D.js → chunk-KTY7R27U.js} +6 -2
  5. package/dist/{chunk-766W25QS.js → chunk-PS6QPY67.js} +1 -1
  6. package/dist/{chunk-S6VAMUCC.js → chunk-RXIPY4O7.js} +1 -1
  7. package/dist/{chunk-TKWW6BV6.js → chunk-XHVR32RW.js} +3 -3
  8. package/dist/cli.js +23 -21
  9. package/dist/{comment-SXYTJPXI.js → comment-XAF7AMHR.js} +3 -3
  10. package/dist/{company-3UB4P77N.js → company-PAKHOCVR.js} +4 -4
  11. package/dist/{config-YKQ4QEBI.js → config-5HB2J3RY.js} +2 -2
  12. package/dist/{connect-DFZEYMLV.js → connect-5TMGM326.js} +3 -3
  13. package/dist/{feed-ZY27EY52.js → feed-E5EQMI7T.js} +3 -3
  14. package/dist/{group-DBE25EID.js → group-SNCEAWKI.js} +3 -3
  15. package/dist/{inbox-E6ME3ROZ.js → inbox-R5OSZWTG.js} +20 -3
  16. package/dist/{inboxes-JRX3J32A.js → inboxes-6XMIABRX.js} +3 -3
  17. package/dist/{job-URLZ4GU7.js → job-3HU7KQQI.js} +3 -3
  18. package/dist/{login-ERQVI27Q.js → login-KNNEN4HP.js} +1 -1
  19. package/dist/{message-NPX7UX46.js → message-GA7D3A6Y.js} +3 -3
  20. package/dist/{notification-XSSA5QOJ.js → notification-B5PTNNPE.js} +3 -3
  21. package/dist/{post-OSM7JH65.js → post-QAVRVRON.js} +3 -3
  22. package/dist/{profile-HPZII6A5.js → profile-REKGQYAW.js} +3 -3
  23. package/dist/{recruiter-UKBLQ2PE.js → recruiter-N36AROW7.js} +3 -3
  24. package/dist/{sales-nav-7EE4UGNF.js → sales-nav-Q5RVL4PR.js} +3 -3
  25. package/dist/{search-GBMRH4LG.js → search-SYWHOM5J.js} +7 -6
  26. package/dist/{webhook-C43C5BK7.js → webhook-RE2BGX3N.js} +3 -3
  27. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,73 @@ 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.25.0] - 2026-08-29
12
+
13
+ ### Added
14
+
15
+ - **`inbox list --inbox <folder>` selects which inbox folder to read.**
16
+ Accepts the six folders the endpoint supports: `primary` (the default),
17
+ `inmail`, `archived`, `spam`, `jobs`, `starred`. Without the flag the
18
+ behaviour is unchanged, and the parameter is omitted from the request
19
+ rather than sent explicitly.
20
+
21
+ Previously `inbox list` could only ever read `primary`, which left
22
+ archived conversations unreachable from the CLI at any `--limit` and at
23
+ any pagination depth; on a test account, 34 archived chats were absent
24
+ from a full walk of the inbox. `inmail` and `starred` are alternate
25
+ views over conversations `primary` already returns, so for those the
26
+ flag is a filter rather than a way to reach anything new.
27
+
28
+ An unrecognised value fails before any network call, with exit code 2
29
+ and a message naming the accepted values. The flag composes with
30
+ `--all` and `--cursor`, so a folder can be walked to exhaustion.
31
+
32
+ ## [0.24.3] - 2026-08-29
33
+
34
+ ### Fixed
35
+
36
+ - **A profile name of `constructor` (or any other `Object.prototype` member
37
+ name) is no longer treated as an existing profile it never was.**
38
+ `cfg.profiles[profileName]`, read against a plain object straight
39
+ off `JSON.parse` or a fresh `{}`, resolved `"constructor"` to the live,
40
+ inherited `Function`, truthy, so `curviate config use constructor`
41
+ incorrectly succeeded ("Switched to profile...") on a profile that was
42
+ never written, and `curviate config rename <name> constructor` incorrectly
43
+ refused with "already exists". `profiles` is now rebuilt with no prototype
44
+ (`Object.create(null)`) at both places a config is constructed, so every
45
+ lookup against it is safe by construction, including a profile literally
46
+ named `__proto__`, which previously silently vanished on write (the
47
+ bracket assignment hit the inherited `__proto__` accessor instead of
48
+ creating an own key) instead of being saved.
49
+ - **The same "user-typed token indexes a plain object" shape also lived in
50
+ command routing** (`src/dispatch.ts`): a subcommand token of
51
+ `hasOwnProperty` crashed ("Cannot convert undefined or null to object",
52
+ the inherited method invoked with no receiver) instead of exiting 2 with
53
+ "unknown command", and `constructor` / `toString` silently no-opped
54
+ (exit 0, no output) instead of erroring. Both the subcommand-keyword match
55
+ and the removed-command "did you mean" lookup now guard with
56
+ `Object.prototype.hasOwnProperty.call` before indexing, matching the
57
+ pattern already used elsewhere in this file for the id-first reroute path.
58
+ - **The same shape reached two more surfaces on write, not just read.**
59
+ `config list --json` rebuilt a fresh `{}` and assigned
60
+ `redacted[name] = ...` for each profile: a profile literally named
61
+ `__proto__` hit the inherited accessor on that assignment instead of
62
+ creating an own key, so it silently vanished from `--json` output (exit
63
+ 0, no warning) while text mode still printed it. `--fields` (the
64
+ projection flag on every command) carried the same shape in
65
+ `projectFields`: a response field genuinely named `__proto__` was
66
+ silently dropped from the projected output. An inherited member name
67
+ like `constructor` was already refused upstream by the available-keys
68
+ check, so the matching read-side guard is defense in depth rather than
69
+ a user-visible fix. All three sites are now built with no prototype
70
+ (`Object.create(null)`) or guarded with `hasOwnProperty.call`, same as
71
+ above.
72
+ - **`search companies --headcount` indexed its fixed bucket table with the
73
+ user-typed bucket string.** A bucket of `__proto__` or `constructor`
74
+ resolved to the inherited Object.prototype member (both truthy), so the
75
+ "unrecognized bucket" guard never fired and a malformed request body
76
+ shipped instead of the intended usage error.
77
+
11
78
  ## [0.24.2] - 2026-08-27
12
79
 
13
80
  ### Changed
package/README.md CHANGED
@@ -122,6 +122,16 @@ curviate inbox list --json --all --account acc_1 \
122
122
  | jq -c 'select(.unread_count > 0) | {chat_id: .id, sender: (.user.display_name // .last_message.sender_id), preview: .last_message.text[0:80]}'
123
123
  ```
124
124
 
125
+ `inbox list` reads one folder per call, `primary` by default. An archived chat never appears
126
+ in a `primary` walk, no matter the `--limit` or how far `--cursor`/`--all` page through it;
127
+ pass `--inbox archived` to reach it. `inmail` and `starred` are alternate views over chats
128
+ `primary` already returns, useful as a narrower filter rather than for reachability. All six
129
+ values: `primary`, `inmail`, `archived`, `spam`, `jobs`, `starred`.
130
+
131
+ ```bash
132
+ curviate inbox list --json --all --account acc_1 --inbox archived
133
+ ```
134
+
125
135
  ### 3. Warm up a prospect by reacting to their recent posts
126
136
 
127
137
  Read recent posts from a profile, then react to each, useful for ambient warm-up before outreach.
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  pageDelayFromFlags,
12
12
  streamAll
13
- } from "./chunk-766W25QS.js";
13
+ } from "./chunk-PS6QPY67.js";
14
14
  import {
15
15
  buildPreviewOutput
16
16
  } from "./chunk-R3VLWLVV.js";
@@ -20,8 +20,8 @@ import {
20
20
  renderSuccess,
21
21
  renderUnexpectedError,
22
22
  resolveEffectiveConfig
23
- } from "./chunk-TKWW6BV6.js";
24
- import "./chunk-SYRFLZ4D.js";
23
+ } from "./chunk-XHVR32RW.js";
24
+ import "./chunk-KTY7R27U.js";
25
25
  import {
26
26
  GLOBAL_FLAGS,
27
27
  READ_SINGLE_FLAGS,
@@ -15,6 +15,9 @@ import {
15
15
  import { join, dirname } from "path";
16
16
  import { homedir, tmpdir } from "os";
17
17
  import { randomBytes } from "crypto";
18
+ function nullProtoProfiles(profiles) {
19
+ return Object.assign(/* @__PURE__ */ Object.create(null), profiles);
20
+ }
18
21
  function getConfigPath() {
19
22
  const xdg = process.env["XDG_CONFIG_HOME"] ?? (process.env["APPDATA"] ?? join(homedir(), ".config"));
20
23
  return join(xdg, "curviate", "config.json");
@@ -29,7 +32,8 @@ async function readConfig() {
29
32
  if (e.code === "ENOENT") return null;
30
33
  throw err;
31
34
  }
32
- return JSON.parse(raw);
35
+ const parsed = JSON.parse(raw);
36
+ return { ...parsed, profiles: nullProtoProfiles(parsed.profiles ?? {}) };
33
37
  }
34
38
  async function writeConfig(cfg) {
35
39
  const cfgPath = getConfigPath();
@@ -67,7 +71,7 @@ async function writeConfig(cfg) {
67
71
  async function writeProfile(profileName, entry) {
68
72
  const existing = await readConfig() ?? {
69
73
  active: profileName,
70
- profiles: {}
74
+ profiles: nullProtoProfiles({})
71
75
  };
72
76
  const current = existing.profiles[profileName] ?? {};
73
77
  existing.profiles[profileName] = { ...current, ...entry };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  renderNotices
4
- } from "./chunk-TKWW6BV6.js";
4
+ } from "./chunk-XHVR32RW.js";
5
5
 
6
6
  // src/lib/paginate.ts
7
7
  var PaginateError = class extends Error {
@@ -28,7 +28,7 @@ import {
28
28
  renderSuccess,
29
29
  renderUnexpectedError,
30
30
  resolveEffectiveConfig
31
- } from "./chunk-TKWW6BV6.js";
31
+ } from "./chunk-XHVR32RW.js";
32
32
  import {
33
33
  READ_SINGLE_FLAGS,
34
34
  WRITE_FLAGS,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readConfig
4
- } from "./chunk-SYRFLZ4D.js";
4
+ } from "./chunk-KTY7R27U.js";
5
5
  import {
6
6
  assertNoStdinPlaceholder
7
7
  } from "./chunk-AHYUM2XQ.js";
@@ -56,12 +56,12 @@ function isJsonMode(opts) {
56
56
  }
57
57
  function projectFields(obj, fields) {
58
58
  if (fields.length === 0) return obj;
59
- const result = {};
59
+ const result = /* @__PURE__ */ Object.create(null);
60
60
  for (const field of fields) {
61
61
  const parts = field.split(".");
62
62
  let value = obj;
63
63
  for (const part of parts) {
64
- if (value !== null && typeof value === "object" && !Array.isArray(value)) {
64
+ if (value !== null && typeof value === "object" && !Array.isArray(value) && Object.prototype.hasOwnProperty.call(value, part)) {
65
65
  value = value[part];
66
66
  } else {
67
67
  value = void 0;
package/dist/cli.js CHANGED
@@ -51,7 +51,9 @@ var REMOVED_COMMANDS = {
51
51
  }
52
52
  };
53
53
  function successorHint(group, token) {
54
- return REMOVED_COMMANDS[group]?.[token] ?? null;
54
+ const groupMap = REMOVED_COMMANDS[group];
55
+ if (!groupMap || !Object.prototype.hasOwnProperty.call(groupMap, token)) return null;
56
+ return groupMap[token] ?? null;
55
57
  }
56
58
  async function resolveValue(input) {
57
59
  return typeof input === "function" ? input() : input;
@@ -224,7 +226,7 @@ async function resolveLeaf(cmd, rawArgs, descent) {
224
226
  const idx = positionals.length > 0 ? positionals[0].index : -1;
225
227
  const token = idx === -1 ? void 0 : rawArgs[idx];
226
228
  const hasBarePositional = await nodeHasPositional(cmd);
227
- if (token !== void 0 && subCommands[token]) {
229
+ if (token !== void 0 && Object.prototype.hasOwnProperty.call(subCommands, token) && subCommands[token]) {
228
230
  const sub = await resolveValue(subCommands[token]);
229
231
  const remaining = [...rawArgs.slice(0, idx), ...rawArgs.slice(idx + 1)];
230
232
  return resolveLeaf(sub, remaining, {
@@ -333,28 +335,28 @@ var main = defineCommand({
333
335
  // Subcommand registry, names and descriptions are static for help rendering;
334
336
  // the handler implementation is loaded lazily on first invocation.
335
337
  subCommands: {
336
- login: () => import("./login-ERQVI27Q.js").then((m) => m.loginCommand),
337
- config: () => import("./config-YKQ4QEBI.js").then((m) => m.configCommand),
338
+ login: () => import("./login-KNNEN4HP.js").then((m) => m.loginCommand),
339
+ config: () => import("./config-5HB2J3RY.js").then((m) => m.configCommand),
338
340
  // ---------------------------------------------------------------------------
339
341
  // Noun groups, lazy-loaded on first invocation.
340
342
  // ---------------------------------------------------------------------------
341
- profile: () => import("./profile-HPZII6A5.js").then((m) => m.profileCommand),
342
- company: () => import("./company-3UB4P77N.js").then((m) => m.companyCommand),
343
- job: () => import("./job-URLZ4GU7.js").then((m) => m.jobCommand),
344
- connect: () => import("./connect-DFZEYMLV.js").then((m) => m.connectCommand),
345
- search: () => import("./search-GBMRH4LG.js").then((m) => m.searchCommand),
346
- inbox: () => import("./inbox-E6ME3ROZ.js").then((m) => m.inboxCommand),
347
- inboxes: () => import("./inboxes-JRX3J32A.js").then((m) => m.inboxesCommand),
348
- message: () => import("./message-NPX7UX46.js").then((m) => m.messageCommand),
349
- post: () => import("./post-OSM7JH65.js").then((m) => m.postCommand),
350
- comment: () => import("./comment-SXYTJPXI.js").then((m) => m.commentCommand),
351
- account: () => import("./account-JBSYX6D2.js").then((m) => m.accountCommand),
352
- webhook: () => import("./webhook-C43C5BK7.js").then((m) => m.webhookCommand),
353
- "sales-nav": () => import("./sales-nav-7EE4UGNF.js").then((m) => m.salesNavCommand),
354
- recruiter: () => import("./recruiter-UKBLQ2PE.js").then((m) => m.recruiterCommand),
355
- group: () => import("./group-DBE25EID.js").then((m) => m.groupCommand),
356
- feed: () => import("./feed-ZY27EY52.js").then((m) => m.feedCommand),
357
- notification: () => import("./notification-XSSA5QOJ.js").then((m) => m.notificationCommand)
343
+ profile: () => import("./profile-REKGQYAW.js").then((m) => m.profileCommand),
344
+ company: () => import("./company-PAKHOCVR.js").then((m) => m.companyCommand),
345
+ job: () => import("./job-3HU7KQQI.js").then((m) => m.jobCommand),
346
+ connect: () => import("./connect-5TMGM326.js").then((m) => m.connectCommand),
347
+ search: () => import("./search-SYWHOM5J.js").then((m) => m.searchCommand),
348
+ inbox: () => import("./inbox-R5OSZWTG.js").then((m) => m.inboxCommand),
349
+ inboxes: () => import("./inboxes-6XMIABRX.js").then((m) => m.inboxesCommand),
350
+ message: () => import("./message-GA7D3A6Y.js").then((m) => m.messageCommand),
351
+ post: () => import("./post-QAVRVRON.js").then((m) => m.postCommand),
352
+ comment: () => import("./comment-XAF7AMHR.js").then((m) => m.commentCommand),
353
+ account: () => import("./account-52BUCCTZ.js").then((m) => m.accountCommand),
354
+ webhook: () => import("./webhook-RE2BGX3N.js").then((m) => m.webhookCommand),
355
+ "sales-nav": () => import("./sales-nav-Q5RVL4PR.js").then((m) => m.salesNavCommand),
356
+ recruiter: () => import("./recruiter-N36AROW7.js").then((m) => m.recruiterCommand),
357
+ group: () => import("./group-SNCEAWKI.js").then((m) => m.groupCommand),
358
+ feed: () => import("./feed-E5EQMI7T.js").then((m) => m.feedCommand),
359
+ notification: () => import("./notification-B5PTNNPE.js").then((m) => m.notificationCommand)
358
360
  },
359
361
  async run() {
360
362
  const { runMain } = await import("citty");
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  pageDelayFromFlags,
13
13
  streamAll
14
- } from "./chunk-766W25QS.js";
14
+ } from "./chunk-PS6QPY67.js";
15
15
  import "./chunk-UEAX6KUB.js";
16
16
  import {
17
17
  requireAccount
@@ -25,8 +25,8 @@ import {
25
25
  renderSuccess,
26
26
  renderUnexpectedError,
27
27
  resolveEffectiveConfig
28
- } from "./chunk-TKWW6BV6.js";
29
- import "./chunk-SYRFLZ4D.js";
28
+ } from "./chunk-XHVR32RW.js";
29
+ import "./chunk-KTY7R27U.js";
30
30
  import {
31
31
  GLOBAL_FLAGS,
32
32
  WRITE_SINGLE_FLAGS,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  sentAsNotice
4
- } from "./chunk-S6VAMUCC.js";
4
+ } from "./chunk-RXIPY4O7.js";
5
5
  import "./chunk-HOQ7EUHJ.js";
6
6
  import {
7
7
  AttachError,
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  pageDelayFromFlags,
22
22
  streamAll
23
- } from "./chunk-766W25QS.js";
23
+ } from "./chunk-PS6QPY67.js";
24
24
  import "./chunk-UWO2D4HW.js";
25
25
  import {
26
26
  resolveIdentifier
@@ -37,8 +37,8 @@ import {
37
37
  renderSuccess,
38
38
  renderUnexpectedError,
39
39
  resolveEffectiveConfig
40
- } from "./chunk-TKWW6BV6.js";
41
- import "./chunk-SYRFLZ4D.js";
40
+ } from "./chunk-XHVR32RW.js";
41
+ import "./chunk-KTY7R27U.js";
42
42
  import {
43
43
  GLOBAL_FLAGS,
44
44
  WRITE_FLAGS,
@@ -6,7 +6,7 @@ import {
6
6
  renameProfile,
7
7
  setActiveProfile,
8
8
  updateProfileField
9
- } from "./chunk-SYRFLZ4D.js";
9
+ } from "./chunk-KTY7R27U.js";
10
10
  import {
11
11
  GLOBAL_FLAGS
12
12
  } from "./chunk-AHYUM2XQ.js";
@@ -35,7 +35,7 @@ var configCommand = defineCommand({
35
35
  }
36
36
  const json = args.json ?? !process.stdout.isTTY;
37
37
  if (json) {
38
- const redacted = {};
38
+ const redacted = /* @__PURE__ */ Object.create(null);
39
39
  for (const [name, profile] of Object.entries(cfg.profiles)) {
40
40
  if (!profile) continue;
41
41
  redacted[name] = {
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  pageDelayFromFlags,
13
13
  streamAll
14
- } from "./chunk-766W25QS.js";
14
+ } from "./chunk-PS6QPY67.js";
15
15
  import {
16
16
  resolveIdentifier
17
17
  } from "./chunk-UEAX6KUB.js";
@@ -27,8 +27,8 @@ import {
27
27
  renderSuccess,
28
28
  renderUnexpectedError,
29
29
  resolveEffectiveConfig
30
- } from "./chunk-TKWW6BV6.js";
31
- import "./chunk-SYRFLZ4D.js";
30
+ } from "./chunk-XHVR32RW.js";
31
+ import "./chunk-KTY7R27U.js";
32
32
  import {
33
33
  GLOBAL_FLAGS,
34
34
  WRITE_FLAGS
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  pageDelayFromFlags,
4
4
  streamAll
5
- } from "./chunk-766W25QS.js";
5
+ } from "./chunk-PS6QPY67.js";
6
6
  import {
7
7
  requireAccount
8
8
  } from "./chunk-LCLYFE54.js";
@@ -12,8 +12,8 @@ import {
12
12
  renderSuccess,
13
13
  renderUnexpectedError,
14
14
  resolveEffectiveConfig
15
- } from "./chunk-TKWW6BV6.js";
16
- import "./chunk-SYRFLZ4D.js";
15
+ } from "./chunk-XHVR32RW.js";
16
+ import "./chunk-KTY7R27U.js";
17
17
  import {
18
18
  GLOBAL_FLAGS
19
19
  } from "./chunk-AHYUM2XQ.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  pageDelayFromFlags,
4
4
  streamAll
5
- } from "./chunk-766W25QS.js";
5
+ } from "./chunk-PS6QPY67.js";
6
6
  import {
7
7
  normalizeGroupId
8
8
  } from "./chunk-UEAX6KUB.js";
@@ -15,8 +15,8 @@ import {
15
15
  renderSuccess,
16
16
  renderUnexpectedError,
17
17
  resolveEffectiveConfig
18
- } from "./chunk-TKWW6BV6.js";
19
- import "./chunk-SYRFLZ4D.js";
18
+ } from "./chunk-XHVR32RW.js";
19
+ import "./chunk-KTY7R27U.js";
20
20
  import {
21
21
  GLOBAL_FLAGS,
22
22
  READ_SINGLE_FLAGS
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  pageDelayFromFlags,
4
4
  streamAll
5
- } from "./chunk-766W25QS.js";
5
+ } from "./chunk-PS6QPY67.js";
6
6
  import {
7
7
  normalizeChatId
8
8
  } from "./chunk-UEAX6KUB.js";
@@ -18,8 +18,8 @@ import {
18
18
  renderSuccess,
19
19
  renderUnexpectedError,
20
20
  resolveEffectiveConfig
21
- } from "./chunk-TKWW6BV6.js";
22
- import "./chunk-SYRFLZ4D.js";
21
+ } from "./chunk-XHVR32RW.js";
22
+ import "./chunk-KTY7R27U.js";
23
23
  import {
24
24
  GLOBAL_FLAGS,
25
25
  READ_SINGLE_FLAGS,
@@ -79,6 +79,15 @@ function validateLimitRange(raw, out) {
79
79
  process.exit(2);
80
80
  }
81
81
  }
82
+ var INBOX_FOLDERS = ["primary", "inmail", "archived", "spam", "jobs", "starred"];
83
+ function validateInboxFolder(raw, out) {
84
+ if (raw === void 0) return;
85
+ if (!INBOX_FOLDERS.includes(raw)) {
86
+ out.stderr.write(`error: --inbox must be one of: ${INBOX_FOLDERS.join(", ")}. Got "${raw}".
87
+ `);
88
+ process.exit(2);
89
+ }
90
+ }
82
91
  async function handleSdkError(err, outOpts, out) {
83
92
  const { CurviateError } = await import("@curviate/sdk");
84
93
  if (err instanceof CurviateError) {
@@ -98,9 +107,13 @@ async function runInboxList(client, flags, out) {
98
107
  const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
99
108
  const params = buildPaginationParams(flags);
100
109
  validateLimitRange(flags.limit, out);
110
+ validateInboxFolder(flags.inbox, out);
101
111
  if (flags.unread !== void 0) {
102
112
  params.unread = flags.unread;
103
113
  }
114
+ if (flags.inbox !== void 0) {
115
+ params.inbox = flags.inbox;
116
+ }
104
117
  try {
105
118
  if (all) {
106
119
  const fn = (p) => ns.messaging.listChats(p);
@@ -227,6 +240,10 @@ var inboxListCommand = defineCommand({
227
240
  type: "boolean",
228
241
  description: "Show unread chats only (--no-unread for read-only; omit for all)."
229
242
  // No default -> three-way semantics: undefined when omitted, true for --unread, false for --no-unread
243
+ },
244
+ inbox: {
245
+ type: "string",
246
+ description: "Which inbox folder to list chats from: primary, inmail, archived, spam, jobs, starred. Default primary."
230
247
  }
231
248
  },
232
249
  async run({ args }) {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  pageDelayFromFlags,
4
4
  streamAll
5
- } from "./chunk-766W25QS.js";
5
+ } from "./chunk-PS6QPY67.js";
6
6
  import {
7
7
  requireAccount
8
8
  } from "./chunk-LCLYFE54.js";
@@ -12,8 +12,8 @@ import {
12
12
  renderSuccess,
13
13
  renderUnexpectedError,
14
14
  resolveEffectiveConfig
15
- } from "./chunk-TKWW6BV6.js";
16
- import "./chunk-SYRFLZ4D.js";
15
+ } from "./chunk-XHVR32RW.js";
16
+ import "./chunk-KTY7R27U.js";
17
17
  import {
18
18
  GLOBAL_FLAGS,
19
19
  READ_SINGLE_FLAGS
@@ -7,7 +7,7 @@ import {
7
7
  ndjsonModeNotice,
8
8
  pageDelayFromFlags,
9
9
  streamAll
10
- } from "./chunk-766W25QS.js";
10
+ } from "./chunk-PS6QPY67.js";
11
11
  import {
12
12
  BinaryOutputError,
13
13
  writeBinaryOutput
@@ -27,8 +27,8 @@ import {
27
27
  renderSuccess,
28
28
  renderUnexpectedError,
29
29
  resolveEffectiveConfig
30
- } from "./chunk-TKWW6BV6.js";
31
- import "./chunk-SYRFLZ4D.js";
30
+ } from "./chunk-XHVR32RW.js";
31
+ import "./chunk-KTY7R27U.js";
32
32
  import {
33
33
  GLOBAL_FLAGS,
34
34
  READ_SINGLE_FLAGS,
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-H4KV7MIN.js";
5
5
  import {
6
6
  writeProfile
7
- } from "./chunk-SYRFLZ4D.js";
7
+ } from "./chunk-KTY7R27U.js";
8
8
  import {
9
9
  GLOBAL_FLAGS,
10
10
  defaultReadStdin,
@@ -13,15 +13,15 @@ import {
13
13
  runMessageSend,
14
14
  sentAsNotice,
15
15
  willSendAsNotice
16
- } from "./chunk-S6VAMUCC.js";
16
+ } from "./chunk-RXIPY4O7.js";
17
17
  import "./chunk-HOQ7EUHJ.js";
18
18
  import "./chunk-BGZW6B7G.js";
19
19
  import "./chunk-UWO2D4HW.js";
20
20
  import "./chunk-UEAX6KUB.js";
21
21
  import "./chunk-LCLYFE54.js";
22
22
  import "./chunk-R3VLWLVV.js";
23
- import "./chunk-TKWW6BV6.js";
24
- import "./chunk-SYRFLZ4D.js";
23
+ import "./chunk-XHVR32RW.js";
24
+ import "./chunk-KTY7R27U.js";
25
25
  import "./chunk-AHYUM2XQ.js";
26
26
  import "./chunk-PMRQXBCP.js";
27
27
  export {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  pageDelayFromFlags,
4
4
  streamAll
5
- } from "./chunk-766W25QS.js";
5
+ } from "./chunk-PS6QPY67.js";
6
6
  import {
7
7
  requireAccount
8
8
  } from "./chunk-LCLYFE54.js";
@@ -15,8 +15,8 @@ import {
15
15
  renderSuccess,
16
16
  renderUnexpectedError,
17
17
  resolveEffectiveConfig
18
- } from "./chunk-TKWW6BV6.js";
19
- import "./chunk-SYRFLZ4D.js";
18
+ } from "./chunk-XHVR32RW.js";
19
+ import "./chunk-KTY7R27U.js";
20
20
  import {
21
21
  GLOBAL_FLAGS,
22
22
  WRITE_SINGLE_FLAGS
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  pageDelayFromFlags,
12
12
  streamAll
13
- } from "./chunk-766W25QS.js";
13
+ } from "./chunk-PS6QPY67.js";
14
14
  import "./chunk-UEAX6KUB.js";
15
15
  import {
16
16
  requireAccount
@@ -24,8 +24,8 @@ import {
24
24
  renderSuccess,
25
25
  renderUnexpectedError,
26
26
  resolveEffectiveConfig
27
- } from "./chunk-TKWW6BV6.js";
28
- import "./chunk-SYRFLZ4D.js";
27
+ } from "./chunk-XHVR32RW.js";
28
+ import "./chunk-KTY7R27U.js";
29
29
  import {
30
30
  GLOBAL_FLAGS,
31
31
  WRITE_FLAGS,
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  pageDelayFromFlags,
17
17
  streamAll
18
- } from "./chunk-766W25QS.js";
18
+ } from "./chunk-PS6QPY67.js";
19
19
  import {
20
20
  resolveIdentifier
21
21
  } from "./chunk-UEAX6KUB.js";
@@ -31,8 +31,8 @@ import {
31
31
  renderSuccess,
32
32
  renderUnexpectedError,
33
33
  resolveEffectiveConfig
34
- } from "./chunk-TKWW6BV6.js";
35
- import "./chunk-SYRFLZ4D.js";
34
+ } from "./chunk-XHVR32RW.js";
35
+ import "./chunk-KTY7R27U.js";
36
36
  import {
37
37
  GLOBAL_FLAGS,
38
38
  READ_SINGLE_FLAGS,
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  pageDelayFromFlags,
17
17
  streamAll
18
- } from "./chunk-766W25QS.js";
18
+ } from "./chunk-PS6QPY67.js";
19
19
  import {
20
20
  BinaryOutputError,
21
21
  writeBinaryOutput
@@ -36,8 +36,8 @@ import {
36
36
  renderSuccess,
37
37
  renderUnexpectedError,
38
38
  resolveEffectiveConfig
39
- } from "./chunk-TKWW6BV6.js";
40
- import "./chunk-SYRFLZ4D.js";
39
+ } from "./chunk-XHVR32RW.js";
40
+ import "./chunk-KTY7R27U.js";
41
41
  import {
42
42
  GLOBAL_FLAGS,
43
43
  READ_SINGLE_FLAGS,
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  pageDelayFromFlags,
14
14
  streamAll
15
- } from "./chunk-766W25QS.js";
15
+ } from "./chunk-PS6QPY67.js";
16
16
  import {
17
17
  resolveIdentifier
18
18
  } from "./chunk-UEAX6KUB.js";
@@ -28,8 +28,8 @@ import {
28
28
  renderSuccess,
29
29
  renderUnexpectedError,
30
30
  resolveEffectiveConfig
31
- } from "./chunk-TKWW6BV6.js";
32
- import "./chunk-SYRFLZ4D.js";
31
+ } from "./chunk-XHVR32RW.js";
32
+ import "./chunk-KTY7R27U.js";
33
33
  import {
34
34
  GLOBAL_FLAGS,
35
35
  READ_SINGLE_FLAGS,
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  pageDelayFromFlags,
20
20
  streamAll
21
- } from "./chunk-766W25QS.js";
21
+ } from "./chunk-PS6QPY67.js";
22
22
  import {
23
23
  requireAccount
24
24
  } from "./chunk-LCLYFE54.js";
@@ -28,8 +28,8 @@ import {
28
28
  renderSuccess,
29
29
  renderUnexpectedError,
30
30
  resolveEffectiveConfig
31
- } from "./chunk-TKWW6BV6.js";
32
- import "./chunk-SYRFLZ4D.js";
31
+ } from "./chunk-XHVR32RW.js";
32
+ import "./chunk-KTY7R27U.js";
33
33
  import {
34
34
  GLOBAL_FLAGS
35
35
  } from "./chunk-AHYUM2XQ.js";
@@ -117,9 +117,10 @@ var NAMED_FLAG_MAPPERS = {
117
117
  const buckets = splitCsv(flags.headcount);
118
118
  const mapped = [];
119
119
  for (const bucket of buckets) {
120
- const range = HEADCOUNT_BUCKETS[bucket];
121
- if (!range) return `--headcount: unrecognized bucket "${bucket}"`;
122
- mapped.push(range);
120
+ if (!Object.prototype.hasOwnProperty.call(HEADCOUNT_BUCKETS, bucket)) {
121
+ return `--headcount: unrecognized bucket "${bucket}"`;
122
+ }
123
+ mapped.push(HEADCOUNT_BUCKETS[bucket]);
123
124
  }
124
125
  body["headcount"] = mapped;
125
126
  }
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  pageDelayFromFlags,
4
4
  streamAll
5
- } from "./chunk-766W25QS.js";
5
+ } from "./chunk-PS6QPY67.js";
6
6
  import {
7
7
  buildPreviewOutput
8
8
  } from "./chunk-R3VLWLVV.js";
@@ -12,8 +12,8 @@ import {
12
12
  renderSuccess,
13
13
  renderUnexpectedError,
14
14
  resolveEffectiveConfig
15
- } from "./chunk-TKWW6BV6.js";
16
- import "./chunk-SYRFLZ4D.js";
15
+ } from "./chunk-XHVR32RW.js";
16
+ import "./chunk-KTY7R27U.js";
17
17
  import {
18
18
  GLOBAL_FLAGS,
19
19
  defaultReadStdin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/cli",
3
- "version": "0.24.2",
3
+ "version": "0.25.0",
4
4
  "private": false,
5
5
  "description": "Official command-line interface for the Curviate API.",
6
6
  "license": "MIT",
@@ -37,6 +37,7 @@
37
37
  "typecheck": "tsc --noEmit",
38
38
  "lint": "eslint src test",
39
39
  "check:clean": "node scripts/check-clean.mjs",
40
+ "check:clean:commits": "node scripts/check-clean.mjs --commits",
40
41
  "check:clean:dist": "node scripts/check-clean.mjs --dist",
41
42
  "check:copy": "node scripts/check-copy.mjs",
42
43
  "check:sdk-pin": "node scripts/check-sdk-pin.mjs",