@props-labs/mesh-os 0.1.12 → 0.1.13

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.
@@ -743,6 +743,12 @@ class MeshOS {
743
743
  */
744
744
  async getMemories(options) {
745
745
  const { where, orderBy, limit, offset, distinctOn } = options;
746
+ // Convert orderBy to Hasura format
747
+ const hasuraOrderBy = orderBy?.map(({ column, order }) => {
748
+ // Convert camelCase to snake_case for column names
749
+ const snakeCaseColumn = column.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`);
750
+ return { [snakeCaseColumn]: order };
751
+ });
746
752
  // Build the GraphQL query dynamically
747
753
  const query = `
748
754
  query GetMemories(
@@ -772,7 +778,7 @@ class MeshOS {
772
778
  `;
773
779
  const result = await this.executeQuery(query, {
774
780
  where,
775
- orderBy,
781
+ orderBy: hasuraOrderBy,
776
782
  limit,
777
783
  offset,
778
784
  ...(distinctOn ? { distinctOn } : {})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@props-labs/mesh-os",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "MeshOS - A memory system for AI agents",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",