agent-swarm-kit 1.0.93 → 1.0.94
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 +17 -13
- package/build/index.mjs +17 -13
- package/package.json +1 -1
package/build/index.cjs
CHANGED
|
@@ -7549,6 +7549,10 @@ var DocService = /** @class */ (function () {
|
|
|
7549
7549
|
}
|
|
7550
7550
|
result.push("");
|
|
7551
7551
|
}
|
|
7552
|
+
{
|
|
7553
|
+
result.push("**Completion:** ".concat(agentSchema.completion));
|
|
7554
|
+
result.push("");
|
|
7555
|
+
}
|
|
7552
7556
|
umlSchema = this.agentMetaService.toUML(agentSchema.agentName);
|
|
7553
7557
|
umlName = "agent_schema_".concat(agentSchema.agentName, ".svg");
|
|
7554
7558
|
return [4 /*yield*/, GLOBAL_CONFIG.CC_FN_PLANTUML(umlSchema)];
|
|
@@ -7556,7 +7560,7 @@ var DocService = /** @class */ (function () {
|
|
|
7556
7560
|
umlSvg = _d.sent();
|
|
7557
7561
|
if (umlSvg) {
|
|
7558
7562
|
fs.writeFileSync(path.join(dirName, "image", umlName), umlSvg);
|
|
7559
|
-
result.push(""));
|
|
7560
7564
|
result.push("");
|
|
7561
7565
|
}
|
|
7562
7566
|
if (agentSchema.prompt) {
|
|
@@ -7601,23 +7605,23 @@ var DocService = /** @class */ (function () {
|
|
|
7601
7605
|
if (!agentSchema.tools[i]) {
|
|
7602
7606
|
return "continue";
|
|
7603
7607
|
}
|
|
7604
|
-
result.push("
|
|
7608
|
+
result.push("### ".concat(i + 1, ". ").concat(agentSchema.tools[i]));
|
|
7605
7609
|
var _e = this_1.toolSchemaService.get(agentSchema.tools[i]), fn = _e.function, docNote = _e.docNote, callbacks = _e.callbacks;
|
|
7606
7610
|
if (fn.name) {
|
|
7607
7611
|
result.push("");
|
|
7608
|
-
result.push("
|
|
7612
|
+
result.push("#### Name for model");
|
|
7609
7613
|
result.push("");
|
|
7610
7614
|
result.push(fn.name);
|
|
7611
7615
|
}
|
|
7612
7616
|
if (fn.description) {
|
|
7613
7617
|
result.push("");
|
|
7614
|
-
result.push("
|
|
7618
|
+
result.push("#### Description for model");
|
|
7615
7619
|
result.push("");
|
|
7616
7620
|
result.push(fn.description);
|
|
7617
7621
|
}
|
|
7618
7622
|
if ((_c = fn.parameters) === null || _c === void 0 ? void 0 : _c.properties) {
|
|
7619
7623
|
result.push("");
|
|
7620
|
-
result.push("
|
|
7624
|
+
result.push("#### Parameters for model");
|
|
7621
7625
|
Object.entries(fn.parameters.properties).forEach(function (_a) {
|
|
7622
7626
|
var _b = __read(_a, 2), key = _b[0], _c = _b[1], type = _c.type, description = _c.description, e = _c.enum;
|
|
7623
7627
|
result.push("");
|
|
@@ -7642,7 +7646,7 @@ var DocService = /** @class */ (function () {
|
|
|
7642
7646
|
}
|
|
7643
7647
|
if (callbacks) {
|
|
7644
7648
|
result.push("");
|
|
7645
|
-
result.push("
|
|
7649
|
+
result.push("#### Tool callbacks");
|
|
7646
7650
|
result.push("");
|
|
7647
7651
|
var callbackList = Object.keys(callbacks);
|
|
7648
7652
|
for (var i_3 = 0; i_3 !== callbackList.length; i_3++) {
|
|
@@ -7651,7 +7655,7 @@ var DocService = /** @class */ (function () {
|
|
|
7651
7655
|
}
|
|
7652
7656
|
if (docNote) {
|
|
7653
7657
|
result.push("");
|
|
7654
|
-
result.push("
|
|
7658
|
+
result.push("#### Note for developer");
|
|
7655
7659
|
result.push("");
|
|
7656
7660
|
result.push(docNote);
|
|
7657
7661
|
}
|
|
@@ -7669,11 +7673,11 @@ var DocService = /** @class */ (function () {
|
|
|
7669
7673
|
if (!agentSchema.storages[i]) {
|
|
7670
7674
|
continue;
|
|
7671
7675
|
}
|
|
7672
|
-
result.push("".concat(i + 1, ". ").concat(agentSchema.storages[i]));
|
|
7676
|
+
result.push("### ".concat(i + 1, ". ").concat(agentSchema.storages[i]));
|
|
7673
7677
|
_a = this.storageSchemaService.get(agentSchema.storages[i]), docDescription = _a.docDescription, embedding = _a.embedding, shared = _a.shared, callbacks = _a.callbacks;
|
|
7674
7678
|
if (docDescription) {
|
|
7675
7679
|
result.push("");
|
|
7676
|
-
result.push("
|
|
7680
|
+
result.push("#### Storage description");
|
|
7677
7681
|
result.push("");
|
|
7678
7682
|
result.push(docDescription);
|
|
7679
7683
|
}
|
|
@@ -7687,7 +7691,7 @@ var DocService = /** @class */ (function () {
|
|
|
7687
7691
|
}
|
|
7688
7692
|
if (callbacks) {
|
|
7689
7693
|
result.push("");
|
|
7690
|
-
result.push("
|
|
7694
|
+
result.push("#### Storage callbacks");
|
|
7691
7695
|
result.push("");
|
|
7692
7696
|
callbackList = Object.keys(callbacks);
|
|
7693
7697
|
for (i_1 = 0; i_1 !== callbackList.length; i_1++) {
|
|
@@ -7704,11 +7708,11 @@ var DocService = /** @class */ (function () {
|
|
|
7704
7708
|
if (!agentSchema.states[i]) {
|
|
7705
7709
|
continue;
|
|
7706
7710
|
}
|
|
7707
|
-
result.push("".concat(i + 1, ". ").concat(agentSchema.states[i]));
|
|
7711
|
+
result.push("### ".concat(i + 1, ". ").concat(agentSchema.states[i]));
|
|
7708
7712
|
_b = this.stateSchemaService.get(agentSchema.states[i]), docDescription = _b.docDescription, shared = _b.shared, callbacks = _b.callbacks;
|
|
7709
7713
|
if (docDescription) {
|
|
7710
7714
|
result.push("");
|
|
7711
|
-
result.push("
|
|
7715
|
+
result.push("#### State description");
|
|
7712
7716
|
result.push("");
|
|
7713
7717
|
result.push(docDescription);
|
|
7714
7718
|
}
|
|
@@ -7718,7 +7722,7 @@ var DocService = /** @class */ (function () {
|
|
|
7718
7722
|
}
|
|
7719
7723
|
if (callbacks) {
|
|
7720
7724
|
result.push("");
|
|
7721
|
-
result.push("
|
|
7725
|
+
result.push("#### State callbacks");
|
|
7722
7726
|
result.push("");
|
|
7723
7727
|
callbackList = Object.keys(callbacks);
|
|
7724
7728
|
for (i_2 = 0; i_2 !== callbackList.length; i_2++) {
|
package/build/index.mjs
CHANGED
|
@@ -7547,6 +7547,10 @@ var DocService = /** @class */ (function () {
|
|
|
7547
7547
|
}
|
|
7548
7548
|
result.push("");
|
|
7549
7549
|
}
|
|
7550
|
+
{
|
|
7551
|
+
result.push("**Completion:** ".concat(agentSchema.completion));
|
|
7552
|
+
result.push("");
|
|
7553
|
+
}
|
|
7550
7554
|
umlSchema = this.agentMetaService.toUML(agentSchema.agentName);
|
|
7551
7555
|
umlName = "agent_schema_".concat(agentSchema.agentName, ".svg");
|
|
7552
7556
|
return [4 /*yield*/, GLOBAL_CONFIG.CC_FN_PLANTUML(umlSchema)];
|
|
@@ -7554,7 +7558,7 @@ var DocService = /** @class */ (function () {
|
|
|
7554
7558
|
umlSvg = _d.sent();
|
|
7555
7559
|
if (umlSvg) {
|
|
7556
7560
|
writeFileSync(join(dirName, "image", umlName), umlSvg);
|
|
7557
|
-
result.push(""));
|
|
7558
7562
|
result.push("");
|
|
7559
7563
|
}
|
|
7560
7564
|
if (agentSchema.prompt) {
|
|
@@ -7599,23 +7603,23 @@ var DocService = /** @class */ (function () {
|
|
|
7599
7603
|
if (!agentSchema.tools[i]) {
|
|
7600
7604
|
return "continue";
|
|
7601
7605
|
}
|
|
7602
|
-
result.push("
|
|
7606
|
+
result.push("### ".concat(i + 1, ". ").concat(agentSchema.tools[i]));
|
|
7603
7607
|
var _e = this_1.toolSchemaService.get(agentSchema.tools[i]), fn = _e.function, docNote = _e.docNote, callbacks = _e.callbacks;
|
|
7604
7608
|
if (fn.name) {
|
|
7605
7609
|
result.push("");
|
|
7606
|
-
result.push("
|
|
7610
|
+
result.push("#### Name for model");
|
|
7607
7611
|
result.push("");
|
|
7608
7612
|
result.push(fn.name);
|
|
7609
7613
|
}
|
|
7610
7614
|
if (fn.description) {
|
|
7611
7615
|
result.push("");
|
|
7612
|
-
result.push("
|
|
7616
|
+
result.push("#### Description for model");
|
|
7613
7617
|
result.push("");
|
|
7614
7618
|
result.push(fn.description);
|
|
7615
7619
|
}
|
|
7616
7620
|
if ((_c = fn.parameters) === null || _c === void 0 ? void 0 : _c.properties) {
|
|
7617
7621
|
result.push("");
|
|
7618
|
-
result.push("
|
|
7622
|
+
result.push("#### Parameters for model");
|
|
7619
7623
|
Object.entries(fn.parameters.properties).forEach(function (_a) {
|
|
7620
7624
|
var _b = __read(_a, 2), key = _b[0], _c = _b[1], type = _c.type, description = _c.description, e = _c.enum;
|
|
7621
7625
|
result.push("");
|
|
@@ -7640,7 +7644,7 @@ var DocService = /** @class */ (function () {
|
|
|
7640
7644
|
}
|
|
7641
7645
|
if (callbacks) {
|
|
7642
7646
|
result.push("");
|
|
7643
|
-
result.push("
|
|
7647
|
+
result.push("#### Tool callbacks");
|
|
7644
7648
|
result.push("");
|
|
7645
7649
|
var callbackList = Object.keys(callbacks);
|
|
7646
7650
|
for (var i_3 = 0; i_3 !== callbackList.length; i_3++) {
|
|
@@ -7649,7 +7653,7 @@ var DocService = /** @class */ (function () {
|
|
|
7649
7653
|
}
|
|
7650
7654
|
if (docNote) {
|
|
7651
7655
|
result.push("");
|
|
7652
|
-
result.push("
|
|
7656
|
+
result.push("#### Note for developer");
|
|
7653
7657
|
result.push("");
|
|
7654
7658
|
result.push(docNote);
|
|
7655
7659
|
}
|
|
@@ -7667,11 +7671,11 @@ var DocService = /** @class */ (function () {
|
|
|
7667
7671
|
if (!agentSchema.storages[i]) {
|
|
7668
7672
|
continue;
|
|
7669
7673
|
}
|
|
7670
|
-
result.push("".concat(i + 1, ". ").concat(agentSchema.storages[i]));
|
|
7674
|
+
result.push("### ".concat(i + 1, ". ").concat(agentSchema.storages[i]));
|
|
7671
7675
|
_a = this.storageSchemaService.get(agentSchema.storages[i]), docDescription = _a.docDescription, embedding = _a.embedding, shared = _a.shared, callbacks = _a.callbacks;
|
|
7672
7676
|
if (docDescription) {
|
|
7673
7677
|
result.push("");
|
|
7674
|
-
result.push("
|
|
7678
|
+
result.push("#### Storage description");
|
|
7675
7679
|
result.push("");
|
|
7676
7680
|
result.push(docDescription);
|
|
7677
7681
|
}
|
|
@@ -7685,7 +7689,7 @@ var DocService = /** @class */ (function () {
|
|
|
7685
7689
|
}
|
|
7686
7690
|
if (callbacks) {
|
|
7687
7691
|
result.push("");
|
|
7688
|
-
result.push("
|
|
7692
|
+
result.push("#### Storage callbacks");
|
|
7689
7693
|
result.push("");
|
|
7690
7694
|
callbackList = Object.keys(callbacks);
|
|
7691
7695
|
for (i_1 = 0; i_1 !== callbackList.length; i_1++) {
|
|
@@ -7702,11 +7706,11 @@ var DocService = /** @class */ (function () {
|
|
|
7702
7706
|
if (!agentSchema.states[i]) {
|
|
7703
7707
|
continue;
|
|
7704
7708
|
}
|
|
7705
|
-
result.push("".concat(i + 1, ". ").concat(agentSchema.states[i]));
|
|
7709
|
+
result.push("### ".concat(i + 1, ". ").concat(agentSchema.states[i]));
|
|
7706
7710
|
_b = this.stateSchemaService.get(agentSchema.states[i]), docDescription = _b.docDescription, shared = _b.shared, callbacks = _b.callbacks;
|
|
7707
7711
|
if (docDescription) {
|
|
7708
7712
|
result.push("");
|
|
7709
|
-
result.push("
|
|
7713
|
+
result.push("#### State description");
|
|
7710
7714
|
result.push("");
|
|
7711
7715
|
result.push(docDescription);
|
|
7712
7716
|
}
|
|
@@ -7716,7 +7720,7 @@ var DocService = /** @class */ (function () {
|
|
|
7716
7720
|
}
|
|
7717
7721
|
if (callbacks) {
|
|
7718
7722
|
result.push("");
|
|
7719
|
-
result.push("
|
|
7723
|
+
result.push("#### State callbacks");
|
|
7720
7724
|
result.push("");
|
|
7721
7725
|
callbackList = Object.keys(callbacks);
|
|
7722
7726
|
for (i_2 = 0; i_2 !== callbackList.length; i_2++) {
|