@agentcentral/cli 0.1.4 → 0.1.6

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 (3) hide show
  1. package/README.md +30 -3
  2. package/dist/index.js +11754 -327
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -76,6 +76,29 @@ agentcentral tools call update_keyword_bids @bids.json \
76
76
  --yes --idempotency-key "$(uuidgen)"
77
77
  ```
78
78
 
79
+ #### Auto-pagination (`--all` / `--paginate`)
80
+
81
+ Some live-API read tools return their results across multiple pages. Pass `--all` (alias `--paginate`)
82
+ to `tools call` and the CLI follows the server's continuation block, fetching every page and emitting
83
+ the concatenated rows:
84
+
85
+ ```bash
86
+ agentcentral tools call get_sponsored_ads_entities_live '{"ad_product":"SP"}' --all
87
+ agentcentral tools call get_audience_segments '{}' --all --format ndjson
88
+ agentcentral tools call get_report_document '{"report_document_id":"amzn1.tortuga..."}' --all --format csv --output report.csv
89
+ ```
90
+
91
+ Notes:
92
+
93
+ - `--all` is reads only. Combining it with a write tool or with `--yes` is a usage error (exit 2).
94
+ - For `json`, `csv`, `table`, and `markdown`, the rows from every page are accumulated and rendered
95
+ once. For `ndjson`, each page's rows stream to stdout as they arrive (incremental); with `--output`,
96
+ ndjson buffers and writes the file once instead.
97
+ - Auto-pagination stops at a 100-page cap and warns on stderr if the cap is hit, so narrow the query
98
+ to fetch the rest.
99
+ - A tool whose response carries no pagination block is a single call plus a one-line stderr note, not
100
+ an error. This is also how `--all` degrades gracefully against an older server.
101
+
79
102
  ### Convenience read commands
80
103
 
81
104
  Thin wrappers over the same hosted read tools. Each maps friendly flags onto the exact parameters its
@@ -122,9 +145,13 @@ Every command accepts: `--format/-f json|ndjson|table|csv|markdown`, `--output/-
122
145
  `--profile/-p <name>`, `--timeout <ms>`, `--limit <n>`, `--quiet/-q`, `--no-color`, `--verbose`,
123
146
  `--request-id <id>`, `--yes/-y`, `--idempotency-key <key>`, `--api-key-stdin`.
124
147
 
125
- When `--limit <n>` is set and the result comes back with exactly `n` rows, the CLI emits a best-effort
126
- truncation WARNING to stderr. The hosted server exposes no truncation flag or total-row count, so this
127
- is a heuristic, it only fires when `--limit` is set, and it never touches stdout.
148
+ `tools call` also accepts `--all` / `--paginate` (auto-pagination, reads only; see above).
149
+
150
+ Truncation is reported authoritatively from the server, not guessed. When the result envelope says it
151
+ hit the row limit (`more_rows_possible` / `limit_reached`), the CLI warns on stderr with the row count
152
+ (and the exact `returned N of M matching rows` phrasing when the tool supplies a total). When more
153
+ pages are available, it instead notes that you can pass `--all` to fetch them. These messages go to
154
+ stderr only (honoring `--quiet`) and never touch stdout.
128
155
 
129
156
  ## Exit codes
130
157