@knowlearning/agents 0.9.118 → 0.9.119
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.
- package/deno.js +2 -4
- package/package.json +1 -1
package/deno.js
CHANGED
|
@@ -28,15 +28,13 @@ const agents = {}
|
|
|
28
28
|
function getAgent(domain, forceNew) {
|
|
29
29
|
if (agents[domain] && !forceNew) return agents[domain]
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
agent = new Agent({
|
|
31
|
+
const agent = new Agent({
|
|
34
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
|
|
35
33
|
domain,
|
|
36
34
|
token: () => AGENT_TOKEN,
|
|
37
35
|
uuid: () => crypto.randomUUID(),
|
|
38
36
|
async log() {
|
|
39
|
-
await new Promise(r => r
|
|
37
|
+
await new Promise(r => setTimeout(r)) // so we can access our own agent instance
|
|
40
38
|
|
|
41
39
|
const { session } = await agent.environment()
|
|
42
40
|
let value
|