@usesocial/cli 0.11.2 → 0.11.3

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,11 @@
1
1
  # @usesocial/cli
2
2
 
3
+ ## 0.11.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#47](https://github.com/usesocial/monorepo/pull/47) [`5534485`](https://github.com/usesocial/monorepo/commit/553448590e56d81ef39b4dd6854e92351b5a0850) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Compact CLI usage and cost JSON: `account usage` and billing summaries now return `{ calls, credit, cost }`, and response envelopes include numeric `meta.cost` only when the response spent usage.
8
+
3
9
  ## 0.11.2
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -286,13 +286,13 @@ query it with `sql`. SQL reads show local freshness in `meta.cache.tables` and a
286
286
 
287
287
  ```sh
288
288
  social x sql "SELECT sender_username, text FROM x_messages ORDER BY created_at DESC LIMIT 5" \
289
- | jq '{cost: .meta.cost, cache: .meta.cache}'
289
+ | jq '{cache: .meta.cache}'
290
290
  social x sync timeline
291
291
  social x sql "SELECT text, url FROM x_timeline ORDER BY created_at DESC LIMIT 20" \
292
- | jq '{cost: .meta.cost, cache: .meta.cache}'
292
+ | jq '{cache: .meta.cache}'
293
293
  ```
294
294
 
295
- Agents should watch `.meta.cost` during high-fanout loops, use
295
+ Agents should watch `.meta.cost` when it is present during high-fanout loops, use
296
296
  `social account billing` for the current plan snapshot, and use
297
297
  `social account usage` or `social account logs` after a run to summarize spend.
298
298
 
package/bin/social.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import { dirname, join } from "node:path";
3
- import { fileURLToPath, pathToFileURL } from "node:url";
2
+ import { dirname, join } from "node:path"
3
+ import { fileURLToPath, pathToFileURL } from "node:url"
4
4
 
5
- const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
6
- const entryURL = pathToFileURL(join(packageRoot, "dist", "index.mjs")).href;
5
+ const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)))
6
+ const entryURL = pathToFileURL(join(packageRoot, "dist", "index.mjs")).href
7
7
 
8
8
  import(entryURL)
9
9
  .then(({ main }) => main())
10
10
  .catch((error) => {
11
- console.error(error);
12
- process.exit(1);
13
- });
11
+ console.error(error)
12
+ process.exit(1)
13
+ })