@props-labs/mesh-os 0.1.12 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -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(
@@ -763,7 +769,6 @@ class MeshOS {
763
769
  agent_id
764
770
  content
765
771
  metadata
766
- embedding
767
772
  created_at
768
773
  updated_at
769
774
  expires_at
@@ -772,7 +777,7 @@ class MeshOS {
772
777
  `;
773
778
  const result = await this.executeQuery(query, {
774
779
  where,
775
- orderBy,
780
+ orderBy: hasuraOrderBy,
776
781
  limit,
777
782
  offset,
778
783
  ...(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.14",
4
4
  "description": "MeshOS - A memory system for AI agents",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",