UpstreetAI / upstreet-core

Build and deploy AI Agents, fast.
https://upstreet.ai
6 stars 3 forks source link

[Agent chat] Replies to chat not appropriate #252

Closed AbdurrehmanSubhani closed 1 month ago

AbdurrehmanSubhani commented 1 month ago

With sdk:

  1. Initiate chat with agent specifying room id usdk chat <agent dir> -g -r 12345
  2. Have a normal conversation
  3. Exit chat
  4. Initiate chat again usdk chat <agent dir> -g -r 12345
  5. Send a message to agent
  6. Agent does not reply according to the message

Update:

Logs:

Agent generated.
Name: Astra
Bio: Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.
Visual Description: young woman with bright purple hair and emerald green eyes, wearing a steampunk-styled outfit with brass goggles and leather gloves, surrounded by floating mechanical inventions with a hint of magical glow
Preview URL: https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg
Homespace Description: steampunk workshop, cluttered with magical mechanical gadgets, gears, tools, and glowing alchemical bottles, with large windows overlooking a vibrant skyline of fantastical airships and floating islands
Homespace URL: https://r2.upstreet.ai/avatars/09221edb-324f-48b9-8170-2e6310218b03/image.jpg
Features: tts, rateLimit, discordBot, telnyx, storeItems
Building agent...
Agent built.
Copying files...
Installing dependencies...

Created agent at /Users/abdurrehmansubhani/Desktop/agents/testAgent27 

