@knowlearning/agents 0.9.66 → 0.9.68

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.
@@ -177,6 +177,14 @@ export default function messageQueue({ token, protocol, host, WebSocket, watcher
177
177
  if (watchers[qualifiedScope]) {
178
178
  states[qualifiedScope] = await states[qualifiedScope]
179
179
 
180
+ if (states[qualifiedScope].ii + 1 !== message.ii) {
181
+ console.warn('OUT OF ORDER WATCHER RECEIVED', qualifiedScope, states[qualifiedScope], message)
182
+ return
183
+ }
184
+
185
+ // TODO: this should come down with patch...
186
+ states[qualifiedScope].ii = message.ii
187
+
180
188
  const lastResetPatchIndex = message.patch.findLastIndex(p => p.path.length === 0)
181
189
  if (lastResetPatchIndex > -1) states[qualifiedScope] = message.patch[lastResetPatchIndex].value
182
190
 
@@ -1,5 +1,5 @@
1
- import fastJSONPatch from 'fast-json-patch'
2
- import Agent from './generic/index.js'
1
+ import fastJSONPatch from 'fast-json-patch@3.1.1'
2
+ import Agent from './agents/generic/index.js'
3
3
 
4
4
  const SERVE_HOST = Deno.env.get("SERVE_HOST")
5
5
  const SERVICE_ACCOUNT_TOKEN = Deno.env.get("SERVICE_ACCOUNT_TOKEN")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.9.66",
3
+ "version": "0.9.68",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "node.js",
6
6
  "browser": "browser.js",