@krodak/clickup-cli 1.33.0 → 1.34.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "clickup-cli",
3
3
  "description": "ClickUp CLI skills for managing tasks, sprints, comments, checklists, custom fields, tags, and time tracking via the cup command",
4
- "version": "1.33.0",
4
+ "version": "1.34.0",
5
5
  "author": {
6
6
  "name": "Krzysztof Rodak"
7
7
  },
package/dist/index.js CHANGED
@@ -97,10 +97,38 @@ var ClickUpClient = class {
97
97
  }
98
98
  return "";
99
99
  }
100
+ sleep(ms) {
101
+ return new Promise((resolve2) => setTimeout(resolve2, ms));
102
+ }
103
+ retryDelayMs(res, attempt) {
104
+ const retryAfter = res.headers.get("retry-after");
105
+ if (retryAfter) {
106
+ const seconds = Number(retryAfter);
107
+ if (Number.isFinite(seconds) && seconds > 0) {
108
+ return Math.min(seconds, 60) * 1e3;
109
+ }
110
+ }
111
+ return Math.min(2 ** (attempt - 1) * 1e3, 6e4);
112
+ }
113
+ async fetchWithRetry(url, init) {
114
+ const maxRetries = 3;
115
+ let attempt = 0;
116
+ for (; ; ) {
117
+ const res = await fetch(url, { ...init, signal: AbortSignal.timeout(3e4) });
118
+ const retryable = res.status === 429 || res.status === 502 || res.status === 503 || res.status === 504;
119
+ if (!retryable || attempt >= maxRetries) return res;
120
+ attempt++;
121
+ const delayMs = this.retryDelayMs(res, attempt);
122
+ process.stderr.write(
123
+ `Rate limited (${res.status}). Retrying in ${Math.round(delayMs / 1e3)}s... (attempt ${attempt}/${maxRetries})
124
+ `
125
+ );
126
+ await this.sleep(delayMs);
127
+ }
128
+ }
100
129
  async _fetch(baseUrl, path, options = {}) {
101
- const res = await fetch(`${baseUrl}${path}`, {
130
+ const res = await this.fetchWithRetry(`${baseUrl}${path}`, {
102
131
  ...options,
103
- signal: AbortSignal.timeout(3e4),
104
132
  headers: {
105
133
  Authorization: this.apiToken,
106
134
  ...options.body ? { "Content-Type": "application/json" } : {},
@@ -134,8 +162,7 @@ var ClickUpClient = class {
134
162
  return this._fetch(BASE_URL_V3, path, options);
135
163
  }
136
164
  async requestV3Array(path) {
137
- const res = await fetch(`${BASE_URL_V3}${path}`, {
138
- signal: AbortSignal.timeout(3e4),
165
+ const res = await this.fetchWithRetry(`${BASE_URL_V3}${path}`, {
139
166
  headers: { Authorization: this.apiToken }
140
167
  });
141
168
  if (res.status === 204 || res.headers.get("content-length") === "0") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krodak/clickup-cli",
3
- "version": "1.33.0",
3
+ "version": "1.34.0",
4
4
  "description": "ClickUp CLI for AI agents and humans",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -3,11 +3,11 @@ name: clickup
3
3
  description: 'Use when managing ClickUp tasks, sprints, or comments via the `cup` CLI tool. Triggers: task queries, status updates, sprint tracking, creating subtasks, posting comments, threaded replies, standup summaries, searching tasks, checking overdue items, assigning tasks, listing spaces and lists, opening tasks in browser, checking auth or config, setting custom fields, deleting tasks, managing tags, managing checklists, editing comments, task links, time tracking, attachments, file uploads, listing members, listing fields, duplicating tasks, bulk operations, goals, key results, saved filters, favorites.'
4
4
  ---
5
5
 
6
- # ClickUp CLI (`cup`) - skill version 1.33.0
6
+ # ClickUp CLI (`cup`) - skill version 1.34.0
7
7
 
8
8
  Reference for AI agents using the `cup` CLI tool. Covers task management, sprint tracking, comments, time tracking, custom fields, goals, docs, and project workflows.
9
9
 
10
- > **Version check:** Run `cup --version`. If your installed version is older than 1.33.0, update with `npm install -g @krodak/clickup-cli` and refresh this skill with `cup skill`.
10
+ > **Version check:** Run `cup --version`. If your installed version is older than 1.34.0, update with `npm install -g @krodak/clickup-cli` and refresh this skill with `cup skill`.
11
11
 
12
12
  ## Install & Configure
13
13
 
@@ -288,6 +288,7 @@ All commands support `--help` for full flag details. All commands support `--jso
288
288
  | `cup link` | Both IDs must be the same type (both custom or both native) |
289
289
  | `cup delete` | DESTRUCTIVE. Requires `--confirm` in non-interactive mode. Cannot be undone |
290
290
  | Errors | stderr with exit code 1. Strict parsing - excess/unknown arguments rejected |
291
+ | Rate limiting | The client auto-retries on HTTP 429 and transient 5xx (502/503/504) with `Retry-After`-aware backoff (up to 3 retries). Retry warnings go to stderr. No action needed by callers |
291
292
  | Description quoting | Use `$'...'` quoting for `-d` / `-m` values containing backticks or newlines: `-d $'Use \`init()\` first.\n\n- Step 1'`. Heredocs and double quotes strip backticks |
292
293
  | `--mention <user>` | Real ClickUp @mention (notifies the user). Accepts ID, email, username, or `me`. Repeatable. Also: `<@userId>` inline token in `-m` for mid-sentence mentions. Bare `@Name` is NOT parsed (ambiguous). On `comment`, `reply`, `comment-edit`, `list-comment`, `view-comment` |
293
294
  | Comment links | In comment messages, bare URLs (`https://...`) and markdown links (`[text](url)`) both render as clickable links. Unfurled preview cards are not supported (web-UI only) |