@knowlearning/agents 0.9.37 → 0.9.38

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.
@@ -70,8 +70,8 @@ export default function EmbeddedAgent() {
70
70
  }
71
71
  })
72
72
 
73
- function environment() {
74
- return send({ type: 'environment' })
73
+ function environment(user) {
74
+ return send({ type: 'environment', user })
75
75
  }
76
76
 
77
77
  function create({ id=uuid(), active_type, active }) {
@@ -58,8 +58,8 @@ function embed(environment, iframe) {
58
58
  if (listeners.close) listeners.close(message.info)
59
59
  }
60
60
  else if (type === 'environment') {
61
- const { context } = message
62
- const env = await (listeners.environment ? listeners.environment() : Agent.environment())
61
+ const { user } = message
62
+ const env = await (listeners.environment ? listeners.environment(user) : Agent.environment(user))
63
63
  sendDown({ ...env, context: [...(env.context || []), environment.id], mode: environment.mode })
64
64
  }
65
65
  else if (type === 'interact') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.9.37",
3
+ "version": "0.9.38",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "node.js",
6
6
  "browser": "browser.js",