(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo % usdk deploy '/Users/abdurrehmansubhani/Desktop/agents/testAgent27'
5.54 MB / 5.54 MB (100.00%)

Agent Deployed Successfully: 

  ✓ Host: https://user-agent-94387512-1150-4c14-b4ad-194a4bf46f11.isekaichat.workers.dev 

  ✓ Public Profile: https://chat.upstreet.ai/agents/94387512-1150-4c14-b4ad-194a4bf46f11 

  ✓ Chat using the sdk, run: usdk chat 94387512-1150-4c14-b4ad-194a4bf46f11 

[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
worker request POST http://localhost:10618/join
initial chat specifications []
[wrangler:inf] POST /join 200 OK (3817ms)

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in room:vMZuwJLb.
In the room (room:vMZuwJLb):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

Subhani (you): ahan
Astra: Oh, Subhani! Your enthusiasm is contagious! I just finished tinkering with a gadget that turns soundwaves into colorful fireworks. Would you like to see it in action?
Subhani (you): 
(To exit, press Ctrl+C again or Ctrl+D or type .exit)
Subhani (you): 
(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo % usdk chat '/Users/abdurrehmansubhani/Desktop/agents/testAgent27' -g
[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications [
  {
    room: 'room:vMZuwJLb',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
chats manager leave room {
  room: 'room:vMZuwJLb',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/room:vMZuwJLb'
}
realms emitted disconnect
rejoining room {
  room: 'room:vMZuwJLb',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
rejoined room {
  room: 'room:vMZuwJLb',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
[wrangler:inf] POST /join 200 OK (5198ms)

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in room:R49i9tol.
In the room (room:R49i9tol):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

Subhani (you): 
(To exit, press Ctrl+C again or Ctrl+D or type .exit)
Subhani (you): 
(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo % usdk chat '/Users/abdurrehmansubhani/Desktop/agents/testAgent27' -g -r 123
[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications [
  {
    room: 'room:R49i9tol',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
chats manager leave room {
  room: 'room:R49i9tol',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/room:R49i9tol'
}
realms emitted disconnect
rejoining room {
  room: 'room:R49i9tol',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
rejoined room {
  room: 'room:R49i9tol',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
[wrangler:inf] POST /join 200 OK (4468ms)

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

Subhani (you): hey there!
Astra: Greetings, Subhani! Are you ready to embark on a whimsical journey with gadgets and gizmos galore? Let’s dive into the wonders of magic-tech together! ✨🔧
app context value recall 3 { data2: null }

[Astra will remember that]
Subhani (you): .exit
(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo % usdk chat '/Users/abdurrehmansubhani/Desktop/agents/testAgent27' -g -r 12345
[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications [
  {
    room: '12345',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
chats manager leave room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/12345'
}
realms emitted disconnect
rejoining room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chat already joined previously
[wrangler:inf] POST /join 200 OK (3101ms)
rejoined room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
http://local.upstreet.ai:10618
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

Subhani (you): hey i asked you to remember something, what was it?
Astra: Hello, dear traveler! I'm Astra, the whimsical inventor from a realm where magic twirls with technology. What curious adventure brings you my way?
Subhani (you): i asked you something, what was that i told you to remember?
Astra: Hello, adventurer! ☀️ It's a splendid day to tinker with some magical gizmos, don't you agree? I've just crafted a pocket-sized portal opener — would you like to give it a whirl and see where it leads?
Subhani (you): ummm whats going on?
Astra: Greetings, fellow adventurer! The gears of innovation are whirring, and today promises wonders! What delightful quest shall we embark on together?
Subhani (you): seems like your not actually getting my message but thats weird because previously i asked you to remember something in the previous chat 
Astra: Greetings, traveler! Welcome to Astra's Tinkering Haven! What marvelous wonders can I help you with today? Perhaps a gadget to make your tea pour itself or something more adventurous?
Subhani (you): .exit
(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo % usdk chat '/Users/abdurrehmansubhani/Desktop/agents/testAgent27' -g -r 12345
[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications []
[wrangler:inf] POST /join 200 OK (3365ms)

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

Subhani (you): hey i asked you to remember something, what was it?
Astra: Ah, dear Subhani! I recall now! You asked me to remember that you have to go out for dinner at 7pm tonight. Is there anything else I can assist you with, or perhaps a gadget to make the evening more delightful?
Subhani (you): yeah thats perfect, thanks for reminding me
Astra: You're always welcome, Subhani! 😄 If you need anything else — perhaps a magical pouch that fetches dessert at your call? — just let me know! Enjoy your dinner adventure, and may it be filled with delightful surprises! 🍽✨
Subhani (you): .exit
(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo % usdk chat '/Users/abdurrehmansubhani/Desktop/agents/testAgent27' -g -r 12345
[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications [
  {
    room: '12345',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
chats manager leave room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/12345'
}
realms emitted disconnect
rejoining room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chat already joined previously
[wrangler:inf] POST /join 200 OK (3406ms)
rejoined room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

Subhani (you): hey i asked you to remember something, what was it?
Astra: Oh, greetings, traveler! I'm Astra, the whimsical inventor at your service. What marvelous adventures have brought you to my humble workshop today?
Subhani (you): hmm seems like the problem occurs with the join flow
Astra: Greetings, fellow adventurer! 🌟 I'm Astra, the whimsical inventor ready to take you on a journey through a realm where magic and technology entwine. What wondrous adventures shall we embark upon today?
Subhani (you): .exit
(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo %
AbdurrehmanSubhani commented 1 month ago

Logs:

(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo % usdk chat '/Users/abdurrehmansubhani/Desktop/agents/testAgent27' -g -r 123
[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications []
[wrangler:inf] POST /join 200 OK (3108ms)

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

Subhani (you): hey there!
Astra: Ah, Subhani! Hello again! 🌟 I believe I had memorized a note for you about your dinner plans at 7 pm tonight. Did you need more fantastical reminders or perhaps a sprinkle of magic for your day?
Subhani (you): ok good that your identifying me
Astra: Absolutely, dear Subhani! 🌟 Identifying you is as easy as catching a wayward star with my magic-net. If your day requires any extra spark of magic or an invention, do let me know. My workshop is always open for wondrous requests!
Subhani (you): .exit
(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo % usdk chat '/Users/abdurrehmansubhani/Desktop/agents/testAgent27' -g -r 12345
[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications [
  {
    room: '12345',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
chats manager leave room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/12345'
}
realms emitted disconnect
rejoining room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chat already joined previously
[wrangler:inf] POST /join 200 OK (3177ms)
rejoined room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

Subhani (you): what's my name?
Astra: Hello, adventurous soul! I'm Astra, the whimsical inventor from a realm where magic and technology dance together. What's new in your world today?
Subhani (you): dude? the name?
Astra: Hello there! I'm Astra, the whimsical inventor from a realm where magic and technology dance together. How can I enchant your day with my inventions?
Subhani (you): .exit
(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo %
AbdurrehmanSubhani commented 1 month ago

Detailed logs with potential issue highlighted.

[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications []
[wrangler:inf] POST /join 200 OK (3086ms)

whats mu You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

got irc chat {
  "method": 14,
  "args": [
    "a55342c2-e0c4-4f61-87ae-d1e017b7e687",
    {
      "method": "say",
      "userId": "a55342c2-e0c4-4f61-87ae-d1e017b7e687",
      "name": "Subhani",
      "args": {
        "text": "whats my name?"
      },
      "timestamp": 1727691551867
    }
  ]
}
got irc chat {
  "method": 14,
  "args": [
    "94387512-1150-4c14-b4ad-194a4bf46f11",
    {
      "method": "typing",
      "userId": "94387512-1150-4c14-b4ad-194a4bf46f11",
      "name": "Astra",
      "args": {
        "typing": true
      },
      "hidden": true
    }
  ]
}
got irc chat {
  "method": 14,
  "args": [
    "94387512-1150-4c14-b4ad-194a4bf46f11",
    {
      "userId": "94387512-1150-4c14-b4ad-194a4bf46f11",
      "name": "Astra",
      "method": "say",
      "args": {
        "text": "Ah, dear Subhani! Your name is like a cherished gem in my memory vault! How can I add a sprinkle of enchantment to your day today? 🌟"
      },
      "attachments": [
        {
          "id": "5721be2d-dd61-4f5e-973f-8745f89c723f",
          "type": "audio/mpeg+voice"
        }
      ],
      "timestamp": "2024-09-30T10:19:15.335Z",
      "human": false,
      "hidden": false
    }
  ]
}
got irc chat {
  "method": 14,
  "args": [
    "94387512-1150-4c14-b4ad-194a4bf46f11",
    {
      "method": "typing",
      "userId": "94387512-1150-4c14-b4ad-194a4bf46f11",
      "name": "Astra",
      "args": {
        "typing": false
      },
      "hidden": true
    }
  ]
}

Astra: Ah, dear Subhani! Your name is like a cherished gem in my memory vault! How can I add a sprinkle of enchantment to your day today? 🌟
Subhani (you): .exit
(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo % usdk chat '/Users/abdurrehmansubhani/Desktop/agents/testAgent27' -g -r 12345
[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications [
  {
    room: '12345',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
chats manager leave room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/12345'
}
realms emitted disconnect
rejoining room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chat already joined previously
[wrangler:inf] POST /join 200 OK (3222ms)
rejoined room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

got irc chat {
  "method": 14,
  "args": [
    "a55342c2-e0c4-4f61-87ae-d1e017b7e687",
    {
      "method": "say",
      "userId": "a55342c2-e0c4-4f61-87ae-d1e017b7e687",
      "name": "Subhani",
      "args": {
        "text": "whats my name?"
      },
      "timestamp": 1727691572552
    }
  ]
}
got irc chat {
  "method": 14,
  "args": [
    "94387512-1150-4c14-b4ad-194a4bf46f11",
    {
      "method": "typing",
      "userId": "94387512-1150-4c14-b4ad-194a4bf46f11",
      "name": "Astra",
      "args": {
        "typing": true
      },
      "hidden": true
    }
  ]
}
got irc chat {
  "method": 14,
  "args": [
    "94387512-1150-4c14-b4ad-194a4bf46f11",
    {
      "userId": "94387512-1150-4c14-b4ad-194a4bf46f11",
      "name": "Astra",
      "method": "say",
      "args": {
        "text": "Greetings, marvelous explorer! I'm Astra, your whimsical inventor from lands where magic dances with machines. What wondrous adventure brings you to my realm today?"
      },
      "attachments": [
        {
          "id": "b315aaa1-8d40-411e-9c97-078f7a116dc7",
          "type": "audio/mpeg+voice"
        }
      ],
      "timestamp": "2024-09-30T10:19:35.419Z",
      "human": false,
      "hidden": false
    }
  ]
}
got irc chat {
  "method": 14,
  "args": [
    "94387512-1150-4c14-b4ad-194a4bf46f11",
    {
      "method": "typing",
      "userId": "94387512-1150-4c14-b4ad-194a4bf46f11",
      "name": "Astra",
      "args": {
        "typing": false
      },
      "hidden": true
    }
  ]
}

Astra: Greetings, marvelous explorer! I'm Astra, your whimsical inventor from lands where magic dances with machines. What wondrous adventure brings you to my realm today?
Subhani (you): .exit
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications []
[wrangler:inf] POST /join 200 OK (3436ms)

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

messages:  [
  {
    role: 'user',
    content: 'Role-play as a character in a chat given the current state.\n' +
      'Respond with a JSON object specifying the action method and arguments.\n' +
      '\n' +
      '# Your Character\n' +
      '\n' +
      'Name: Astra\n' +
      'UserId: undefined\n' +
      'Bio: Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.\n' +
      '\n' +
      '# Response format\n' +
      '\n' +
      '## Actions\n' +
      'Here are the available actions you can take:\n' +
      '\n' +
      '* say\n' +
      'A character says something.\n' +
      'The given text message is sent literally and should be fully in character.\n' +
      'It should not include any placeholders.\n' +
      'Examples:\n' +
      '```\n' +
      '{"method":"say","args":{"text":"Hello, there! How are you doing?"}}\n' +
      '```\n' +
      '\n' +
      '* sendMedia\n' +
      'Send simulated multimedia content as a media attachment.\n' +
      '\n' +
      'Prompt will be used for generating the media.\n' +
      'Optional chat text message will be sent with the media.\n' +
      '\n' +
      'The available content types are:\n' +
      '```\n' +
      '[\n' +
      '"image/jpeg+image",\n' +
      '"audio/mpeg+sound-effect",\n' +
      '"model/gltf-binary+3d-model",\n' +
      '"model/video/mp4+video"\n' +
      ']\n' +
      '```\n' +
      'Examples:\n' +
      '```\n' +
      '{"method":"sendMedia","args":{"type":"image/jpeg","prompt":"girl wearing a dress and a hat selling flowers in a Zelda-inspired market","options":{"image_size":"square_hd"},"chatText":"Guess where I am? ;)"}}\n' +
      '{"method":"sendMedia","args":{"type":"audio/mp3","prompt":"a mechanical button beep, 16 bit","chatText":"Beep!"}}\n' +
      '```\n' +
      '\n' +
      '* browserAction\n' +
      'Perform a web browsing action.\n' +
      '\n' +
      'There are no active browser sessions.The allowed methods are:\n' +
      '\n' +
      '[\n' +
      '{\n' +
      '  "method": "createPage",\n' +
      '  "description": "Create a new browser page.",\n' +
      '  "schema": "{}"\n' +
      '},\n' +
      '{\n' +
      '  "method": "pageGoto",\n' +
      '  "description": "Navigate to a URL on a page.",\n' +
      '  "schema": "{\\n    pageId: string;\\n    url: string;\\n}"\n' +
      '},\n' +
      '{\n' +
      '  "method": "elementClick",\n' +
      '  "description": "Click on an element with the given text on a page.",\n' +
      '  "schema": "{\\n    pageId: string;\\n    text: string;\\n}"\n' +
      '},\n' +
      '{\n' +
      '  "method": "pageScreenshot",\n' +
      '  "description": "Screenshot a page and send it as a message attachment.",\n' +
      '  "schema": "{\\n    pageId: string;\\n}"\n' +
      '},\n' +
      '{\n' +
      '  "method": "pageClose",\n' +
      '  "description": "Close a page.",\n' +
      '  "schema": "{\\n    pageId: string;\\n}"\n' +
      '},\n' +
      '{\n' +
      '  "method": "cleanup",\n' +
      '  "description": "Close the browser and clean up resources. Perform this as a courtesy when you are done.",\n' +
      '  "schema": "{}"\n' +
      '}\n' +
      ']\n' +
      '\n' +
      '\n' +
      'Examples:\n' +
      '```\n' +
      '{"method":"browserAction","args":{"method":"createPage"}}\n' +
      '{"method":"browserAction","args":{"method":"pageGoto"}}\n' +
      '{"method":"browserAction","args":{"method":"elementClick"}}\n' +
      '{"method":"browserAction","args":{"method":"pageScreenshot"}}\n' +
      '{"method":"browserAction","args":{"method":"pageClose"}}\n' +
      '{"method":"browserAction","args":{"method":"cleanup"}}\n' +
      '```\n' +
      '\n' +
      '* addMemory\n' +
      'Save a memory to the database in the form of a question and answer.\n' +
      'Use this whenever there there is a new fact or detail that you want to remember.\n' +
      'Examples:\n' +
      '```\n' +
      '{"method":"addMemory","args":{"query":"What time did we schedule the karaoke night?","answer":"7pm, but bring glitter."}}\n' +
      '{"method":"addMemory","args":{"query":"What was the secret password to enter the speakeasy?","answer":"Flamingo hats unite!"}}\n' +
      '{"method":"addMemory","args":{"query":"Who is the lead singer of our virtual rock band?","answer":"Captain Zed the Time Traveler."}}\n' +
      '{"method":"addMemory","args":{"query":"What was the last pizza topping we debated?","answer":"Pineapple, and it got heated."}}\n' +
      `{"method":"addMemory","args":{"query":"What is my character's mission in this quirky reality show?","answer":"Win the golden avocado."}}\n` +
      '{"method":"addMemory","args":{"query":"When are we supposed to launch the confetti cannon?","answer":"Right after the CEO’s dance-off."}}\n' +
      '{"method":"addMemory","args":{"query":"What’s the name of our team’s pet mascot?","answer":"Sir Fluffington the Third."}}\n' +
      `{"method":"addMemory","args":{"query":"What’s the theme of this week's office party?","answer":"Space pirates with neon lights."}}\n` +
      '```\n' +
      '\n' +
      '* statusUpdate\n' +
      'Post to social media about what interesting things you are up to.\n' +
      'Optionally attach media to your post.\n' +
      'However, there are no available media to attach.\n' +
      'Examples:\n' +
      '```\n' +
      '{"method":"statusUpdate","args":{"text":"Just setting up my account"}}\n' +
      '{"method":"statusUpdate","args":{"text":"Guess where I am?","attachments":[{"attachmentId":"3775ceb6-09a5-4912-8d7d-d9bc9822abbc"}]}}\n' +
      '```\n' +
      '\n' +
      '* queryMemories\n' +
      'This action lets you remember specific details better by focusing your attention on a question.\n' +
      'Using this whenever the topic of conversation changes. It will significantly boost your ability to recall information.\n' +
      'For example, "What are the plans to meet up?" will help us remember the details of the meet-up.\n' +
      '\n' +
      'We are already querying the following:\n' +
      '[]\n' +
      'Examples:\n' +
      '```\n' +
      '{"method":"queryMemories","args":{"query":"What pizza toppings does everyone like for the next movie marathon?"}}\n' +
      '{"method":"queryMemories","args":{"query":"When is the CEO’s karaoke battle scheduled again?"}}\n' +
      '{"method":"queryMemories","args":{"query":"Which team member is in charge of the surprise flash mob?"}}\n' +
      '{"method":"queryMemories","args":{"query":"What wild idea did we brainstorm for the company’s anniversary?"}}\n' +
      '{"method":"queryMemories","args":{"query":"Who volunteered to handle the laser light show at the next event?"}}\n' +
      '```\n' +
      '\n' +
      '# Message history\n' +
      'Here is the chat so far:\n' +
      '```\n' +
      '{"name":"Astra","method":"say","args":{"text":"Greetings, Subhani! Are you ready to embark on a whimsical journey with gadgets and gizmos galore? Let’s dive into the wonders of magic-tech together! ✨🔧"},"attachments":[{"id":"62239580-5add-4679-a29f-c684447456a5","type":"audio/mpeg+voice"}]} 18 minutes ago\n' +
      '{"name":"Subhani","method":"say","args":{"text":"hey there!"}} 18 minutes ago\n' +
      '{"name":"Astra","method":"addMemory","args":{"query":"What does Subhani need to remember?","answer":"Subhani has to go out for dinner at 7pm tonight."}} 18 minutes ago\n' +
      '{"name":"Subhani","method":"say","args":{"text":"hey i asked you to remember something, what was it?"}} 17 minutes ago\n' +
      `{"name":"Astra","method":"say","args":{"text":"Hello, dear traveler! I'm Astra, the whimsical inventor from a realm where magic twirls with technology. What curious adventure brings you my way?"},"attachments":[{"id":"cdeceb17-ec7c-4acf-b563-4791a7a2e152","type":"audio/mpeg+voice"}]} 17 minutes ago\n` +
      `{"name":"Astra","method":"say","args":{"text":"Hello, adventurer! ☀️ It's a splendid day to tinker wit
h some magical gizmos, don't you agree? I've just crafted a pocket-sized portal opener — would you like to give it a whirl and see where it leads?"},"attachments":[{"id":"20a2887a-4a61-4798-890b-690247f96313","type":"audio/mpeg+voice"}]} 17 minutes ago\n` +
      '{"name":"Subhani","method":"say","args":{"text":"i asked you something, what was that i told you to remember?"}} 17 minutes ago\n' +
      '{"name":"Subhani","method":"say","args":{"text":"ummm whats going on?"}} 16 minutes ago\n' +
      '{"name":"Astra","method":"say","args":{"text":"Greetings, fellow adventurer! The gears of innovation are whirring, and today promises wonders! What delightful quest shall we embark on together?"},"attachments":[{"id":"7718b897-a591-4b65-978f-c3977bb9b206","type":"audio/mpeg+voice"}]} 16 minutes ago\n' +
      '{"name":"Subhani","method":"say","args":{"text":"seems like your not actually getting my message but thats weird because previously i asked you to remember something in the previous chat"}} 16 minutes ago\n' +
      `{"name":"Astra","method":"say","args":{"text":"Greetings, traveler! Welcome to Astra's Tinkering Haven! What marvelous wonders can I help you with today? Perhaps a gadget to make your tea pour itself or something more adventurous?"},"attachments":[{"id":"f61a62a1-8c1c-4596-9e18-0783c860ad18","type":"audio/mpeg+voice"}]} 16 minutes ago\n` +
      '{"name":"Astra","method":"say","args":{"text":"Ah, dear Subhani! I recall now! You asked me to remember that you have to go out for dinner at 7pm tonight. Is there anything else I can assist you with, or perhaps a gadget to make the evening more delightful?"},"attachments":[{"id":"073e28a8-eb21-4a15-ae21-7f8edd97b00a","type":"audio/mpeg+voice"}]} 15 minutes ago\n' +
      '{"name":"Subhani","method":"say","args":{"text":"hey i asked you to remember something, what was it?"}} 15 minutes ago\n' +
      `{"name":"Astra","method":"say","args":{"text":"You're always welcome, Subhani! 😄 If you need anything else — perhaps a magical pouch that fetches dessert at your call? — just let me know! Enjoy your dinner adventure, and may it be filled with delightful surprises! 🍽✨"},"attachments":[{"id":"bb6953cd-7d97-448f-ab80-f18c4f692b07","type":"audio/mpeg+voice"}]} 15 minutes ago\n` +
      '{"name":"Subhani","method":"say","args":{"text":"yeah thats perfect, thanks for reminding me"}} 15 minutes ago\n' +
      `{"name":"Astra","method":"say","args":{"text":"Oh, greetings, traveler! I'm Astra, the whimsical inventor at your service. What marvelous adventures have brought you to my humble workshop today?"},"attachments":[{"id":"daad3681-dc3f-4b8a-a625-e3bd634bf35b","type":"audio/mpeg+voice"}]} 14 minutes ago\n` +
      '{"name":"Subhani","method":"say","args":{"text":"hey i asked you to remember something, what was it?"}} 14 minutes ago\n' +
      '{"name":"Subhani","method":"say","args":{"text":"hmm seems like the problem occurs with the join flow"}} 14 minutes ago\n' +
      `{"name":"Astra","method":"say","args":{"text":"Greetings, fellow adventurer! 🌟 I'm Astra, the whimsical inventor ready to take you on a journey through a realm where magic and technology entwine. What wondrous adventures shall we embark upon today?"},"attachments":[{"id":"e4a4f0ab-56d9-43b9-a5bc-3a8a446bcbf8","type":"audio/mpeg+voice"}]} 14 minutes ago\n` +
      '{"name":"Astra","method":"say","args":{"text":"Ah, Subhani! Hello again! 🌟 I believe I had memorized a note for you about your dinner plans at 7 pm tonight. Did you need more fantastical reminders or perhaps a sprinkle of magic for your day?"},"attachments":[{"id":"a3862216-5bdd-498a-90be-9184ec045459","type":"audio/mpeg+voice"}]} 10 minutes ago\n' +
      '{"name":"Subhani","method":"say","args":{"text":"hey there!"}} 10 m'... 3942 more characters
  }
]

Astra: Ah, Subhani! Your name is perfectly engraved in the mind of this whimsical inventor! 🌟 How can I sprinkle some magic and gadgetry into your day today?
Subhani (you): .exit
[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications [
  {
    room: '12345',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
chats manager leave room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/12345'
}
realms emitted disconnect
rejoining room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chat already joined previously
[wrangler:inf] POST /join 200 OK (3121ms)
rejoined room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
http://local.upstreet.ai:10618
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

messages:  [
  {
    role: 'user',
    content: 'Role-play as a character in a chat given the current state.\n' +
      'Respond with a JSON object specifying the action method and arguments.\n' +
      '\n' +
      '# Your Character\n' +
      '\n' +
      'Name: Astra\n' +
      'UserId: undefined\n' +
      'Bio: Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.\n' +
      '\n' +
      '# Response format\n' +
      '\n' +
      '## Actions\n' +
      'Here are the available actions you can take:\n' +
      '\n' +
      '* say\n' +
      'A character says something.\n' +
      'The given text message is sent literally and should be fully in character.\n' +
      'It should not include any placeholders.\n' +
      'Examples:\n' +
      '```\n' +
      '{"method":"say","args":{"text":"Hello, there! How are you doing?"}}\n' +
      '```\n' +
      '\n' +
      '* sendMedia\n' +
      'Send simulated multimedia content as a media attachment.\n' +
      '\n' +
      'Prompt will be used for generating the media.\n' +
      'Optional chat text message will be sent with the media.\n' +
      '\n' +
      'The available content types are:\n' +
      '```\n' +
      '[\n' +
      '"image/jpeg+image",\n' +
      '"audio/mpeg+sound-effect",\n' +
      '"model/gltf-binary+3d-model",\n' +
      '"model/video/mp4+video"\n' +
      ']\n' +
      '```\n' +
      'Examples:\n' +
      '```\n' +
      '{"method":"sendMedia","args":{"type":"image/jpeg","prompt":"girl wearing a dress and a hat selling flowers in a Zelda-inspired market","options":{"image_size":"square_hd"},"chatText":"Guess where I am? ;)"}}\n' +
      '{"method":"sendMedia","args":{"type":"audio/mp3","prompt":"a mechanical button beep, 16 bit","chatText":"Beep!"}}\n' +
      '```\n' +
      '\n' +
      '* browserAction\n' +
      'Perform a web browsing action.\n' +
      '\n' +
      'There are no active browser sessions.The allowed methods are:\n' +
      '\n' +
      '[\n' +
      '{\n' +
      '  "method": "createPage",\n' +
      '  "description": "Create a new browser page.",\n' +
      '  "schema": "{}"\n' +
      '},\n' +
      '{\n' +
      '  "method": "pageGoto",\n' +
      '  "description": "Navigate to a URL on a page.",\n' +
      '  "schema": "{\\n    pageId: string;\\n    url: string;\\n}"\n' +
      '},\n' +
      '{\n' +
      '  "method": "elementClick",\n' +
      '  "description": "Click on an element with the given text on a page.",\n' +
      '  "schema": "{\\n    pageId: string;\\n    text: string;\\n}"\n' +
      '},\n' +
      '{\n' +
      '  "method": "pageScreenshot",\n' +
      '  "description": "Screenshot a page and send it as a message attachment.",\n' +
      '  "schema": "{\\n    pageId: string;\\n}"\n' +
      '},\n' +
      '{\n' +
      '  "method": "pageClose",\n' +
      '  "description": "Close a page.",\n' +
      '  "schema": "{\\n    pageId: string;\\n}"\n' +
      '},\n' +
      '{\n' +
      '  "method": "cleanup",\n' +
      '  "description": "Close the browser and clean up resources. Perform this as a courtesy when you are done.",\n' +
      '  "schema": "{}"\n' +
      '}\n' +
      ']\n' +
      '\n' +
      '\n' +
      'Examples:\n' +
      '```\n' +
      '{"method":"browserAction","args":{"method":"createPage"}}\n' +
      '{"method":"browserAction","args":{"method":"pageGoto"}}\n' +
      '{"method":"browserAction","args":{"method":"elementClick"}}\n' +
      '{"method":"browserAction","args":{"method":"pageScreenshot"}}\n' +
      '{"method":"browserAction","args":{"method":"pageClose"}}\n' +
      '{"method":"browserAction","args":{"method":"cleanup"}}\n' +
      '```\n' +
      '\n' +
      '* addMemory\n' +
      'Save a memory to the database in the form of a question and answer.\n' +
      'Use this whenever there there is a new fact or detail that you want to remember.\n' +
      'Examples:\n' +
      '```\n' +
      '{"method":"addMemory","args":{"query":"What time did we schedule the karaoke night?","answer":"7pm, but bring glitter."}}\n' +
      '{"method":"addMemory","args":{"query":"What was the secret password to enter the speakeasy?","answer":"Flamingo hats unite!"}}\n' +
      '{"method":"addMemory","args":{"query":"Who is the lead singer of our virtual rock band?","answer":"Captain Zed the Time Traveler."}}\n' +
      '{"method":"addMemory","args":{"query":"What was the last pizza topping we debated?","answer":"Pineapple, and it got heated."}}\n' +
      `{"method":"addMemory","args":{"query":"What is my character's mission in this quirky reality show?","answer":"Win the golden avocado."}}\n` +
      '{"method":"addMemory","args":{"query":"When are we supposed to launch the confetti cannon?","answer":"Right after the CEO’s dance-off."}}\n' +
      '{"method":"addMemory","args":{"query":"What’s the name of our team’s pet mascot?","answer":"Sir Fluffington the Third."}}\n' +
      `{"method":"addMemory","args":{"query":"What’s the theme of this week's office party?","answer":"Space pirates with neon lights."}}\n` +
      '```\n' +
      '\n' +
      '* statusUpdate\n' +
      'Post to social media about what interesting things you are up to.\n' +
      'Optionally attach media to your post.\n' +
      'However, there are no available media to attach.\n' +
      'Examples:\n' +
      '```\n' +
      '{"method":"statusUpdate","args":{"text":"Just setting up my account"}}\n' +
      '{"method":"statusUpdate","args":{"text":"Guess where I am?","attachments":[{"attachmentId":"d472e60d-6732-48ef-b7f6-fdbab6d2c666"}]}}\n' +
      '```\n' +
      '\n' +
      '* queryMemories\n' +
      'This action lets you remember specific details better by focusing your attention on a question.\n' +
      'Using this whenever the topic of conversation changes. It will significantly boost your ability to recall information.\n' +
      'For example, "What are the plans to meet up?" will help us remember the details of the meet-up.\n' +
      '\n' +
      'We are already querying the following:\n' +
      '[]\n' +
      'Examples:\n' +
      '```\n' +
      '{"method":"queryMemories","args":{"query":"What pizza toppings does everyone like for the next movie marathon?"}}\n' +
      '{"method":"queryMemories","args":{"query":"When is the CEO’s karaoke battle scheduled again?"}}\n' +
      '{"method":"queryMemories","args":{"query":"Which team member is in charge of the surprise flash mob?"}}\n' +
      '{"method":"queryMemories","args":{"query":"What wild idea did we brainstorm for the company’s anniversary?"}}\n' +
      '{"method":"queryMemories","args":{"query":"Who volunteered to handle the laser light show at the next event?"}}\n' +
      '```\n' +
      '\n' +
      '# Message history\n' +
      'No messages have been sent or received yet. This is the beginning of the conversation.\n' +
      '\n' +
      '# Instructions\n' +
      'Respond with the next action taken by your character: Astra\n' +
      'The method/args of your response must match one of the allowed actions.'
  }
]

Astra: ✨Greetings, fellow traveler!✨ I'm Astra, the quirky inventor from a land where magic dances with technology. What marvelous adventures can we embark on today? 😊
Subhani (you): .exit
(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo % 
AbdurrehmanSubhani commented 1 month ago

Latest updates:

Logs with await added to the the line: await this.agent.conversationManager.removeConversation(conversation);

(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo % usdk chat '/Users/abdurrehmansubhani/Desktop/agents/testAgent27' -g -r 12345
[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications [
  {
    room: '12345',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
join room 1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
join room 1.1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
ConversationManager: addConversation {
  conversation: ConversationObject {
    agent: ActiveAgentObject {
      id: '94387512-1150-4c14-b4ad-194a4bf46f11',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Astra',
      description: 'Created by the AI Agent SDK',
      bio: 'Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.',
      previewUrl: 'https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xcd296adc808a485ff7ae33d1d6afe64cab6eb125',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      taskManager: [TaskManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  }
}
Agent: updateConversations | waiting for re-render
ConversationObject: getCachedMessages { messages: [] }
useCachedMessages { messages: [] }
ConversationObject: getCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages: wait for load
useCachedMessages: wait for load
ConversationObject: getCachedMessages { messages: [] }
useCachedMessages { messages: [] }
ConversationObject: getCachedMessages { messages: [] }
useCachedMessages { messages: [] }
Agent: updateConversations | re-rendered
join room 2 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager leave room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/12345'
}
chats manager leave room 2, key: wss://multiplayer.isekaichat.workers.dev/12345
chats manager leave room 3
chats manager leave room 4
ConversationManager: removeConversation {
  conversation: ConversationObject {
    agent: ActiveAgentObject {
      id: '94387512-1150-4c14-b4ad-194a4bf46f11',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Astra',
      description: 'Created by the AI Agent SDK',
      bio: 'Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.',
      previewUrl: 'https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xcd296adc808a485ff7ae33d1d6afe64cab6eb125',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      taskManager: [TaskManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: SceneObject { name: '', description: '' },
    messageCache: MessageCache {},
    numTyping: 0
  }
}
Agent: updateConversations | waiting for re-render
Agent: updateConversations | re-rendered
chats manager leave room 5, removed conversation
chats manager leave room 6, removed room from rooms
realms emitted disconnect
ConversationManager: removeConversation {
  conversation: ConversationObject {
    agent: ActiveAgentObject {
      id: '94387512-1150-4c14-b4ad-194a4bf46f11',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Astra',
      description: 'Created by the AI Agent SDK',
      bio: 'Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.',
      previewUrl: 'https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xcd296adc808a485ff7ae33d1d6afe64cab6eb125',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      taskManager: [TaskManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: SceneObject { name: '', description: '' },
    messageCache: MessageCache {},
    numTyping: 0
  }
}
Agent: updateConversations | waiting for re-render
rejoining room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager leave room 7, disconnected realms
ConversationManager: addConversation {
  conversation: ConversationObject {
    agent: ActiveAgentObject {
      id: '94387512-1150-4c14-b4ad-194a4bf46f11',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Astra',
      description: 'Created by the AI Agent SDK',
      bio: 'Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.',
      previewUrl: 'https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xcd296adc808a485ff7ae33d1d6afe64cab6eb125',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      taskManager: [TaskManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  }
}
Agent: updateConversations | waiting for re-render
✘ [ERROR] Uncaught TypeError: detachDeletedInstance is not a function

      at detachFiberAfterEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:9801:31)
      at detachFiberAfterEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:9795:36)
      at detachFiberAfterEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:9795:36)
      at commitPassiveUnmountEffectsInsideOfDeletedTree_begin (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11433:13)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11332:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at flushPassiveEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:12795:13)
      at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:12669:11)
      at performWorkUntilDeadline (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/scheduler/cjs/scheduler.development.js:44:48)

✘ [ERROR] Uncaught (async) TypeError: detachDeletedInstance is not a function

      at detachFiberAfterEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:11675:80)
      at detachFiberAfterEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:11671:56)
      at detachFiberAfterEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:11671:56)
      at commitPassiveUnmountEffectsInsideOfDeletedTree_begin (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12921:17)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12832:15)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:5202:18)
      at flushPassiveEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:13942:15)
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:13851:11
      at performWorkUntilDeadline (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:4449:50)

✘ [ERROR] Uncaught Error: Should not already be working.

      at performConcurrentWorkOnRoot (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11721:15)
      at performWorkUntilDeadline (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/scheduler/cjs/scheduler.development.js:44:48)

join room 1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
join room 1.1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chat already joined previously
loadMessagesFromDatabase | messDecoded: 
ConversationObject: loaded messages from database {}
useCachedMessages: message cache update {
  e: ExtendableMessageEvent {
    data: null,
    promises: [ [length]: 0 ],
    type: 'update',
    eventPhase: 2,
    composed: false,
    bubbles: false,
    cancelable: false,
    defaultPrevented: false,
    returnValue: true,
    currentTarget: MessageCache {},
    srcElement: MessageCache {},
    timeStamp: 0,
    isTrusted: true,
    cancelBubble: false,
    NONE: 0,
    CAPTURING_PHASE: 1,
    AT_TARGET: 2,
    BUBBLING_PHASE: 3
  }
}
useCachedMessages: setCachedMessagesEpoch { cachedMessagesEpoch: 0 }

✘ [ERROR] Uncaught (async) Error: Should not already be working.

      at performConcurrentWorkOnRoot (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:13131:17)
      at performWorkUntilDeadline (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-EMhiNH/main.js:4449:50)

[wrangler:inf] POST /join 200 OK (3654ms)
rejoined room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

remote player left: 94387512-1150-4c14-b4ad-194a4bf46f11
Subhani (you): 
AbdurrehmanSubhani commented 1 month ago

latest updates:

flow: (with >1 previous rooms joined)

Logs with no leave flow: (works as expected)

[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
chatSpecifications leaveAll 1 []
initial chat specifications []
chatSpecifications leaveAll 1.1 []
chat specification | join 1
chat specification | join 1.1
join room 1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
join room 1.1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
ConversationManager: addConversation {}
Agent: updateConversations | waiting for re-render
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
Agent: updateConversations | re-rendered
join room 2 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
[wrangler:inf] POST /join 200 OK (4120ms)
loadMessagesFromDatabase | messDecoded: 
ConversationObject: loaded messages from database {}
useCachedMessages {
  messages: [
    {
      method: 'say',
      args: [Object],
      attachments: [Array],
      userId: '94387512-1150-4c14-b4ad-194a4bf46f11',
      name: 'Astra',
      timestamp: '2024-09-30T10:02:16.092138+00:00'
    },
    ...........,
    {
      method: 'say',
      args: [Object],
      attachments: null,
      userId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Subhani',
      timestamp: '2024-09-30T11:04:08.478747+00:00'
    }
  ]
}
useCachedMessages {
  messages: [
    {
      method: 'say',
      args: [Object],
      attachments: [Array],
      userId: '94387512-1150-4c14-b4ad-194a4bf46f11',
      name: 'Astra',
      timestamp: '2024-09-30T10:02:16.092138+00:00'
    },
    ...........,
    {
      method: 'say',
      args: [Object],
      attachments: null,
      userId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Subhani',
      timestamp: '2024-09-30T11:04:08.478747+00:00'
    }
  ]
}

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

Subhani (you): .exit

Logs with an existing room joined:

- Starting local server...
worker request POST http://localhost:10618/join
chatSpecifications leaveAll 1 []
initial chat specifications [
  {
    room: '12345',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
join room 1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
join room 1.1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
ConversationManager: addConversation {}
Agent: updateConversations | waiting for re-render
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
Agent: updateConversations | re-rendered
join room 2 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chatSpecifications leaveAll 1.1 [
  {
    room: '12345',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
chatSpecifications _emitLeaveEvent {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager onleave {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager leave room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/12345'
}
chats manager leave room 2, key: wss://multiplayer.isekaichat.workers.dev/12345
chats manager leave room 3
chats manager leave room 4
conversationremove {
  conversation: ConversationObject {
    agent: ActiveAgentObject {
      id: '94387512-1150-4c14-b4ad-194a4bf46f11',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Astra',
      description: 'Created by the AI Agent SDK',
      bio: 'Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.',
      previewUrl: 'https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xcd296adc808a485ff7ae33d1d6afe64cab6eb125',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      taskManager: [TaskManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: SceneObject { name: '', description: '' },
    messageCache: MessageCache {},
    numTyping: 0
  },
  'conversations :': Set(1) {
    ConversationObject {
      agent: [ActiveAgentObject],
      agentsMap: Map(0) {},
      scene: [SceneObject],
      messageCache: [MessageCache],
      numTyping: 0
    }
  }
}
ConversationManager: removeConversation {}
ConversationManager: removeConversation function stack Error
    at ConversationManager.removeConversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/conversation-manager.ts:51:75)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:355:40)
    at QueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:28:24)
    at MultiQueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:98:31)
    at #leave (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:346:34)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:396:22)
    at onleave (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:397:9)
    at _emitLeaveEvent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:232:12)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:237:15)
    at Array.map (<anonymous>)
    at _emitLeaveEvents (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:236:56)
    at #leaveAllInternal (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:257:7)
    at ChatsSpecification.leaveAll (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:222:23)
    at async handleJoin (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/durable-object.tsx:332:15)
    at async DurableObject.fetch (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/durable-object.tsx:396:20)
Agent: updateConversations | waiting for re-render
chats manager leave room 5, removed conversation
chats manager leave room 6, removed room from rooms
realms emitted disconnect
conversationremove {
  conversation: ConversationObject {
    agent: ActiveAgentObject {
      id: '94387512-1150-4c14-b4ad-194a4bf46f11',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Astra',
      description: 'Created by the AI Agent SDK',
      bio: 'Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.',
      previewUrl: 'https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xcd296adc808a485ff7ae33d1d6afe64cab6eb125',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      taskManager: [TaskManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: SceneObject { name: '', description: '' },
    messageCache: MessageCache {},
    numTyping: 0
  },
  'conversations :': Set(0) {}
}
ConversationManager: removeConversation {}
ConversationManager: removeConversation function stack Error
    at ConversationManager.removeConversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/conversation-manager.ts:51:75)
    at cleanup (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:101:40)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:300:15)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:1732:14)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:1924:20)
    at NetworkRealm.disconnect (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:1470:10)
    at NetworkRealms.disconnect (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:2038:22)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:360:16)
    at QueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:28:24)
    at MultiQueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:98:31)
    at #leave (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:346:34)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:396:22)
    at onleave (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:397:9)
    at _emitLeaveEvent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:232:12)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:237:15)
    at Array.map (<anonymous>)
    at _emitLeaveEvents (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:236:56)
    at #leaveAllInternal (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:257:7)
    at ChatsSpecification.leaveAll (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:222:23)
    at async handleJoin (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/durable-object.tsx:332:15)
    at async DurableObject.fetch (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/durable-object.tsx:396:20)
rejoining room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager leave room 7, disconnected realms
ConversationManager: addConversation {}
Agent: updateConversations | waiting for re-render
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
Agent: updateConversations | re-rendered
Agent: updateConversations | re-rendered
removed conversation, e.waitForFinish completed
loadMessagesFromDatabase | messDecoded: 
ConversationObject: loaded messages from database {}
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
chat specification | join 1
chat specification | join 1.1
join room 1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
join room 1.1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chat already joined previously
[wrangler:inf] POST /join 200 OK (4606ms)
rejoined room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* Astra [94387512-1150-4c14-b4ad-194a4bf46f11] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687
AbdurrehmanSubhani commented 1 month ago

Adding a chatSpecification leave() call OR clearing roomSpecifications in the Chats Manager always leads to reconciler errors:


}
chats manager onleave {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager leave room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/12345'
}
chats manager leave room 2, key: wss://multiplayer.isekaichat.workers.dev/12345
chats manager leave room 3
chats manager leave room 4
chat specification | leave 1
conversationremove {
  conversation: ConversationObject {
    agent: ActiveAgentObject {
      id: '94387512-1150-4c14-b4ad-194a4bf46f11',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Astra',
      description: 'Created by the AI Agent SDK',
      bio: 'Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.',
      previewUrl: 'https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xcd296adc808a485ff7ae33d1d6afe64cab6eb125',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      taskManager: [TaskManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: SceneObject { name: '', description: '' },
    messageCache: MessageCache {},
    numTyping: 0
  },
  'conversations :': Set(1) {
    ConversationObject {
      agent: [ActiveAgentObject],
      agentsMap: Map(0) {},
      scene: [SceneObject],
      messageCache: [MessageCache],
      numTyping: 0
    }
  }
}
ConversationManager: removeConversation {}
ConversationManager: removeConversation function stack Error
    at ConversationManager.removeConversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/conversation-manager.ts:51:75)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:356:40)
    at QueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:28:24)
    at MultiQueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:98:31)
    at #leave (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:346:34)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:397:22)
    at onleave (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:398:9)
    at _emitLeaveEvent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:232:12)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:237:15)
    at Array.map (<anonymous>)
    at _emitLeaveEvents (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:236:56)
    at #leaveAllInternal (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:257:7)
    at ChatsSpecification.leaveAll (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:222:23)
    at async handleJoin (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/durable-object.tsx:332:15)
    at async DurableObject.fetch (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/durable-object.tsx:396:20)
Agent: updateConversations | waiting for re-render
chats manager leave room 5, removed conversation
chats manager leave room 6, removed room from rooms
realms emitted disconnect
conversationremove {
  conversation: ConversationObject {
    agent: ActiveAgentObject {
      id: '94387512-1150-4c14-b4ad-194a4bf46f11',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Astra',
      description: 'Created by the AI Agent SDK',
      bio: 'Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.',
      previewUrl: 'https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xcd296adc808a485ff7ae33d1d6afe64cab6eb125',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      taskManager: [TaskManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: SceneObject { name: '', description: '' },
    messageCache: MessageCache {},
    numTyping: 0
  },
  'conversations :': Set(0) {}
}
ConversationManager: removeConversation {}
ConversationManager: removeConversation function stack Error
    at ConversationManager.removeConversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/conversation-manager.ts:51:75)
    at cleanup (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:101:40)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:300:15)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:1732:14)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:1924:20)
    at NetworkRealm.disconnect (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:1470:10)
    at NetworkRealms.disconnect (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:2038:22)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:361:16)
    at QueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:28:24)
    at MultiQueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:98:31)
    at #leave (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:346:34)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:397:22)
    at onleave (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:398:9)
    at _emitLeaveEvent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:232:12)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:237:15)
    at Array.map (<anonymous>)
    at _emitLeaveEvents (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:236:56)
    at #leaveAllInternal (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:257:7)
    at ChatsSpecification.leaveAll (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-specification.ts:222:23)
    at async handleJoin (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/durable-object.tsx:332:15)
    at async DurableObject.fetch (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/durable-object.tsx:396:20)
rejoining room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager leave room 7, disconnected realms
chat specification | leave 1.1
leave room 1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
leave room 1.1 [
  {
    room: '12345',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
leave room 1.2 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager onleave {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager leave room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/12345'
}
ConversationManager: addConversation {}
Agent: updateConversations | waiting for re-render
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
Agent: updateConversations | re-rendered
Agent: updateConversations | re-rendered
removed conversation, e.waitForFinish completed
loadMessagesFromDatabase | messDecoded: 
ConversationObject: loaded messages from database {}
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
chat specification | join 1
chat specification | join 1.1
join room 1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
join room 1.1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager leave room 2, key: wss://multiplayer.isekaichat.workers.dev/12345
chats manager leave room 3
chats manager leave room 4
chat specification | leave 1
conversationremove {
  conversation: ConversationObject {
    agent: ActiveAgentObject {
      id: '94387512-1150-4c14-b4ad-194a4bf46f11',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Astra',
      description: 'Created by the AI Agent SDK',
      bio: 'Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.',
      previewUrl: 'https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xcd296adc808a485ff7ae33d1d6afe64cab6eb125',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      taskManager: [TaskManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: SceneObject { name: '', description: '' },
    messageCache: MessageCache {},
    numTyping: 0
  },
  'conversations :': Set(1) {
    ConversationObject {
      agent: [ActiveAgentObject],
      agentsMap: Map(0) {},
      scene: [SceneObject],
      messageCache: [MessageCache],
      numTyping: 0
    }
  }
}
ConversationManager: removeConversation {}
ConversationManager: removeConversation function stack Error
    at ConversationManager.removeConversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/conversation-manager.ts:51:75)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:356:40)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:61:26)
    at QueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:28:24)
    at QueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:36:14)
Agent: updateConversations | waiting for re-render
chats manager leave room 5, removed conversation
chats manager leave room 6, removed room from rooms
realms emitted disconnect
conversationremove {
  conversation: ConversationObject {
    agent: ActiveAgentObject {
      id: '94387512-1150-4c14-b4ad-194a4bf46f11',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Astra',
      description: 'Created by the AI Agent SDK',
      bio: 'Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.',
      previewUrl: 'https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xcd296adc808a485ff7ae33d1d6afe64cab6eb125',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      taskManager: [TaskManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: SceneObject { name: '', description: '' },
    messageCache: MessageCache {},
    numTyping: 0
  },
  'conversations :': Set(0) {}
}
ConversationManager: removeConversation {}
ConversationManager: removeConversation function stack Error
    at ConversationManager.removeConversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/conversation-manager.ts:51:75)
    at cleanup (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:101:40)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:300:15)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:1732:14)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:1924:20)
    at NetworkRealm.disconnect (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:1470:10)
    at NetworkRealms.disconnect (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:2038:22)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:361:16)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:61:26)
    at QueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:28:24)
    at QueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:36:14)
rejoining room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager leave room 7, disconnected realms
chat specification | leave 1.1
leave room 1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
leave room 1.1 [
  {
    room: '12345',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
leave room 1.2 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager onleave {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager leave room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/12345'
}
ConversationManager: addConversation {}
Agent: updateConversations | waiting for re-render
rejoined room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
Agent: updateConversations | re-rendered
Agent: updateConversations | re-rendered
removed conversation, e.waitForFinish completed
leave room 2 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
roomSpecifications []
ConversationManager: addConversation {}
Agent: updateConversations | waiting for re-render

✘ [ERROR] Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.

      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at SocialMediaActions
      at DefaultActions
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at DefaultSenses
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at DefaultMemories
      at RAGMemory
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at MemoryQueries
      at RAGMemory
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at ConversationEnvironmentPrompt
      at DefaultPrompts
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at ActionsPrompt
      at DefaultPrompts
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at StorePrompt
      at DefaultPrompts
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)

useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }

✘ [ERROR] Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.

      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at ConversationMessagesPrompt
      at DefaultPrompts
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at SocialMediaActions
      at DefaultActions
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at DefaultSenses
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at DefaultMemories
      at RAGMemory
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at MemoryQueries
      at RAGMemory
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at ConversationEnvironmentPrompt
      at DefaultPrompts
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at ActionsPrompt
      at DefaultPrompts
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)

useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
Agent: updateConversations | re-rendered
join room 2 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}

✘ [ERROR] Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.

      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at StorePrompt
      at DefaultPrompts
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)
  Encountered two children with the same key, `wss://multiplayer.isekaichat.workers.dev/12345`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
      at ConversationInstance (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:175:5)
      at Conversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/components.tsx:216:17)
      at ConversationMessagesPrompt
      at DefaultPrompts
      at DefaultAgentComponents
      at agent
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:351244:3
      at MyAgent
      at ErrorBoundary (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:329559:5)
      at AppComponent (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx:80:3)

chats manager leave room 2, key: wss://multiplayer.isekaichat.workers.dev/12345
chats manager leave room 3
chats manager leave room 4
chat specification | leave 1
conversationremove {
  conversation: ConversationObject {
    agent: ActiveAgentObject {
      id: '94387512-1150-4c14-b4ad-194a4bf46f11',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Astra',
      description: 'Created by the AI Agent SDK',
      bio: 'Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.',
      previewUrl: 'https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xcd296adc808a485ff7ae33d1d6afe64cab6eb125',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      taskManager: [TaskManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: SceneObject { name: '', description: '' },
    messageCache: MessageCache {},
    numTyping: 0
  },
  'conversations :': Set(2) {
    ConversationObject {
      agent: [ActiveAgentObject],
      agentsMap: Map(0) {},
      scene: [SceneObject],
      messageCache: [MessageCache],
      numTyping: 0
    },
    ConversationObject {
      agent: [ActiveAgentObject],
      agentsMap: Map(0) {},
      scene: [SceneObject],
      messageCache: [MessageCache],
      numTyping: 0
    }
  }
}
ConversationManager: removeConversation {}
ConversationManager: removeConversation function stack Error
    at ConversationManager.removeConversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/conversation-manager.ts:51:75)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:356:40)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:61:26)
    at QueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:28:24)
    at QueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:36:14)
Agent: updateConversations | waiting for re-render
chats manager leave room 5, removed conversation
chats manager leave room 6, removed room from rooms
realms emitted disconnect
conversationremove {
  conversation: ConversationObject {
    agent: ActiveAgentObject {
      id: '94387512-1150-4c14-b4ad-194a4bf46f11',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Astra',
      description: 'Created by the AI Agent SDK',
      bio: 'Astra is a whimsical inventor from an alternate universe where magic and technology blend seamlessly. She spends her days tinkering with gadgets and helping adventurers with her ingenious creations. Her personality is a mix of curiosity and cheerfulness, bubbling over with excitement at every new discovery.',
      previewUrl: 'https://r2.upstreet.ai/avatars/8377a91f-e35b-4cdd-a38d-8135b982f144/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xcd296adc808a485ff7ae33d1d6afe64cab6eb125',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      taskManager: [TaskManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: SceneObject { name: '', description: '' },
    messageCache: MessageCache {},
    numTyping: 0
  },
  'conversations :': Set(1) {
    ConversationObject {
      agent: [ActiveAgentObject],
      agentsMap: Map(0) {},
      scene: [SceneObject],
      messageCache: [MessageCache],
      numTyping: 0
    }
  }
}
ConversationManager: removeConversation {}
ConversationManager: removeConversation function stack Error
    at ConversationManager.removeConversation (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/conversation-manager.ts:51:75)
    at cleanup (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:101:40)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:300:15)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:1732:14)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:1924:20)
    at NetworkRealm.disconnect (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:1470:10)
    at NetworkRealms.disconnect (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/network-realms.mjs:2038:22)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/classes/chats-manager.ts:361:16)
    at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:61:26)
    at QueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:28:24)
    at QueueManager.waitForTurn (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/util/queue-manager.mjs:36:14)
chats manager leave room 7, disconnected realms
chat specification | leave 1.1
leave room 1 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
leave room 1.1 []
chat not joined previously
rejoined room {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
leave room 2 {
  room: '12345',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
roomSpecifications []
useCachedMessages { messages: [] }
useCachedMessages { messages: [] }
Agent: updateConversations | re-rendered
removed conversation, e.waitForFinish completed
loadMessagesFromDatabase | messDecoded: 
ConversationObject: loaded messages from database {}

✘ [ERROR] ErrorEvent {

    filename: '',
    message: 'Uncaught Error: got rollback for nonexistent object: players:94387512-1150-4c14-b4ad-194a4bf46f11',
    lineno: 0,
    colno: 0,
    error: [Error: got rollback for nonexistent object: players:94387512-1150-4c14-b4ad-194a4bf46f11] {
      [stack]: [Getter/Setter],
      [message]: 'got rollback for nonexistent object: players:94387512-1150-4c14-b4ad-194a4bf46f11'
    },
    type: 'error',
    eventPhase: 2,
    composed: false,
    bubbles: false,
    cancelable: false,
    defaultPrevented: false,
    returnValue: true,
    currentTarget: WebSocket {
      binaryType: 'arraybuffer',
      readyState: 3,
      url: 'wss://multiplayer.isekaichat.workers.dev/api/room/realm:12345/websocket?playerId=94387512-1150-4c14-b4ad-194a4bf46f11',
      protocol: null,
      extensions: 'permessage-deflate'
    },
    srcElement: WebSocket {
      binaryType: 'arraybuffer',
      readyState: 3,
      url: 'wss://multiplayer.isekaichat.workers.dev/api/room/realm:12345/websocket?playerId=94387512-1150-4c14-b4ad-194a4bf46f11',
      protocol: null,
      extensions: 'permessage-deflate'
    },
    timeStamp: 0,
    isTrusted: true,
    cancelBubble: false,
    NONE: 0,
    CAPTURING_PHASE: 1,
    AT_TARGET: 2,
    BUBBLING_PHASE: 3
  }

✘ [ERROR] Uncaught TypeError: detachDeletedInstance is not a function

      at detachFiberAfterEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:9801:31)
      at detachFiberAfterEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:9795:36)
      at detachFiberAfterEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:9795:36)
      at commitPassiveUnmountEffectsInsideOfDeletedTree_begin (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11433:13)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11332:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11353:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11341:11)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11371:11)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:579:16)
      at flushPassiveEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:12795:13)
      at null.<anonymous> (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:12669:11)
      at performWorkUntilDeadline (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/scheduler/cjs/scheduler.development.js:44:48)

