@usesocial/cli 0.10.2 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @usesocial/cli
2
2
 
3
+ ## 0.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#45](https://github.com/usesocial/monorepo/pull/45) [`940ff35`](https://github.com/usesocial/monorepo/commit/940ff356c07cd1f1a01be059b022eafcb5a82a1b) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Create the server-side CLI session grant after non-TTY device login approval so read/write device sessions are not reported locally as write-capable while the API still treats them as read-only.
8
+
9
+ ## 0.11.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#44](https://github.com/usesocial/monorepo/pull/44) [`570db5e`](https://github.com/usesocial/monorepo/commit/570db5e5f6760dc09fe479f70da239f62addd909) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Add LinkedIn company-Page management and a raw proxy escape hatch. New commands: `linkedin page visitors` (Page visitor analytics, metered), `linkedin page invite <user...>` (invite users to follow a Page), and `linkedin proxy` (forward a raw LinkedIn request from stdin). Pages are selected with `--page` or a configured default via `account config page`; `account config account` sets a default connected account.
14
+
3
15
  ## 0.10.2
4
16
 
5
17
  ### Patch Changes
@@ -28,7 +40,7 @@
28
40
  across pages transparently and returns one merged envelope.
29
41
  - `--sum-by <fields>` (comma-separated from `platform`, `path`, `method`,
30
42
  `day`, `cacheStatus`) aggregates the selected window into
31
- `{ …key, calls, credits, errors }` rows sorted by credits descending —
43
+ `{ …key, calls, usageUSD, errors }` rows sorted by usage descending —
32
44
  a one-command answer to "what did my agent spend this week, on what".
33
45
  - `createdAt` is always an ISO string, and the declared contract stays
34
46
  JSON-Schema-serializable (`social schema --leaves` works).
@@ -52,7 +64,7 @@
52
64
 
53
65
  - [#34](https://github.com/usesocial/monorepo/pull/34) [`e3fb8a2`](https://github.com/usesocial/monorepo/commit/e3fb8a2d09301494d95115f8409862d392d78fcb) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Schema contracts now declare advisory hazards instead of confirmation gates:
54
66
  `confirmation.{required,recommended}` is replaced by `hazard { kind:
55
- spends_credits | destructive | outbound_write, confirm: "advisory" }` on
67
+ spends_usage | destructive | outbound_write, confirm: "advisory" }` on
56
68
  mutating commands (billing portal and connect declare nothing). Non-TTY
57
69
  `account login` and `account connect` become pollable state machines that
58
70
  advance one step per call — `pending_approval { verificationURL, expiresAt }`
@@ -171,9 +183,9 @@ spends_credits | destructive | outbound_write, confirm: "advisory" }` on
171
183
  `quote_tweet_id`, `made_with_ai`, community, geo, nullcast) are restored for
172
184
  `post`.
173
185
 
174
- Uploading media is free; each finalized file costs a flat 15 credits at the
186
+ Uploading media is free; each finalized file costs a flat $0.015 usage at the
175
187
  finalize step, independent of file size, on top of the normal post-create
176
- credits.
188
+ usage.
177
189
 
178
190
  Posting media requires the `media.write` OAuth scope. Existing connected X
179
191
  accounts must run `social account reconnect x <account>` to gain it — OAuth
@@ -214,8 +226,8 @@ spends_credits | destructive | outbound_write, confirm: "advisory" }` on
214
226
  fires if a page arrives missing expected fields, so silent starvation
215
227
  cannot recur.
216
228
  - Checkpointed `x sync messages` refreshes request small pages instead of
217
- full 100-event pages, cutting a caught-up refresh from ~1,470 to ~150
218
- credits. `stoppedReason: "checkpoint"` now carries a note explaining it
229
+ full 100-event pages, cutting a caught-up refresh from ~$1.470 to ~$0.150
230
+ usage. `stoppedReason: "checkpoint"` now carries a note explaining it
219
231
  means "caught up: no new events since the last sync checkpoint".
220
232
 
221
233
  ## 0.8.0
@@ -259,7 +271,7 @@ spends_credits | destructive | outbound_write, confirm: "advisory" }` on
259
271
 
