@curviate/cli 0.24.3 → 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.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,27 @@ 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
+
11
32
  ## [0.24.3] - 2026-08-29
12
33
 
13
34
  ### Fixed
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.
package/dist/cli.js CHANGED
@@ -345,7 +345,7 @@ var main = defineCommand({
345
345
  job: () => import("./job-3HU7KQQI.js").then((m) => m.jobCommand),
346
346
  connect: () => import("./connect-5TMGM326.js").then((m) => m.connectCommand),
347
347
  search: () => import("./search-SYWHOM5J.js").then((m) => m.searchCommand),
348
- inbox: () => import("./inbox-ER3N3OX3.js").then((m) => m.inboxCommand),
348
+ inbox: () => import("./inbox-R5OSZWTG.js").then((m) => m.inboxCommand),
349
349
  inboxes: () => import("./inboxes-6XMIABRX.js").then((m) => m.inboxesCommand),
350
350
  message: () => import("./message-GA7D3A6Y.js").then((m) => m.messageCommand),
351
351
  post: () => import("./post-QAVRVRON.js").then((m) => m.postCommand),
@@ -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 }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/cli",
3
- "version": "0.24.3",
3
+ "version": "0.25.0",
4
4
  "private": false,
5
5
  "description": "Official command-line interface for the Curviate API.",
6
6
  "license": "MIT",