@artyfacts/claude 1.2.1 → 1.2.2

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/dist/cli.js CHANGED
@@ -846,8 +846,12 @@ async function checkAndClaimTasks(baseUrl, apiKey, agentId, activeTasks, executo
846
846
  console.log(` \u26A0\uFE0F Could not claim: ${error.error || "Unknown error"}`);
847
847
  continue;
848
848
  }
849
- const claimedTask = await claimResponse.json().catch(() => ({ id: task.id }));
849
+ const claimedTask = await claimResponse.json().catch((e) => {
850
+ console.log(` \u26A0\uFE0F Could not parse claim response: ${e}`);
851
+ return { id: task.id };
852
+ });
850
853
  const taskUuid = claimedTask.id || task.id;
854
+ console.log(` \u{1F4CE} Using task UUID: ${taskUuid} (from queue: ${task.id})`);
851
855
  activeTasks.add(task.section_id);
852
856
  console.log(" \u2713 Claimed!");
853
857
  if (dryRun) {
package/dist/cli.mjs CHANGED
@@ -101,8 +101,12 @@ async function checkAndClaimTasks(baseUrl, apiKey, agentId, activeTasks, executo
101
101
  console.log(` \u26A0\uFE0F Could not claim: ${error.error || "Unknown error"}`);
102
102
  continue;
103
103
  }
104
- const claimedTask = await claimResponse.json().catch(() => ({ id: task.id }));
104
+ const claimedTask = await claimResponse.json().catch((e) => {
105
+ console.log(` \u26A0\uFE0F Could not parse claim response: ${e}`);
106
+ return { id: task.id };
107
+ });
105
108
  const taskUuid = claimedTask.id || task.id;
109
+ console.log(` \u{1F4CE} Using task UUID: ${taskUuid} (from queue: ${task.id})`);
106
110
  activeTasks.add(task.section_id);
107
111
  console.log(" \u2713 Claimed!");
108
112
  if (dryRun) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artyfacts/claude",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Claude adapter for Artyfacts - Execute tasks using Claude Code CLI",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/cli.ts CHANGED
@@ -197,13 +197,17 @@ async function checkAndClaimTasks(
197
197
  }
198
198
 
199
199
  // Get the claimed task data (includes UUID which is globally unique)
200
- const claimedTask = await claimResponse.json().catch(() => ({ id: task.id })) as {
200
+ const claimedTask = await claimResponse.json().catch((e) => {
201
+ console.log(` ⚠️ Could not parse claim response: ${e}`);
202
+ return { id: task.id };
203
+ }) as {
201
204
  id: string;
202
205
  section_id: string;
203
206
  };
204
207
 
205
208
  // Use UUID for subsequent calls (globally unique, avoids org filter issues)
206
209
  const taskUuid = claimedTask.id || task.id;
210
+ console.log(` 📎 Using task UUID: ${taskUuid} (from queue: ${task.id})`); // DEBUG
207
211
 
208
212
  // Successfully claimed - now execute
209
213
  activeTasks.add(task.section_id);