@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 +4 -4
- package/dist/cli.mjs +4 -4
- package/package.json +1 -1
- package/src/cli.ts +5 -4
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
205
|
+
activeTasks.delete(task.id);
|
|
206
206
|
}
|
|
207
207
|
break;
|
|
208
208
|
}
|
package/package.json
CHANGED
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
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
328
|
+
activeTasks.delete(task.id);
|
|
328
329
|
}
|
|
329
330
|
|
|
330
331
|
// Only process one task at a time for now
|