@artyfacts/claude 1.3.4 → 1.3.5

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
@@ -897,7 +897,7 @@ async function checkAndClaimTasks(baseUrl, apiKey, agentId, activeTasks, executo
897
897
  }
898
898
  console.log(`\u{1F4EC} Found ${tasks.length} claimable task(s)`);
899
899
  for (const task of tasks) {
900
- if (activeTasks.has(task.section_id)) {
900
+ if (activeTasks.has(task.id)) {
901
901
  continue;
902
902
  }
903
903
  console.log(`
@@ -920,11 +920,11 @@ async function checkAndClaimTasks(baseUrl, apiKey, agentId, activeTasks, executo
920
920
  });
921
921
  const taskUuid = claimData.task?.id || task.id;
922
922
  console.log(` \u{1F4CE} Using task UUID: ${taskUuid} (from queue: ${task.id})`);
923
- activeTasks.add(task.section_id);
923
+ activeTasks.add(task.id);
924
924
  console.log(" \u2713 Claimed!");
925
925
  if (dryRun) {
926
926
  console.log(" \u{1F4CB} Dry run - not executing");
927
- activeTasks.delete(task.section_id);
927
+ activeTasks.delete(task.id);
928
928
  continue;
929
929
  }
930
930
  console.log(" \u2192 Executing with Claude...");
@@ -961,7 +961,7 @@ async function checkAndClaimTasks(baseUrl, apiKey, agentId, activeTasks, executo
961
961
  } catch (error) {
962
962
  console.error(` \u2192 \u274C Error:`, error instanceof Error ? error.message : error);
963
963
  } finally {
964
- activeTasks.delete(task.section_id);
964
+ activeTasks.delete(task.id);
965
965
  }
966
966
  break;
967
967
  }
package/dist/cli.mjs CHANGED
@@ -138,7 +138,7 @@ async function checkAndClaimTasks(baseUrl, apiKey, agentId, activeTasks, executo
138
138
  }
139
139
  console.log(`\u{1F4EC} Found ${tasks.length} claimable task(s)`);
140
140
  for (const task of tasks) {
141
- if (activeTasks.has(task.section_id)) {
141
+ if (activeTasks.has(task.id)) {
142
142
  continue;
143
143
  }
144
144
  console.log(`
@@ -161,11 +161,11 @@ async function checkAndClaimTasks(baseUrl, apiKey, agentId, activeTasks, executo
161
161
  });
162
162
  const taskUuid = claimData.task?.id || task.id;
163
163
  console.log(` \u{1F4CE} Using task UUID: ${taskUuid} (from queue: ${task.id})`);
164
- activeTasks.add(task.section_id);
164
+ activeTasks.add(task.id);
165
165
  console.log(" \u2713 Claimed!");
166
166
  if (dryRun) {
167
167
  console.log(" \u{1F4CB} Dry run - not executing");
168
- activeTasks.delete(task.section_id);
168
+ activeTasks.delete(task.id);
169
169
  continue;
170
170
  }
171
171
  console.log(" \u2192 Executing with Claude...");
@@ -202,7 +202,7 @@ async function checkAndClaimTasks(baseUrl, apiKey, agentId, activeTasks, executo
202
202
  } catch (error) {
203
203
  console.error(` \u2192 \u274C Error:`, error instanceof Error ? error.message : error);
204
204
  } finally {
205
- activeTasks.delete(task.section_id);
205
+ activeTasks.delete(task.id);
206
206
  }
207
207
  break;
208
208
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artyfacts/claude",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
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
@@ -245,7 +245,8 @@ async function checkAndClaimTasks(
245
245
 
246
246
  // Process first available task
247
247
  for (const task of tasks) {
248
- if (activeTasks.has(task.section_id)) {
248
+ // Use task.id (UUID) for deduplication - matches SSE taskId
249
+ if (activeTasks.has(task.id)) {
249
250
  continue; // Already processing
250
251
  }
251
252
 
@@ -281,12 +282,12 @@ async function checkAndClaimTasks(
281
282
  console.log(` 📎 Using task UUID: ${taskUuid} (from queue: ${task.id})`); // DEBUG
282
283
 
283
284
  // Successfully claimed - now execute
284
- activeTasks.add(task.section_id);
285
+ activeTasks.add(task.id);
285
286
  console.log(' ✓ Claimed!');
286
287
 
287
288
  if (dryRun) {
288
289
  console.log(' 📋 Dry run - not executing');
289
- activeTasks.delete(task.section_id);
290
+ activeTasks.delete(task.id);
290
291
  continue;
291
292
  }
292
293
 
@@ -324,7 +325,7 @@ async function checkAndClaimTasks(
324
325
  } catch (error) {
325
326
  console.error(` → ❌ Error:`, error instanceof Error ? error.message : error);
326
327
  } finally {
327
- activeTasks.delete(task.section_id);
328
+ activeTasks.delete(task.id);
328
329
  }
329
330
 
330
331
  // Only process one task at a time for now