@ossy/platform 3.22.1 → 3.24.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ossy/platform",
3
- "version": "3.22.1",
3
+ "version": "3.24.0",
4
4
  "description": "Ossy application server runtime",
5
5
  "repository": {
6
6
  "type": "git",
@@ -49,18 +49,18 @@
49
49
  "@aws-sdk/util-format-url": "^3.972.17",
50
50
  "@modelcontextprotocol/sdk": "^1.12.1",
51
51
  "@ossy/config": "^3.0.9",
52
- "@ossy/email": "^3.22.1",
52
+ "@ossy/email": "^3.24.0",
53
53
  "@ossy/event-store": "^3.20.1",
54
54
  "@ossy/locale": "^3.4.0",
55
- "@ossy/manifest": "^3.20.1",
55
+ "@ossy/manifest": "^3.24.0",
56
56
  "@ossy/observability": "^3.0.9",
57
57
  "@ossy/policies": "^3.0.9",
58
58
  "@ossy/router": "^3.0.9",
59
- "@ossy/schema": "^3.20.1",
60
- "@ossy/sdk": "^3.20.1",
59
+ "@ossy/schema": "^3.24.0",
60
+ "@ossy/sdk": "^3.24.0",
61
61
  "@ossy/tokens": "^3.11.1",
62
- "@ossy/users": "^3.20.1",
63
- "@ossy/workspaces": "^3.22.0",
62
+ "@ossy/users": "^3.24.0",
63
+ "@ossy/workspaces": "^3.24.0",
64
64
  "cookie-parser": "^1.4.7",
65
65
  "dotenv": ">=16.0.0 <18.0.0",
66
66
  "express": ">=5.0.0 <6.0.0",
@@ -81,5 +81,5 @@
81
81
  "Dockerfile",
82
82
  "docker-healthcheck.js"
83
83
  ],
84
- "gitHead": "b90c38bb41c552f9050067c6518e8a27cabf9827"
84
+ "gitHead": "bd8186b5123999b338ce09aa04cd75d7deb0427a"
85
85
  }
@@ -83,10 +83,16 @@ export async function upsertEmbedding (doc) {
83
83
  }
84
84
 
85
85
  /**
86
- * Delete the embedding for a resource (e.g. when the resource is removed).
86
+ * Load the stored embedding for one resource.
87
87
  *
88
88
  * @param {string} resourceId
89
+ * @returns {Promise<object | null>}
89
90
  */
91
+ export async function getEmbedding (resourceId) {
92
+ if (!resourceId) return null
93
+ return col().findOne({ resourceId }, { projection: { _id: 0 } })
94
+ }
95
+
90
96
  export async function deleteEmbedding (resourceId) {
91
97
  await col().deleteOne({ resourceId })
92
98
  }