@crewx/shared
Advanced tools
+1
-1
| { | ||
| "name": "@crewx/shared", | ||
| "version": "0.0.2", | ||
| "version": "0.0.3", | ||
| "main": "skill-tracer.js", | ||
| "description": "Shared utilities for CrewX built-in packages" | ||
| } |
+5
-1
@@ -302,2 +302,6 @@ /** | ||
| if (parentTaskId && parentTaskId.trim() !== '') { | ||
| // Verify FK target exists before INSERT to avoid constraint error | ||
| const taskExists = db.prepare('SELECT 1 FROM tasks WHERE id = ?').get(parentTaskId); | ||
| const safeTaskId = taskExists ? parentTaskId : null; | ||
| const spanId = randomUUID(); | ||
@@ -313,3 +317,3 @@ const attributes = JSON.stringify({ | ||
| VALUES (?, ?, ?, 'internal', 'ok', ?, ?, ?) | ||
| `).run(spanId, parentTaskId, `[skill:${skillName}] ${command}`, now, command, attributes); | ||
| `).run(spanId, safeTaskId, `[skill:${skillName}] ${command}`, now, command, attributes); | ||
@@ -316,0 +320,0 @@ return { |
15567
1.41%478
0.63%