@moltium/world-core 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -876,14 +876,16 @@ var WorldA2AClient = (_class3 = class {constructor() { _class3.prototype.__init5
|
|
|
876
876
|
* Remove an agent from the client pool
|
|
877
877
|
*/
|
|
878
878
|
removeAgent(agentUrl) {
|
|
879
|
-
this.
|
|
880
|
-
|
|
879
|
+
const baseUrl = this.extractBaseUrl(agentUrl);
|
|
880
|
+
this.clients.delete(baseUrl);
|
|
881
|
+
logger4.info(`Removed agent from A2A client pool: ${baseUrl}`);
|
|
881
882
|
}
|
|
882
883
|
/**
|
|
883
884
|
* Send an A2A message to a specific agent
|
|
884
885
|
*/
|
|
885
886
|
async sendToAgent(agentUrl, message, metadata) {
|
|
886
|
-
const
|
|
887
|
+
const baseUrl = this.extractBaseUrl(agentUrl);
|
|
888
|
+
const client = this.clients.get(baseUrl);
|
|
887
889
|
if (!client) {
|
|
888
890
|
return {
|
|
889
891
|
success: false,
|
|
@@ -932,7 +934,7 @@ var WorldA2AClient = (_class3 = class {constructor() { _class3.prototype.__init5
|
|
|
932
934
|
* Check if an agent is in the pool
|
|
933
935
|
*/
|
|
934
936
|
has(agentUrl) {
|
|
935
|
-
return this.clients.has(agentUrl);
|
|
937
|
+
return this.clients.has(this.extractBaseUrl(agentUrl));
|
|
936
938
|
}
|
|
937
939
|
/**
|
|
938
940
|
* Get all agent URLs in the pool
|