260
272
  - [#31](https://github.com/usesocial/monorepo/pull/31) [`a885c61`](https://github.com/usesocial/monorepo/commit/a885c619b6c67b1317d3e17d8fceb3e49e48795f) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Remove `--credits` from `social x sync` and `social linkedin sync`. Sync now
261
273
  walks until the provider completes, reaches a stored checkpoint, or hits
262
- `--since`; JSON summaries keep actual `creditsSpent` telemetry without exposing
274
+ `--since`; JSON summaries keep actual `usageUSDSpent` telemetry without exposing
263
275
  estimate, cap, `credit-limit`, or `partial` fields.
264
276
 
265
277
  LinkedIn sync also uses offset pagination for full account-level walks where the
@@ -270,9 +282,9 @@ spends_credits | destructive | outbound_write, confirm: "advisory" }` on
270
282
 
271
283
  ### Minor Changes
272
284
 
273
- - [#30](https://github.com/usesocial/monorepo/pull/30) [`7aefe83`](https://github.com/usesocial/monorepo/commit/7aefe83f716321d7fa10d52be67cb6f96b5474f0) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Per-collection sync with a confirm-by-credits gate, a local profiles mirror, and cache-first enriched reads.
285
+ - [#30](https://github.com/usesocial/monorepo/pull/30) [`7aefe83`](https://github.com/usesocial/monorepo/commit/7aefe83f716321d7fa10d52be67cb6f96b5474f0) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Per-collection sync with a confirm-by-usage gate, a local profiles mirror, and cache-first enriched reads.
274
286
 
275
- - `social x|linkedin sync <collection>` walks until provider completion, a stored checkpoint, or `--since`; `--credits` is no longer supported, and sync JSON reports actual `creditsSpent` without estimate, cap, `credit-limit`, or `partial` fields.
287
+ - `social x|linkedin sync <collection>` walks until provider completion, a stored checkpoint, or `--since`; `--credits` is no longer supported, and sync JSON reports actual `usageUSDSpent` without estimate, cap, `credit-limit`, or `partial` fields.
276
288
  - New `x_messages` DM collection (flat `/dm_events`) and a DM `includes.users` profile extractor. Syncs mirror participant profiles into the local cache (`x_profiles`/`li_profiles`) with a COALESCE merge so thin sources never clobber richer rows; the server `profiles` corpus merges the same way.
277
289
  - `x followers|following|messages` and `linkedin connections|messages|requests` now read from the local cache, enriched with the profiles mirror. They require a first sync; `followers`/`following`/`connections` then auto-refresh only when older than 15 minutes, while `messages` and `requests sent|received` refresh on every read so they always return the latest.
278
290
 
@@ -368,7 +380,7 @@ spends_credits | destructive | outbound_write, confirm: "advisory" }` on
368
380
  bookmarks, likes, mentions, timeline, lists, and list members.
369
381
 
