@knowlearning/agents 0.9.122 → 0.9.124

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.
@@ -142,6 +142,7 @@ export default function messageQueue({ token, domain, Connection, watchers, stat
142
142
 
143
143
  authed = true
144
144
  if (!user) { // this is the first authed websocket connection
145
+ console.log('INIT MESSAGE', message)
145
146
  sessionMetrics.authenticated = Date.now()
146
147
  user = message.auth.user
147
148
  session = message.session
package/deno.js CHANGED
@@ -11,8 +11,8 @@ function Connection() {
11
11
  this.send = message => denoProcess.postMessage({ ...message, connection })
12
12
 
13
13
  denoProcess.addEventListener('message', ({ data }) => {
14
- if (data && data.connection === connection) this.onmessage(data)
15
- else this.onmessage(data) // think of better way that doesn't pass all heartbeats to all agents inside domain agent
14
+ if (!data) this.onmessage(data) // think of better way that doesn't pass all heartbeats to all agents inside domain agent
15
+ else if (data.connection === connection) this.onmessage(data)
16
16
  })
17
17
 
18
18
  // TODO: consider what onclose and onerror mean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.9.122",
3
+ "version": "0.9.124",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "node.js",
6
6
  "browser": "browser.js",