agent-swarm-kit 1.0.71 → 1.0.72

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/build/index.cjs CHANGED
@@ -7832,7 +7832,7 @@ var listenAgentEvent = function (clientId, fn) {
7832
7832
  * Hook to subscribe to history events for a specific client.
7833
7833
  *
7834
7834
  * @param {string} clientId - The ID of the client to subscribe to.
7835
- * @param {(event: IBaseEvent) => void} fn - The callback function to handle the event.
7835
+ * @param {(event: IBusEvent) => void} fn - The callback function to handle the event.
7836
7836
  * @returns {Function} - The unsubscribe function.
7837
7837
  */
7838
7838
  var listenHistoryEvent = function (clientId, fn) {
@@ -7888,7 +7888,7 @@ var listenStorageEvent = function (clientId, fn) {
7888
7888
  * Hook to subscribe to swarm events for a specific client.
7889
7889
  *
7890
7890
  * @param {string} clientId - The ID of the client to subscribe to events for.
7891
- * @param {(event: IBaseEvent) => void} fn - The callback function to handle the event.
7891
+ * @param {(event: IBusEvent) => void} fn - The callback function to handle the event.
7892
7892
  * @returns {Function} - A function to unsubscribe from the event.
7893
7893
  */
7894
7894
  var listenSwarmEvent = function (clientId, fn) {
package/build/index.mjs CHANGED
@@ -7830,7 +7830,7 @@ var listenAgentEvent = function (clientId, fn) {
7830
7830
  * Hook to subscribe to history events for a specific client.
7831
7831
  *
7832
7832
  * @param {string} clientId - The ID of the client to subscribe to.
7833
- * @param {(event: IBaseEvent) => void} fn - The callback function to handle the event.
7833
+ * @param {(event: IBusEvent) => void} fn - The callback function to handle the event.
7834
7834
  * @returns {Function} - The unsubscribe function.
7835
7835
  */
7836
7836
  var listenHistoryEvent = function (clientId, fn) {
@@ -7886,7 +7886,7 @@ var listenStorageEvent = function (clientId, fn) {
7886
7886
  * Hook to subscribe to swarm events for a specific client.
7887
7887
  *
7888
7888
  * @param {string} clientId - The ID of the client to subscribe to events for.
7889
- * @param {(event: IBaseEvent) => void} fn - The callback function to handle the event.
7889
+ * @param {(event: IBusEvent) => void} fn - The callback function to handle the event.
7890
7890
  * @returns {Function} - A function to unsubscribe from the event.
7891
7891
  */
7892
7892
  var listenSwarmEvent = function (clientId, fn) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-swarm-kit",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
4
4
  "description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",
package/types.d.ts CHANGED
@@ -421,6 +421,24 @@ interface IBaseEvent {
421
421
  */
422
422
  source: EventSource;
423
423
  }
424
+ interface IBusEvent extends IBaseEvent {
425
+ /**
426
+ * The type of the event.
427
+ */
428
+ type: string;
429
+ /**
430
+ * The input data for the event.
431
+ */
432
+ input: Record<string, any>;
433
+ /**
434
+ * The output data for the event.
435
+ */
436
+ output: Record<string, any>;
437
+ /**
438
+ * The context of the event.
439
+ */
440
+ context: Partial<IBaseEventContext>;
441
+ }
424
442
 
425
443
  interface IBus {
426
444
  emit<T extends IBaseEvent>(clientId: string, event: T): Promise<void>;
@@ -3414,16 +3432,16 @@ declare const cancelOutputForce: (clientId: string) => Promise<void>;
3414
3432
  * @param {function} fn - The callback function to handle the event.
3415
3433
  * @returns {function} - A function to unsubscribe from the event.
3416
3434
  */
3417
- declare const listenAgentEvent: (clientId: string, fn: (event: IBaseEvent) => void) => () => void;
3435
+ declare const listenAgentEvent: (clientId: string, fn: (event: IBusEvent) => void) => () => void;
3418
3436
 
3419
3437
  /**
3420
3438
  * Hook to subscribe to history events for a specific client.
3421
3439
  *
3422
3440
  * @param {string} clientId - The ID of the client to subscribe to.
3423
- * @param {(event: IBaseEvent) => void} fn - The callback function to handle the event.
3441
+ * @param {(event: IBusEvent) => void} fn - The callback function to handle the event.
3424
3442
  * @returns {Function} - The unsubscribe function.
3425
3443
  */
3426
- declare const listenHistoryEvent: (clientId: string, fn: (event: IBaseEvent) => void) => () => void;
3444
+ declare const listenHistoryEvent: (clientId: string, fn: (event: IBusEvent) => void) => () => void;
3427
3445
 
3428
3446
  /**
3429
3447
  * Hook to subscribe to session events for a specific client.
@@ -3432,7 +3450,7 @@ declare const listenHistoryEvent: (clientId: string, fn: (event: IBaseEvent) =>
3432
3450
  * @param {function} fn - The callback function to handle the session events.
3433
3451
  * @returns {function} - The unsubscribe function to stop listening to session events.
3434
3452
  */
3435
- declare const listenSessionEvent: (clientId: string, fn: (event: IBaseEvent) => void) => () => void;
3453
+ declare const listenSessionEvent: (clientId: string, fn: (event: IBusEvent) => void) => () => void;
3436
3454
 
3437
3455
  /**
3438
3456
  * Hook to subscribe to state events for a specific client.
@@ -3441,7 +3459,7 @@ declare const listenSessionEvent: (clientId: string, fn: (event: IBaseEvent) =>
3441
3459
  * @param {function} fn - The callback function to handle the event.
3442
3460
  * @returns {function} - The unsubscribe function to stop listening to the events.
3443
3461
  */
3444
- declare const listenStateEvent: (clientId: string, fn: (event: IBaseEvent) => void) => () => void;
3462
+ declare const listenStateEvent: (clientId: string, fn: (event: IBusEvent) => void) => () => void;
3445
3463
 
3446
3464
  /**
3447
3465
  * Hook to subscribe to storage events for a specific client.
@@ -3450,16 +3468,16 @@ declare const listenStateEvent: (clientId: string, fn: (event: IBaseEvent) => vo
3450
3468
  * @param {function} fn - The callback function to handle the storage event.
3451
3469
  * @returns {function} - A function to unsubscribe from the storage events.
3452
3470
  */
3453
- declare const listenStorageEvent: (clientId: string, fn: (event: IBaseEvent) => void) => () => void;
3471
+ declare const listenStorageEvent: (clientId: string, fn: (event: IBusEvent) => void) => () => void;
3454
3472
 
3455
3473
  /**
3456
3474
  * Hook to subscribe to swarm events for a specific client.
3457
3475
  *
3458
3476
  * @param {string} clientId - The ID of the client to subscribe to events for.
3459
- * @param {(event: IBaseEvent) => void} fn - The callback function to handle the event.
3477
+ * @param {(event: IBusEvent) => void} fn - The callback function to handle the event.
3460
3478
  * @returns {Function} - A function to unsubscribe from the event.
3461
3479
  */
3462
- declare const listenSwarmEvent: (clientId: string, fn: (event: IBaseEvent) => void) => () => void;
3480
+ declare const listenSwarmEvent: (clientId: string, fn: (event: IBusEvent) => void) => () => void;
3463
3481
 
3464
3482
  declare const GLOBAL_CONFIG: {
3465
3483
  CC_TOOL_CALL_EXCEPTION_PROMPT: string;