@usesocial/cli 0.10.2 → 0.11.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 +17 -11
- package/README.md +12 -11
- package/dist/index.mjs +147 -88
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @usesocial/cli
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#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.
|
|
8
|
+
|
|
3
9
|
## 0.10.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -28,7 +34,7 @@
|
|
|
28
34
|
across pages transparently and returns one merged envelope.
|
|
29
35
|
- `--sum-by <fields>` (comma-separated from `platform`, `path`, `method`,
|
|
30
36
|
`day`, `cacheStatus`) aggregates the selected window into
|
|
31
|
-
`{ …key, calls,
|
|
37
|
+
`{ …key, calls, usageUSD, errors }` rows sorted by usage descending —
|
|
32
38
|
a one-command answer to "what did my agent spend this week, on what".
|
|
33
39
|
- `createdAt` is always an ISO string, and the declared contract stays
|
|
34
40
|
JSON-Schema-serializable (`social schema --leaves` works).
|
|
@@ -52,7 +58,7 @@
|
|
|
52
58
|
|
|
53
59
|
- [#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
60
|
`confirmation.{required,recommended}` is replaced by `hazard { kind:
|
|
55
|
-
|
|
61
|
+
spends_usage | destructive | outbound_write, confirm: "advisory" }` on
|
|
56
62
|
mutating commands (billing portal and connect declare nothing). Non-TTY
|
|
57
63
|
`account login` and `account connect` become pollable state machines that
|
|
58
64
|
advance one step per call — `pending_approval { verificationURL, expiresAt }`
|
|
@@ -171,9 +177,9 @@ spends_credits | destructive | outbound_write, confirm: "advisory" }` on
|
|
|
171
177
|
`quote_tweet_id`, `made_with_ai`, community, geo, nullcast) are restored for
|
|
172
178
|
`post`.
|
|
173
179
|
|
|
174
|
-
Uploading media is free; each finalized file costs a flat
|
|
180
|
+
Uploading media is free; each finalized file costs a flat $0.015 usage at the
|
|
175
181
|
finalize step, independent of file size, on top of the normal post-create
|
|
176
|
-
|
|
182
|
+
usage.
|
|
177
183
|
|
|
178
184
|
Posting media requires the `media.write` OAuth scope. Existing connected X
|
|
179
185
|
accounts must run `social account reconnect x <account>` to gain it — OAuth
|
|
@@ -214,8 +220,8 @@ spends_credits | destructive | outbound_write, confirm: "advisory" }` on
|
|
|
214
220
|
fires if a page arrives missing expected fields, so silent starvation
|
|
215
221
|
cannot recur.
|
|
216
222
|
- Checkpointed `x sync messages` refreshes request small pages instead of
|
|
217
|
-
full 100-event pages, cutting a caught-up refresh from
|
|
218
|
-
|
|
223
|
+
full 100-event pages, cutting a caught-up refresh from ~$1.470 to ~$0.150
|
|
224
|
+
usage. `stoppedReason: "checkpoint"` now carries a note explaining it
|
|
219
225
|
means "caught up: no new events since the last sync checkpoint".
|
|
220
226
|
|
|
221
227
|
## 0.8.0
|
|
@@ -259,7 +265,7 @@ spends_credits | destructive | outbound_write, confirm: "advisory" }` on
|
|
|
259
265
|
|
|
260
266
|
- [#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
267
|
walks until the provider completes, reaches a stored checkpoint, or hits
|
|
262
|
-
`--since`; JSON summaries keep actual `
|
|
268
|
+
`--since`; JSON summaries keep actual `usageUSDSpent` telemetry without exposing
|
|
263
269
|
estimate, cap, `credit-limit`, or `partial` fields.
|
|
264
270
|
|
|
265
271
|
LinkedIn sync also uses offset pagination for full account-level walks where the
|
|
@@ -270,9 +276,9 @@ spends_credits | destructive | outbound_write, confirm: "advisory" }` on
|
|
|
270
276
|
|
|
271
277
|
### Minor Changes
|
|
272
278
|
|
|
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-
|
|
279
|
+
- [#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
280
|
|
|
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 `
|
|
281
|
+
- `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
282
|
- 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
283
|
- `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
284
|
|
|
@@ -368,7 +374,7 @@ spends_credits | destructive | outbound_write, confirm: "advisory" }` on
|
|
|
368
374
|
bookmarks, likes, mentions, timeline, lists, and list members.
|
|
369
375
|
|
|
370
376
|
- [`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
|
|
377
|
+
served from cache for $0 usage and support `-H/--header` cache controls.
|
|
372
378
|
|
|
373
379
|
## 0.2.2
|
|
374
380
|
|
|
@@ -390,7 +396,7 @@ spends_credits | destructive | outbound_write, confirm: "advisory" }` on
|
|
|
390
396
|
|
|
391
397
|
### Patch Changes
|
|
392
398
|
|
|
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
|
|
399
|
+
- [`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
400
|
|
|
395
401
|
- [`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
402
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
197
|
-
| `following [target]` | Live following graph read; omit target for your own account. Costs
|
|
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
|
|
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
|
|
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, .
|
|
342
|
+
| jq -r '.items[] | [.createdAt, .platform, .method, .path, .responseStatus, .cacheStatus, .usageUSD] | @tsv'
|
|
342
343
|
|
|
343
344
|
# Command schema.
|
|
344
345
|
social schema
|