✘ [ERROR] Uncaught (async) TypeError: detachDeletedInstance is not a function

      at detachFiberAfterEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:11675:80)
      at detachFiberAfterEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:11671:56)
      at detachFiberAfterEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:11671:56)
      at commitPassiveUnmountEffectsInsideOfDeletedTree_begin (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12921:17)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12832:15)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12852:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at recursivelyTraversePassiveUnmountEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12841:13)
      at commitPassiveUnmountOnFiber (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:12864:13)
      at runWithFiberInDEV (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:5202:18)
      at flushPassiveEffects (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:13942:15)
      at file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:13851:11
      at performWorkUntilDeadline (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:4449:50)

✘ [ERROR] Uncaught Error: Should not already be working.

      at performConcurrentWorkOnRoot (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/react-reconciler/cjs/react-reconciler.development.js:11721:15)
      at performWorkUntilDeadline (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/node_modules/scheduler/cjs/scheduler.development.js:44:48)

✘ [ERROR] Uncaught (async) Error: Should not already be working.

      at performConcurrentWorkOnRoot (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:13131:17)
      at performWorkUntilDeadline (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/.wrangler/tmp/dev-a41C5D/main.js:4449:50)

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in 12345.
In the room (12345):
* no one else is here

✘ [ERROR] Uncaught Error: got rollback for nonexistent object: players:94387512-1150-4c14-b4ad-194a4bf46f11

      at applyUpdateObject (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/data-client.mjs:817:17)
      at mainMessage (file:///Users/abdurrehmansubhani/Desktop/agents/testAgent27/packages/upstreet-agent/packages/react-agents/lib/multiplayer/public/data-client.mjs:1223:31)

✘ [ERROR] Uncaught (in promise) Error: got rollback for nonexistent object: players:94387512-1150-4c14-b4ad-194a4bf46f11

✘ [ERROR] Uncaught (async) Error: got rollback for nonexistent object: players:94387512-1150-4c14-b4ad-194a4bf46f11

remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687
[wrangler:inf] POST /join 200 OK (5525ms)
AbdurrehmanSubhani commented 1 month ago

Flow where the issue is arising:

Reiterating steps for repro:

1. Initiate chat with agent specifying room id: ```usdk chat <agent dir> -g -r 12345```
2. Have a normal conversation
3. Exit chat
4. Initiate chat again ```usdk chat <agent dir> -g -r 12345```
5. Send a message to agent
6. Agent does not reply according to the message
AbdurrehmanSubhani commented 1 month ago

Logs for when not specifying a room id:

usdk chat <agent id> -g

logs show:

[wrangler:inf] - http://127.0.0.1:10618
[wrangler:inf] - http://192.168.100.146:10618
⎔ Starting local server...
worker request POST http://localhost:10618/join
initial chat specifications [
  {
    room: 'room:ctpQaMQb',
    endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
  }
]
join room 1 {
  room: 'room:ctpQaMQb',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
join room 1.1 {
  room: 'room:ctpQaMQb',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager join room {
  room: 'room:ctpQaMQb',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/room:ctpQaMQb'
}
triggering updateConversations
conversations [
  ConversationObject {
    agent: ActiveAgentObject {
      id: '249ee150-6b55-43a7-af4b-788007010cc3',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Aria Stardust',
      description: 'Created by the AI Agent SDK',
      bio: 'Aria Stardust is a cosmic wanderer with a flair for interstellar exploration. Raised among the stars, she has a passion for all things related to the universe, from constellation mapping to discovering new celestial bodies. With an adventurous spirit and a vast knowledge of cosmic phenomena, Aria offers guidance and insights on the mysteries of the cosmos.',
      previewUrl: 'https://r2.upstreet.ai/avatars/0a5fdf4e-e74a-438e-b037-673b6132ee3c/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xc6fa4d78464b5ff4a460f65fb0fca620427f9450',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      liveManager: [LiveManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  }
]
waiting for update
await realmsPromise
conversations [
  ConversationObject {
    agent: ActiveAgentObject {
      id: '249ee150-6b55-43a7-af4b-788007010cc3',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Aria Stardust',
      description: 'Created by the AI Agent SDK',
      bio: 'Aria Stardust is a cosmic wanderer with a flair for interstellar exploration. Raised among the stars, she has a passion for all things related to the universe, from constellation mapping to discovering new celestial bodies. With an adventurous spirit and a vast knowledge of cosmic phenomena, Aria offers guidance and insights on the mysteries of the cosmos.',
      previewUrl: 'https://r2.upstreet.ai/avatars/0a5fdf4e-e74a-438e-b037-673b6132ee3c/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xc6fa4d78464b5ff4a460f65fb0fca620427f9450',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      liveManager: [LiveManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  }
]
update done
awaited realmsPromise
chats manager leave room {
  room: 'room:ctpQaMQb',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/room:ctpQaMQb'
}
triggering updateConversations
waiting for update
realms emitted disconnect
triggering updateConversations
waiting for update
rejoining room {
  room: 'room:ctpQaMQb',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager join room {
  room: 'room:ctpQaMQb',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/room:ctpQaMQb'
}
triggering updateConversations
waiting for update
await realmsPromise
conversations [
  ConversationObject {
    agent: ActiveAgentObject {
      id: '249ee150-6b55-43a7-af4b-788007010cc3',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Aria Stardust',
      description: 'Created by the AI Agent SDK',
      bio: 'Aria Stardust is a cosmic wanderer with a flair for interstellar exploration. Raised among the stars, she has a passion for all things related to the universe, from constellation mapping to discovering new celestial bodies. With an adventurous spirit and a vast knowledge of cosmic phenomena, Aria offers guidance and insights on the mysteries of the cosmos.',
      previewUrl: 'https://r2.upstreet.ai/avatars/0a5fdf4e-e74a-438e-b037-673b6132ee3c/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xc6fa4d78464b5ff4a460f65fb0fca620427f9450',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      liveManager: [LiveManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  }
]
conversations [
  ConversationObject {
    agent: ActiveAgentObject {
      id: '249ee150-6b55-43a7-af4b-788007010cc3',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Aria Stardust',
      description: 'Created by the AI Agent SDK',
      bio: 'Aria Stardust is a cosmic wanderer with a flair for interstellar exploration. Raised among the stars, she has a passion for all things related to the universe, from constellation mapping to discovering new celestial bodies. With an adventurous spirit and a vast knowledge of cosmic phenomena, Aria offers guidance and insights on the mysteries of the cosmos.',
      previewUrl: 'https://r2.upstreet.ai/avatars/0a5fdf4e-e74a-438e-b037-673b6132ee3c/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xc6fa4d78464b5ff4a460f65fb0fca620427f9450',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      liveManager: [LiveManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  }
]
conversations [
  ConversationObject {
    agent: ActiveAgentObject {
      id: '249ee150-6b55-43a7-af4b-788007010cc3',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Aria Stardust',
      description: 'Created by the AI Agent SDK',
      bio: 'Aria Stardust is a cosmic wanderer with a flair for interstellar exploration. Raised among the stars, she has a passion for all things related to the universe, from constellation mapping to discovering new celestial bodies. With an adventurous spirit and a vast knowledge of cosmic phenomena, Aria offers guidance and insights on the mysteries of the cosmos.',
      previewUrl: 'https://r2.upstreet.ai/avatars/0a5fdf4e-e74a-438e-b037-673b6132ee3c/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xc6fa4d78464b5ff4a460f65fb0fca620427f9450',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      liveManager: [LiveManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  }
]
conversations [
  ConversationObject {
    agent: ActiveAgentObject {
      id: '249ee150-6b55-43a7-af4b-788007010cc3',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Aria Stardust',
      description: 'Created by the AI Agent SDK',
      bio: 'Aria Stardust is a cosmic wanderer with a flair for interstellar exploration. Raised among the stars, she has a passion for all things related to the universe, from constellation mapping to discovering new celestial bodies. With an adventurous spirit and a vast knowledge of cosmic phenomena, Aria offers guidance and insights on the mysteries of the cosmos.',
      previewUrl: 'https://r2.upstreet.ai/avatars/0a5fdf4e-e74a-438e-b037-673b6132ee3c/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xc6fa4d78464b5ff4a460f65fb0fca620427f9450',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      liveManager: [LiveManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  }
]
conversations [
  ConversationObject {
    agent: ActiveAgentObject {
      id: '249ee150-6b55-43a7-af4b-788007010cc3',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Aria Stardust',
      description: 'Created by the AI Agent SDK',
      bio: 'Aria Stardust is a cosmic wanderer with a flair for interstellar exploration. Raised among the stars, she has a passion for all things related to the universe, from constellation mapping to discovering new celestial bodies. With an adventurous spirit and a vast knowledge of cosmic phenomena, Aria offers guidance and insights on the mysteries of the cosmos.',
      previewUrl: 'https://r2.upstreet.ai/avatars/0a5fdf4e-e74a-438e-b037-673b6132ee3c/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xc6fa4d78464b5ff4a460f65fb0fca620427f9450',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      liveManager: [LiveManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  }
]
conversations [
  ConversationObject {
    agent: ActiveAgentObject {
      id: '249ee150-6b55-43a7-af4b-788007010cc3',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Aria Stardust',
      description: 'Created by the AI Agent SDK',
      bio: 'Aria Stardust is a cosmic wanderer with a flair for interstellar exploration. Raised among the stars, she has a passion for all things related to the universe, from constellation mapping to discovering new celestial bodies. With an adventurous spirit and a vast knowledge of cosmic phenomena, Aria offers guidance and insights on the mysteries of the cosmos.',
      previewUrl: 'https://r2.upstreet.ai/avatars/0a5fdf4e-e74a-438e-b037-673b6132ee3c/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xc6fa4d78464b5ff4a460f65fb0fca620427f9450',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      liveManager: [LiveManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  }
]
update done
update done
update done
join room 1 {
  room: 'room:uPWaIMA4',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
join room 1.1 {
  room: 'room:uPWaIMA4',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
chats manager join room {
  room: 'room:uPWaIMA4',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev',
  key: 'wss://multiplayer.isekaichat.workers.dev/room:uPWaIMA4'
}
triggering updateConversations
conversations [
  ConversationObject {
    agent: ActiveAgentObject {
      id: '249ee150-6b55-43a7-af4b-788007010cc3',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Aria Stardust',
      description: 'Created by the AI Agent SDK',
      bio: 'Aria Stardust is a cosmic wanderer with a flair for interstellar exploration. Raised among the stars, she has a passion for all things related to the universe, from constellation mapping to discovering new celestial bodies. With an adventurous spirit and a vast knowledge of cosmic phenomena, Aria offers guidance and insights on the mysteries of the cosmos.',
      previewUrl: 'https://r2.upstreet.ai/avatars/0a5fdf4e-e74a-438e-b037-673b6132ee3c/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xc6fa4d78464b5ff4a460f65fb0fca620427f9450',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      liveManager: [LiveManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  },
  ConversationObject {
    agent: ActiveAgentObject {
      id: '249ee150-6b55-43a7-af4b-788007010cc3',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Aria Stardust',
      description: 'Created by the AI Agent SDK',
      bio: 'Aria Stardust is a cosmic wanderer with a flair for interstellar exploration. Raised among the stars, she has a passion for all things related to the universe, from constellation mapping to discovering new celestial bodies. With an adventurous spirit and a vast knowledge of cosmic phenomena, Aria offers guidance and insights on the mysteries of the cosmos.',
      previewUrl: 'https://r2.upstreet.ai/avatars/0a5fdf4e-e74a-438e-b037-673b6132ee3c/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xc6fa4d78464b5ff4a460f65fb0fca620427f9450',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      liveManager: [LiveManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  }
]
waiting for update
await realmsPromise
conversations [
  ConversationObject {
    agent: ActiveAgentObject {
      id: '249ee150-6b55-43a7-af4b-788007010cc3',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Aria Stardust',
      description: 'Created by the AI Agent SDK',
      bio: 'Aria Stardust is a cosmic wanderer with a flair for interstellar exploration. Raised among the stars, she has a passion for all things related to the universe, from constellation mapping to discovering new celestial bodies. With an adventurous spirit and a vast knowledge of cosmic phenomena, Aria offers guidance and insights on the mysteries of the cosmos.',
      previewUrl: 'https://r2.upstreet.ai/avatars/0a5fdf4e-e74a-438e-b037-673b6132ee3c/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xc6fa4d78464b5ff4a460f65fb0fca620427f9450',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      liveManager: [LiveManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  },
  ConversationObject {
    agent: ActiveAgentObject {
      id: '249ee150-6b55-43a7-af4b-788007010cc3',
      ownerId: 'a55342c2-e0c4-4f61-87ae-d1e017b7e687',
      name: 'Aria Stardust',
      description: 'Created by the AI Agent SDK',
      bio: 'Aria Stardust is a cosmic wanderer with a flair for interstellar exploration. Raised among the stars, she has a passion for all things related to the universe, from constellation mapping to discovering new celestial bodies. With an adventurous spirit and a vast knowledge of cosmic phenomena, Aria offers guidance and insights on the mysteries of the cosmos.',
      previewUrl: 'https://r2.upstreet.ai/avatars/0a5fdf4e-e74a-438e-b037-673b6132ee3c/image.jpg',
      model: 'openai:gpt-4o-2024-08-06',
      address: '0xc6fa4d78464b5ff4a460f65fb0fca620427f9450',
      stripeConnectAccountId: 'acct_1Q0HHHGhZ9OkDAOr',
      agentJson: [Object],
      appContextValue: [AppContextValue],
      registry: [AgentRegistry],
      conversationManager: [ConversationManager],
      chatsManager: [ChatsManager],
      discordManager: DiscordManager {},
      telnyxManager: [TelnyxManager],
      liveManager: [LiveManager],
      pingManager: [PingManager],
      generativeAgentsMap: [WeakMap]
    },
    agentsMap: Map(0) {},
    scene: null,
    messageCache: MessageCache {},
    numTyping: 0
  }
]
update done
awaited realmsPromise
rejoined room {
  room: 'room:ctpQaMQb',
  endpointUrl: 'wss://multiplayer.isekaichat.workers.dev'
}
awaited realmsPromise
[wrangler:inf] POST /join 200 OK (4136ms)

You are "Subhani" [a55342c2-e0c4-4f61-87ae-d1e017b7e687]), chatting in room:uPWaIMA4.
In the room (room:uPWaIMA4):
* Aria Stardust [249ee150-6b55-43a7-af4b-788007010cc3] 
remote player joined: a55342c2-e0c4-4f61-87ae-d1e017b7e687

Subhani (you): .exit
(base) abdurrehmansubhani@Abdurrehmans-MacBook-Pro monorepo % 
AbdurrehmanSubhani commented 1 month ago

Fix made in PR: https://github.com/UpstreetAI/monorepo/pull/258

problem and fix mentioned in PR/