@knowlearning/agents 0.9.116 → 0.9.117

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.
Files changed (2) hide show
  1. package/deno.js +4 -2
  2. package/package.json +1 -1
package/deno.js CHANGED
@@ -28,7 +28,7 @@ const agents = {}
28
28
  function getAgent(domain, forceNew) {
29
29
  if (agents[domain] && !forceNew) return agents[domain]
30
30
 
31
- agents[domain] = new Agent({
31
+ const agent = new Agent({
32
32
  Connection: new Connection(domain), // TODO: probably don't want to need to pass domain here, as first message from generic agent should pass it
33
33
  domain,
34
34
  token: () => AGENT_TOKEN,
@@ -80,7 +80,9 @@ function getAgent(domain, forceNew) {
80
80
  }
81
81
  })
82
82
 
83
- return agents[domain]
83
+ agents[domain] = agent
84
+
85
+ return agent
84
86
  }
85
87
 
86
88
  function activePatch(patch) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.9.116",
3
+ "version": "0.9.117",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "node.js",
6
6
  "browser": "browser.js",