symposium 0.10.10 → 0.11.0

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/Agent.js CHANGED
@@ -148,13 +148,15 @@ export default class Agent {
148
148
  }
149
149
 
150
150
  async error(thread, error) {
151
- for (let i of this.options.interfaces)
152
- await i.error(thread, error);
151
+ const i = this.options.interfaces.find(i => i.name === thread.interface);
152
+ if (i)
153
+ return i.error(thread, error);
153
154
  }
154
155
 
155
156
  async output(thread, msg) {
156
- for (let i of this.options.interfaces)
157
- await i.output(thread, msg);
157
+ const i = this.options.interfaces.find(i => i.name === thread.interface);
158
+ if (i)
159
+ return i.output(thread, msg);
158
160
  }
159
161
 
160
162
  parseFunctions(message) {
package/Interface.js CHANGED
@@ -1,4 +1,6 @@
1
1
  export default class Interface {
2
+ static name;
3
+
2
4
  static async init(agent) {
3
5
  }
4
6
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "0.10.10",
4
+ "version": "0.11.0",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",