agent-swarm-kit 1.0.75 → 1.0.76
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 +3 -46
- package/build/index.mjs +3 -46
- package/package.json +1 -1
- package/types.d.ts +2 -2
package/build/index.cjs
CHANGED
|
@@ -2990,9 +2990,9 @@ var SessionConnectionService = /** @class */ (function () {
|
|
|
2990
2990
|
* @param {SendMessageFn} connector - The function to send messages.
|
|
2991
2991
|
* @returns {ReceiveMessageFn} The function to receive messages.
|
|
2992
2992
|
*/
|
|
2993
|
-
this.connect = function (connector) {
|
|
2993
|
+
this.connect = function (connector, clientId, swarmName) {
|
|
2994
2994
|
_this.loggerService.log("sessionConnectionService connect");
|
|
2995
|
-
return _this.getSession(
|
|
2995
|
+
return _this.getSession(clientId, swarmName).connect(connector);
|
|
2996
2996
|
};
|
|
2997
2997
|
/**
|
|
2998
2998
|
* Commits tool output to the session.
|
|
@@ -3675,50 +3675,7 @@ var SessionPublicService = /** @class */ (function () {
|
|
|
3675
3675
|
clientId: clientId,
|
|
3676
3676
|
swarmName: swarmName,
|
|
3677
3677
|
});
|
|
3678
|
-
return
|
|
3679
|
-
var receive = _this.sessionConnectionService.connect(function (outgoing) { return __awaiter(_this, void 0, void 0, function () {
|
|
3680
|
-
var _this = this;
|
|
3681
|
-
return __generator(this, function (_a) {
|
|
3682
|
-
switch (_a.label) {
|
|
3683
|
-
case 0: return [4 /*yield*/, ContextService.runInContext(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
3684
|
-
return __generator(this, function (_a) {
|
|
3685
|
-
switch (_a.label) {
|
|
3686
|
-
case 0: return [4 /*yield*/, connector(outgoing)];
|
|
3687
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
3688
|
-
}
|
|
3689
|
-
});
|
|
3690
|
-
}); }, {
|
|
3691
|
-
requestId: requestId,
|
|
3692
|
-
clientId: clientId,
|
|
3693
|
-
swarmName: swarmName,
|
|
3694
|
-
agentName: "",
|
|
3695
|
-
storageName: "",
|
|
3696
|
-
stateName: "",
|
|
3697
|
-
})];
|
|
3698
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
3699
|
-
}
|
|
3700
|
-
});
|
|
3701
|
-
}); });
|
|
3702
|
-
return function (incoming) {
|
|
3703
|
-
return ContextService.runInContext(function () {
|
|
3704
|
-
return receive(incoming);
|
|
3705
|
-
}, {
|
|
3706
|
-
requestId: requestId,
|
|
3707
|
-
clientId: clientId,
|
|
3708
|
-
swarmName: swarmName,
|
|
3709
|
-
agentName: "",
|
|
3710
|
-
storageName: "",
|
|
3711
|
-
stateName: "",
|
|
3712
|
-
});
|
|
3713
|
-
};
|
|
3714
|
-
}, {
|
|
3715
|
-
requestId: requestId,
|
|
3716
|
-
clientId: clientId,
|
|
3717
|
-
swarmName: swarmName,
|
|
3718
|
-
agentName: "",
|
|
3719
|
-
storageName: "",
|
|
3720
|
-
stateName: "",
|
|
3721
|
-
});
|
|
3678
|
+
return _this.sessionConnectionService.connect(connector, clientId, swarmName);
|
|
3722
3679
|
};
|
|
3723
3680
|
/**
|
|
3724
3681
|
* Commits tool output to the session.
|
package/build/index.mjs
CHANGED
|
@@ -2988,9 +2988,9 @@ var SessionConnectionService = /** @class */ (function () {
|
|
|
2988
2988
|
* @param {SendMessageFn} connector - The function to send messages.
|
|
2989
2989
|
* @returns {ReceiveMessageFn} The function to receive messages.
|
|
2990
2990
|
*/
|
|
2991
|
-
this.connect = function (connector) {
|
|
2991
|
+
this.connect = function (connector, clientId, swarmName) {
|
|
2992
2992
|
_this.loggerService.log("sessionConnectionService connect");
|
|
2993
|
-
return _this.getSession(
|
|
2993
|
+
return _this.getSession(clientId, swarmName).connect(connector);
|
|
2994
2994
|
};
|
|
2995
2995
|
/**
|
|
2996
2996
|
* Commits tool output to the session.
|
|
@@ -3673,50 +3673,7 @@ var SessionPublicService = /** @class */ (function () {
|
|
|
3673
3673
|
clientId: clientId,
|
|
3674
3674
|
swarmName: swarmName,
|
|
3675
3675
|
});
|
|
3676
|
-
return
|
|
3677
|
-
var receive = _this.sessionConnectionService.connect(function (outgoing) { return __awaiter(_this, void 0, void 0, function () {
|
|
3678
|
-
var _this = this;
|
|
3679
|
-
return __generator(this, function (_a) {
|
|
3680
|
-
switch (_a.label) {
|
|
3681
|
-
case 0: return [4 /*yield*/, ContextService.runInContext(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
3682
|
-
return __generator(this, function (_a) {
|
|
3683
|
-
switch (_a.label) {
|
|
3684
|
-
case 0: return [4 /*yield*/, connector(outgoing)];
|
|
3685
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
3686
|
-
}
|
|
3687
|
-
});
|
|
3688
|
-
}); }, {
|
|
3689
|
-
requestId: requestId,
|
|
3690
|
-
clientId: clientId,
|
|
3691
|
-
swarmName: swarmName,
|
|
3692
|
-
agentName: "",
|
|
3693
|
-
storageName: "",
|
|
3694
|
-
stateName: "",
|
|
3695
|
-
})];
|
|
3696
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
3697
|
-
}
|
|
3698
|
-
});
|
|
3699
|
-
}); });
|
|
3700
|
-
return function (incoming) {
|
|
3701
|
-
return ContextService.runInContext(function () {
|
|
3702
|
-
return receive(incoming);
|
|
3703
|
-
}, {
|
|
3704
|
-
requestId: requestId,
|
|
3705
|
-
clientId: clientId,
|
|
3706
|
-
swarmName: swarmName,
|
|
3707
|
-
agentName: "",
|
|
3708
|
-
storageName: "",
|
|
3709
|
-
stateName: "",
|
|
3710
|
-
});
|
|
3711
|
-
};
|
|
3712
|
-
}, {
|
|
3713
|
-
requestId: requestId,
|
|
3714
|
-
clientId: clientId,
|
|
3715
|
-
swarmName: swarmName,
|
|
3716
|
-
agentName: "",
|
|
3717
|
-
storageName: "",
|
|
3718
|
-
stateName: "",
|
|
3719
|
-
});
|
|
3676
|
+
return _this.sessionConnectionService.connect(connector, clientId, swarmName);
|
|
3720
3677
|
};
|
|
3721
3678
|
/**
|
|
3722
3679
|
* Commits tool output to the session.
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -645,7 +645,7 @@ interface ISession {
|
|
|
645
645
|
* @param {SendMessageFn} connector - The function to send messages.
|
|
646
646
|
* @returns {ReceiveMessageFn}
|
|
647
647
|
*/
|
|
648
|
-
connect(connector: SendMessageFn$1): ReceiveMessageFn;
|
|
648
|
+
connect(connector: SendMessageFn$1, ...args: unknown[]): ReceiveMessageFn;
|
|
649
649
|
/**
|
|
650
650
|
* Commit tool output.
|
|
651
651
|
* @param {string} toolId - The `tool_call_id` for openai history
|
|
@@ -1973,7 +1973,7 @@ declare class SessionConnectionService implements ISession {
|
|
|
1973
1973
|
* @param {SendMessageFn} connector - The function to send messages.
|
|
1974
1974
|
* @returns {ReceiveMessageFn} The function to receive messages.
|
|
1975
1975
|
*/
|
|
1976
|
-
connect: (connector: SendMessageFn$1) => ReceiveMessageFn;
|
|
1976
|
+
connect: (connector: SendMessageFn$1, clientId: string, swarmName: SwarmName) => ReceiveMessageFn;
|
|
1977
1977
|
/**
|
|
1978
1978
|
* Commits tool output to the session.
|
|
1979
1979
|
* @param {string} toolId - The `tool_call_id` for openai history
|