@ghl-ai/aw 0.1.35-beta.30 → 0.1.35-beta.31

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 (2) hide show
  1. package/mcp.mjs +12 -6
  2. package/package.json +1 -1
package/mcp.mjs CHANGED
@@ -207,18 +207,24 @@ async function resolveClickUpToken(silent = false, cwd = process.cwd()) {
207
207
 
208
208
  // Validate token against ClickUp API
209
209
  try {
210
- const res = execSync(`curl -sf -H "Authorization: ${token}" "https://api.clickup.com/api/v2/team"`, {
210
+ const res = execSync(`curl -s -H "Authorization: ${token}" "https://api.clickup.com/api/v2/team"`, {
211
211
  encoding: 'utf8',
212
212
  stdio: ['pipe', 'pipe', 'pipe'],
213
213
  timeout: 10000,
214
214
  });
215
215
  const data = JSON.parse(res);
216
- const teamName = data.teams?.[0]?.name;
217
- if (teamName) {
218
- fmt.logSuccess(`ClickUp token valid — workspace: ${fmt.chalk.cyan(teamName)}`);
216
+ if (data.err) {
217
+ fmt.logWarn(`ClickUp token validation failed: ${data.err} — using it anyway`);
218
+ } else {
219
+ const teamName = data.teams?.[0]?.name;
220
+ if (teamName) {
221
+ fmt.logSuccess(`ClickUp token valid — workspace: ${fmt.chalk.cyan(teamName)}`);
222
+ } else {
223
+ fmt.logWarn('ClickUp token accepted but no workspace found — using it anyway');
224
+ }
219
225
  }
220
- } catch {
221
- fmt.logWarn('ClickUp token validation failed — using it anyway');
226
+ } catch (e) {
227
+ fmt.logWarn(`ClickUp token validation failed: ${e.message?.split('\n')[0]} — using it anyway`);
222
228
  }
223
229
 
224
230
  return token;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.35-beta.30",
3
+ "version": "0.1.35-beta.31",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {