@knowlearning/agents 0.9.186 → 0.9.187

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.
@@ -1,5 +1,6 @@
1
1
  import { validate as isUUID } from 'uuid'
2
2
  import { standardJSONPatch } from '@knowlearning/patch-proxy'
3
+ import pkg from '../../package.json' assert { type: 'json' }
3
4
 
4
5
  const HEARTBEAT_TIMEOUT = 10000
5
6
  const DOMAIN_MESSAGES = { open: true, mutate: true, close: true }
@@ -36,7 +37,15 @@ export default function messageQueue({ token, sid, domain, Connection, watchers,
36
37
  authenticated: null
37
38
  }
38
39
 
39
- async function environment() { return { variables, ...(await environmentPromise), context: [] } }
40
+ async function environment() {
41
+ const { version } = pkg
42
+ return {
43
+ variables,
44
+ ...(await environmentPromise),
45
+ context: [],
46
+ version
47
+ }
48
+ }
40
49
 
41
50
  function queueMessage({ scope, patch, context }) {
42
51
  if (lastSynchronousScopePatched === scope) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.9.186",
3
+ "version": "0.9.187",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "node.js",
6
6
  "browser": "browser.js",