@axiom-lattice/local-stores 1.0.4 → 1.0.6
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +15 -0
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/stores/LocalWorkflowTrackingStore.ts +13 -4
package/dist/index.mjs
CHANGED
|
@@ -1602,6 +1602,14 @@ var LocalWorkflowTrackingStore = class {
|
|
|
1602
1602
|
return row ? mapRowToStep(row) : null;
|
|
1603
1603
|
}
|
|
1604
1604
|
};
|
|
1605
|
+
function safeParse(value, fallback) {
|
|
1606
|
+
if (!value) return fallback;
|
|
1607
|
+
try {
|
|
1608
|
+
return JSON.parse(value);
|
|
1609
|
+
} catch {
|
|
1610
|
+
return fallback;
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1605
1613
|
function mapRowToRun(row) {
|
|
1606
1614
|
return {
|
|
1607
1615
|
id: row.id,
|
|
@@ -1609,11 +1617,11 @@ function mapRowToRun(row) {
|
|
|
1609
1617
|
assistantId: row.assistant_id,
|
|
1610
1618
|
threadId: row.thread_id,
|
|
1611
1619
|
status: row.status,
|
|
1612
|
-
topologyEdges:
|
|
1620
|
+
topologyEdges: safeParse(row.topology_edges, []),
|
|
1613
1621
|
totalEdges: row.total_edges,
|
|
1614
1622
|
completedEdges: row.completed_edges,
|
|
1615
1623
|
errorMessage: row.error_message || void 0,
|
|
1616
|
-
metadata:
|
|
1624
|
+
metadata: safeParse(row.metadata, {}),
|
|
1617
1625
|
startedAt: parseISO(row.started_at),
|
|
1618
1626
|
completedAt: row.completed_at ? parseISO(row.completed_at) : void 0,
|
|
1619
1627
|
createdAt: parseISO(row.created_at),
|
|
@@ -1631,8 +1639,8 @@ function mapRowToStep(row) {
|
|
|
1631
1639
|
edgeFrom: row.edge_from || void 0,
|
|
1632
1640
|
edgeTo: row.edge_to || void 0,
|
|
1633
1641
|
edgePurpose: row.edge_purpose || void 0,
|
|
1634
|
-
input:
|
|
1635
|
-
output:
|
|
1642
|
+
input: safeParse(row.input, void 0),
|
|
1643
|
+
output: safeParse(row.output, void 0),
|
|
1636
1644
|
status: row.status,
|
|
1637
1645
|
errorMessage: row.error_message || void 0,
|
|
1638
1646
|
startedAt: parseISO(row.started_at),
|