tines 0.0.211 → 0.0.212

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 +7 -1
  2. package/dist/index.js +34 -15
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -46,12 +46,18 @@ tines issues comment <project>/<number> - <<'EOF' # body from stdin; @file al
46
46
  EOF
47
47
  tines events list --issue <project>/<number>
48
48
  tines events list --since 2026-09-01T00:00:00Z --until 2026-09-08T00:00:00Z --state Engineering/Review
49
+ tines events list --project Tines --all-pages --max-items 20000 --json
49
50
  tines supervisor stats --window 7d --project Tines
50
51
  ```
51
52
 
52
53
  Issues are addressed as `<project>/<number>`; schedules as `<project>/<name>`; workflow
53
54
  states as `<workflow>/<state>`. Every `list` command returns one page — add `--all-pages`
54
- for the whole list — and every command takes `--json` for machine-readable output.
55
+ for the whole list — and every command takes `--json` for machine-readable output. Complete
56
+ list walks have a default 10,000-item safety ceiling. Use `--max-items <n>` with
57
+ `--all-pages` to choose a different positive finite bound; exceeding it fails without
58
+ printing a partial result. `--limit` remains the per-request page size. A larger bound keeps
59
+ more output in memory and makes more requests, so increase it deliberately or narrow the
60
+ list's filters.
55
61
  `tines <noun> --help` lists the rest: `workflows`, `context`, `journal`, `schedules`,
56
62
  `runners`, `runs`, `routing`, `supervisor`.
57
63
 
package/dist/index.js CHANGED
@@ -5904,23 +5904,39 @@ function withCommon(cmd) {
5904
5904
  ).option("--api-key <key>", "API key (or set TINES_API_KEY, or run `tines login`)").option("--json", "output the raw JSON response");
5905
5905
  }
5906
5906
  function withList(cmd) {
5907
- return withCommon(
5908
- cmd.option(
5909
- "--limit <n>",
5910
- "maximum items to return (page size under --all-pages)",
5911
- parsePositiveInteger
5912
- ).option("--cursor <cursor>", "resume from the next_cursor of a previous page").addOption(
5913
- new Option(
5914
- "--all-pages",
5915
- "fetch every page, not just the first (slower on large lists)"
5916
- ).conflicts("cursor")
5917
- )
5918
- );
5907
+ const listCommand = cmd.option(
5908
+ "--limit <n>",
5909
+ "maximum items to return (page size under --all-pages)",
5910
+ parsePositiveInteger
5911
+ ).option("--cursor <cursor>", "resume from the next_cursor of a previous page").addOption(
5912
+ new Option(
5913
+ "--all-pages",
5914
+ "fetch every page, not just the first (default safety ceiling: 10000 items)"
5915
+ ).conflicts("cursor")
5916
+ ).option(
5917
+ "--max-items <n>",
5918
+ "safety ceiling for --all-pages (default 10000; exceeding it errors)",
5919
+ parseMaxItems
5920
+ ).hook("preAction", (_thisCommand, actionCommand) => {
5921
+ const opts = actionCommand.opts();
5922
+ if (opts.maxItems !== void 0 && !opts.allPages) {
5923
+ actionCommand.error("--max-items requires --all-pages");
5924
+ }
5925
+ });
5926
+ return withCommon(listCommand);
5919
5927
  }
5920
5928
  function parsePositiveInteger(value) {
5921
- if (!/^[1-9]\d*$/.test(value)) throw new Error("limit must be a positive integer");
5929
+ return parsePositiveIntegerOption(value, "limit");
5930
+ }
5931
+ function parseMaxItems(value) {
5932
+ return parsePositiveIntegerOption(value, "max-items");
5933
+ }
5934
+ function parsePositiveIntegerOption(value, optionName) {
5935
+ if (!/^[1-9]\d*$/.test(value)) throw new Error(`${optionName} must be a positive integer`);
5922
5936
  const result = Number(value);
5923
- if (!Number.isSafeInteger(result)) throw new Error("limit must be a positive safe integer");
5937
+ if (!Number.isSafeInteger(result)) {
5938
+ throw new Error(`${optionName} must be a positive safe integer`);
5939
+ }
5924
5940
  return result;
5925
5941
  }
5926
5942
  function isUsageIdentity(value, prefix) {
@@ -5999,7 +6015,10 @@ more results: rerun with --all-pages, or resume with --cursor ${res.next_cursor}
5999
6015
  }
6000
6016
  async function fetchList(opts, fetchPage) {
6001
6017
  if (opts.allPages) {
6002
- return { items: await listAll(fetchPage, { pageSize: opts.limit }), next_cursor: null };
6018
+ return {
6019
+ items: await listAll(fetchPage, { pageSize: opts.limit, maxItems: opts.maxItems }),
6020
+ next_cursor: null
6021
+ };
6003
6022
  }
6004
6023
  const res = await fetchPage({ limit: opts.limit, cursor: opts.cursor });
6005
6024
  if (res.next_cursor && opts.json && !opts.cursor) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tines",
3
- "version": "0.0.211",
3
+ "version": "0.0.212",
4
4
  "description": "CLI for Tines, an orchestration layer for AI agents",
5
5
  "repository": {
6
6
  "type": "git",