370
382
  - [`6a79019`](https://github.com/usesocial/monorepo/commit/6a79019a46e09e63148341ea8b8cf67aec1f4819) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Mark `social x profile` as a cacheable read so repeated profile fetches can be
371
- served from cache for zero credits and support `-H/--header` cache controls.
383
+ served from cache for $0 usage and support `-H/--header` cache controls.
372
384
 
373
385
  ## 0.2.2
374
386
 
@@ -390,7 +402,7 @@ spends_credits | destructive | outbound_write, confirm: "advisory" }` on
390
402
 
391
403
  ### Patch Changes
392
404
 
393
- - [`83650e6`](https://github.com/usesocial/monorepo/commit/83650e6f77b94d5cd4a3a5ec673164ff103d6573) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Price every proxy call from the scraped X price list (mirrored for LinkedIn) against a single `usage_credits` balance, fixing a 10–40× write overcharge that mapped non-DM writes to the most expensive category. `account usage` and `account logs` now report cost in credits, and repeated X reads served from cache no longer recharge.
405
+ - [`83650e6`](https://github.com/usesocial/monorepo/commit/83650e6f77b94d5cd4a3a5ec673164ff103d6573) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Price every proxy call from the scraped X price list (mirrored for LinkedIn) against a single `usage_credits` balance, fixing a 10–40× write overcharge that mapped non-DM writes to the most expensive category. `account usage` and `account logs` now report cost in usage dollars, and repeated X reads served from cache no longer recharge.
394
406
 
395
407
  - [`df52bf7`](https://github.com/usesocial/monorepo/commit/df52bf795e39c333d25b0618cedc047ad6f14b24) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Limit `--no-cache` to generated commands backed by cacheable proxy reads so non-cacheable DM, message, timeline, bookmark, and write commands no longer send misleading cache-control headers.
396
408
 
package/README.md CHANGED
@@ -95,9 +95,9 @@ use SQL `LIMIT` and `ORDER BY`.
95
95
 
96
96
  ### Your data is local
97
97
 
98
- `sync` pulls your own data down; it is explicit and costs credits. `sql` queries
98
+ `sync` pulls your own data down; it is explicit and costs usage. `sql` queries
99
99
  that local mirror; it is free, instant, and read-only. Named read commands call
100
- the live network and cost credits; `x tweets <target>` and
100
+ the live network and cost usage; `x tweets <target>` and
101
101
  `linkedin posts <target>` require a target. Writes act.
102
102
 
103
103
  `sync` output is always `{ data, meta }`: bare `sync` lists collections under
@@ -150,7 +150,7 @@ profile lookup is needed.
150
150
  | `disconnect x <account>` | Disconnect an X account. | write |
151
151
  | `billing` | Show seats, subscription, and current usage billing. | |
152
152
  | `billing portal` | Open the hosted billing portal and print its URL. | |
153
- | `usage` | Aggregate proxy calls and credits. | |
153
+ | `usage` | Aggregate proxy calls and usage. | |
154
154
  | `logs` | Recent proxy calls. | |
155
155
  | `config account` | Read or set the default connected account selector. | local |
156
156
  | `config page` | Read or set the default LinkedIn company Page selector. | local |
@@ -164,14 +164,14 @@ profile lookup is needed.
164
164
  | `posts <target>` | Live posts for a person or company; target required. | |
165
165
  | `comments <target>` | List a post's comments. | |
166
166
  | `reactions <target>` | List a post's reactions. | |
167
- | `connections [target]` | Live connection graph read; omit target for your own account. Costs credits. | |
167
+ | `connections [target]` | Live connection graph read; omit target for your own account. Costs usage. | |
168
168
  | `company <target>` | Fetch a company profile. | |
169
169
  | `jobs <target>` | List a company's job postings. | |
170
170
  | `search people\|posts\|jobs\|companies <keywords>` | Search LinkedIn. | |
171
- | `page visitors` | Read company Page visitor analytics; pass `--page` or configure a default Page. Costs credits. | |
171
+ | `page visitors` | Read company Page visitor analytics; pass `--page` or configure a default Page. Costs usage. | |
172
172
  | `page invite <user...>` | Invite one or more users to follow the company Page selected by `--page` or default config. | write |
173
173
  | `proxy` | Forward a raw LinkedIn JSON envelope from stdin via Unipile. | write |
174
- | `sync [collection]` | Pull your own `connections`, `posts`, `messages`, or `requests` into the local mirror; costs credits. | local |
174
+ | `sync [collection]` | Pull your own `connections`, `posts`, `messages`, or `requests` into the local mirror; costs usage. | local |
175
175
  | `sql [query]` | Query your local mirror with read-only SQL - free; bare `sql` prints compact schema metadata. | |
176
176
  | `post` | Create a post (body from stdin). | write |
177
177
  | `comment <target>` | Comment on a post (body from stdin). | write |
@@ -193,14 +193,14 @@ profile lookup is needed.
193
193
  | `tweets <target>` | Live posts for a user; target required. | |
194
194
  | `mentions [target]` | List posts mentioning a user; omit target for your own account. | |
195
195
  | `liked [target]` | List posts a user liked; omit target for your own account. | |
196
- | `followers [target]` | Live follower graph read; omit target for your own account. Costs credits. | |
197
- | `following [target]` | Live following graph read; omit target for your own account. Costs credits. | |
196
+ | `followers [target]` | Live follower graph read; omit target for your own account. Costs usage. | |
197
+ | `following [target]` | Live following graph read; omit target for your own account. Costs usage. | |
198
198
  | `tweet <target>` | Fetch a single post. | |
199
199
  | `replies <target>` | List replies to a post; accepts `post_id:<id>`, `conversation_id:<id>`, or a post URL. | |
200
200
  | `quotes <target>` | List quote posts of a post. | |
201
201
  | `likers <target>` | List users who liked a post. | |
202
202
  | `reposters <target>` | List users who reposted a post. | |
203
- | `sync [collection]` | Pull your own `tweets`, `timeline`, `followers`, `following`, `bookmarks`, `liked`, `mentions`, or `messages` into the local mirror; costs credits. | local |
203
+ | `sync [collection]` | Pull your own `tweets`, `timeline`, `followers`, `following`, `bookmarks`, `liked`, `mentions`, or `messages` into the local mirror; costs usage. | local |
204
204
  | `sql [query]` | Query your local mirror with read-only SQL - free; bare `sql` prints compact schema metadata. | |
205
205
  | `post` | Create a post (body from stdin). | write |
206
206
  | `message <recipients>` | Send a DM (body from stdin). | write |
@@ -253,7 +253,8 @@ jq -r '.items[].id' /tmp/recent-posts.json \
253
253
  grant, sends a magic link, waits for browser approval, stores the returned token
254
254
  in your OS keyring, and confirms billing checkout when a seat is needed.
255
255
 
256
- `social account logout` revokes the session and removes the stored token.
256
+ Sessions last two years unless revoked. `social account logout` revokes the
257
+ session and removes the stored token.
257
258
  `social account login` requires an interactive terminal and is not supported from
258
259
  CI, background jobs, or agent-mediated setup flows.
259
260
 
@@ -338,7 +339,7 @@ social account billing
338
339
  social account billing portal
339
340
  social account usage
340
341
  social account logs --limit 20 --from 2026-05-01T00:00:00Z \
341
- | jq -r '.items[] | [.createdAt, .platform, .method, .path, .responseStatus, .cacheStatus, .credits] | @tsv'
342
+ | jq -r '.items[] | [.createdAt, .platform, .method, .path, .responseStatus, .cacheStatus, .usageUSD] | @tsv'
342
343
 
343
344
  # Command schema.
344
345
  social schema