agent-swarm-kit 1.0.89 → 1.0.91
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 -9
- package/build/index.mjs +17 -9
- package/package.json +1 -1
- package/types.d.ts +8 -2
package/build/index.cjs
CHANGED
|
@@ -7216,8 +7216,8 @@ var BusService = /** @class */ (function () {
|
|
|
7216
7216
|
|
|
7217
7217
|
var MAX_NESTING = 10;
|
|
7218
7218
|
var UML_STEP = "\t";
|
|
7219
|
-
var UML_BULLET = "
|
|
7220
|
-
var UML_TRIANGLE = "
|
|
7219
|
+
var UML_BULLET = "[*]";
|
|
7220
|
+
var UML_TRIANGLE = "[>]";
|
|
7221
7221
|
/**
|
|
7222
7222
|
* Creates a function to serialize meta nodes to UML format.
|
|
7223
7223
|
* @returns {Function} A function that takes an array of IMetaNode and returns a string in UML format.
|
|
@@ -7341,7 +7341,9 @@ var AgentMetaService = /** @class */ (function () {
|
|
|
7341
7341
|
var childSeen_2 = new Set(seen).add(agentName);
|
|
7342
7342
|
return {
|
|
7343
7343
|
name: agentName,
|
|
7344
|
-
child: dependsOn.map(function (name) {
|
|
7344
|
+
child: dependsOn.map(function (name) {
|
|
7345
|
+
return _this.makeAgentNodeCommon(name, childSeen_2);
|
|
7346
|
+
}),
|
|
7345
7347
|
};
|
|
7346
7348
|
}
|
|
7347
7349
|
else {
|
|
@@ -7355,12 +7357,17 @@ var AgentMetaService = /** @class */ (function () {
|
|
|
7355
7357
|
* @param {AgentName} agentName - The name of the agent.
|
|
7356
7358
|
* @returns {string} The UML representation of the agent's meta nodes.
|
|
7357
7359
|
*/
|
|
7358
|
-
this.toUML = function (agentName) {
|
|
7360
|
+
this.toUML = function (agentName, withSubtree) {
|
|
7361
|
+
if (withSubtree === void 0) { withSubtree = false; }
|
|
7359
7362
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO &&
|
|
7360
7363
|
_this.loggerService.info("agentMetaService toUML", {
|
|
7361
7364
|
agentName: agentName,
|
|
7362
7365
|
});
|
|
7363
|
-
var
|
|
7366
|
+
var subtree = new Set();
|
|
7367
|
+
if (!withSubtree) {
|
|
7368
|
+
subtree.add(agentName);
|
|
7369
|
+
}
|
|
7370
|
+
var rootNode = _this.makeAgentNode(agentName, subtree);
|
|
7364
7371
|
return _this.serialize([rootNode]);
|
|
7365
7372
|
};
|
|
7366
7373
|
}
|
|
@@ -7387,10 +7394,10 @@ var SwarmMetaService = /** @class */ (function () {
|
|
|
7387
7394
|
_this.loggerService.info("swarmMetaService makeSwarmNode", {
|
|
7388
7395
|
swarmName: swarmName,
|
|
7389
7396
|
});
|
|
7390
|
-
var
|
|
7397
|
+
var defaultAgent = _this.swarmSchemaService.get(swarmName).defaultAgent;
|
|
7391
7398
|
return {
|
|
7392
7399
|
name: swarmName,
|
|
7393
|
-
child:
|
|
7400
|
+
child: [_this.agentMetaService.makeAgentNodeCommon(defaultAgent)],
|
|
7394
7401
|
};
|
|
7395
7402
|
};
|
|
7396
7403
|
/**
|
|
@@ -7520,13 +7527,14 @@ var METHOD_NAME$E = "function.dumpAgent";
|
|
|
7520
7527
|
* @param {SwarmName} swarmName - The name of the swarm to be dumped.
|
|
7521
7528
|
* @returns {string} The UML representation of the swarm.
|
|
7522
7529
|
*/
|
|
7523
|
-
var dumpAgent = function (agentName) {
|
|
7530
|
+
var dumpAgent = function (agentName, _a) {
|
|
7531
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.withSubtree, withSubtree = _c === void 0 ? false : _c;
|
|
7524
7532
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
7525
7533
|
swarm$1.loggerService.log(METHOD_NAME$E, {
|
|
7526
7534
|
agentName: agentName,
|
|
7527
7535
|
});
|
|
7528
7536
|
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$E);
|
|
7529
|
-
return swarm$1.agentMetaService.toUML(agentName);
|
|
7537
|
+
return swarm$1.agentMetaService.toUML(agentName, withSubtree);
|
|
7530
7538
|
};
|
|
7531
7539
|
|
|
7532
7540
|
var METHOD_NAME$D = "function.dumpSwarm";
|
package/build/index.mjs
CHANGED
|
@@ -7214,8 +7214,8 @@ var BusService = /** @class */ (function () {
|
|
|
7214
7214
|
|
|
7215
7215
|
var MAX_NESTING = 10;
|
|
7216
7216
|
var UML_STEP = "\t";
|
|
7217
|
-
var UML_BULLET = "
|
|
7218
|
-
var UML_TRIANGLE = "
|
|
7217
|
+
var UML_BULLET = "[*]";
|
|
7218
|
+
var UML_TRIANGLE = "[>]";
|
|
7219
7219
|
/**
|
|
7220
7220
|
* Creates a function to serialize meta nodes to UML format.
|
|
7221
7221
|
* @returns {Function} A function that takes an array of IMetaNode and returns a string in UML format.
|
|
@@ -7339,7 +7339,9 @@ var AgentMetaService = /** @class */ (function () {
|
|
|
7339
7339
|
var childSeen_2 = new Set(seen).add(agentName);
|
|
7340
7340
|
return {
|
|
7341
7341
|
name: agentName,
|
|
7342
|
-
child: dependsOn.map(function (name) {
|
|
7342
|
+
child: dependsOn.map(function (name) {
|
|
7343
|
+
return _this.makeAgentNodeCommon(name, childSeen_2);
|
|
7344
|
+
}),
|
|
7343
7345
|
};
|
|
7344
7346
|
}
|
|
7345
7347
|
else {
|
|
@@ -7353,12 +7355,17 @@ var AgentMetaService = /** @class */ (function () {
|
|
|
7353
7355
|
* @param {AgentName} agentName - The name of the agent.
|
|
7354
7356
|
* @returns {string} The UML representation of the agent's meta nodes.
|
|
7355
7357
|
*/
|
|
7356
|
-
this.toUML = function (agentName) {
|
|
7358
|
+
this.toUML = function (agentName, withSubtree) {
|
|
7359
|
+
if (withSubtree === void 0) { withSubtree = false; }
|
|
7357
7360
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO &&
|
|
7358
7361
|
_this.loggerService.info("agentMetaService toUML", {
|
|
7359
7362
|
agentName: agentName,
|
|
7360
7363
|
});
|
|
7361
|
-
var
|
|
7364
|
+
var subtree = new Set();
|
|
7365
|
+
if (!withSubtree) {
|
|
7366
|
+
subtree.add(agentName);
|
|
7367
|
+
}
|
|
7368
|
+
var rootNode = _this.makeAgentNode(agentName, subtree);
|
|
7362
7369
|
return _this.serialize([rootNode]);
|
|
7363
7370
|
};
|
|
7364
7371
|
}
|
|
@@ -7385,10 +7392,10 @@ var SwarmMetaService = /** @class */ (function () {
|
|
|
7385
7392
|
_this.loggerService.info("swarmMetaService makeSwarmNode", {
|
|
7386
7393
|
swarmName: swarmName,
|
|
7387
7394
|
});
|
|
7388
|
-
var
|
|
7395
|
+
var defaultAgent = _this.swarmSchemaService.get(swarmName).defaultAgent;
|
|
7389
7396
|
return {
|
|
7390
7397
|
name: swarmName,
|
|
7391
|
-
child:
|
|
7398
|
+
child: [_this.agentMetaService.makeAgentNodeCommon(defaultAgent)],
|
|
7392
7399
|
};
|
|
7393
7400
|
};
|
|
7394
7401
|
/**
|
|
@@ -7518,13 +7525,14 @@ var METHOD_NAME$E = "function.dumpAgent";
|
|
|
7518
7525
|
* @param {SwarmName} swarmName - The name of the swarm to be dumped.
|
|
7519
7526
|
* @returns {string} The UML representation of the swarm.
|
|
7520
7527
|
*/
|
|
7521
|
-
var dumpAgent = function (agentName) {
|
|
7528
|
+
var dumpAgent = function (agentName, _a) {
|
|
7529
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.withSubtree, withSubtree = _c === void 0 ? false : _c;
|
|
7522
7530
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
7523
7531
|
swarm$1.loggerService.log(METHOD_NAME$E, {
|
|
7524
7532
|
agentName: agentName,
|
|
7525
7533
|
});
|
|
7526
7534
|
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$E);
|
|
7527
|
-
return swarm$1.agentMetaService.toUML(agentName);
|
|
7535
|
+
return swarm$1.agentMetaService.toUML(agentName, withSubtree);
|
|
7528
7536
|
};
|
|
7529
7537
|
|
|
7530
7538
|
var METHOD_NAME$D = "function.dumpSwarm";
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -3066,7 +3066,7 @@ declare class AgentMetaService {
|
|
|
3066
3066
|
* @param {AgentName} agentName - The name of the agent.
|
|
3067
3067
|
* @returns {string} The UML representation of the agent's meta nodes.
|
|
3068
3068
|
*/
|
|
3069
|
-
toUML: (agentName: AgentName) => string;
|
|
3069
|
+
toUML: (agentName: AgentName, withSubtree?: boolean) => string;
|
|
3070
3070
|
}
|
|
3071
3071
|
|
|
3072
3072
|
/**
|
|
@@ -3130,13 +3130,19 @@ declare const swarm: {
|
|
|
3130
3130
|
loggerService: LoggerService;
|
|
3131
3131
|
};
|
|
3132
3132
|
|
|
3133
|
+
/**
|
|
3134
|
+
* The config for UML generation
|
|
3135
|
+
*/
|
|
3136
|
+
interface IConfig {
|
|
3137
|
+
withSubtree: boolean;
|
|
3138
|
+
}
|
|
3133
3139
|
/**
|
|
3134
3140
|
* Dumps the agent information into PlantUML format.
|
|
3135
3141
|
*
|
|
3136
3142
|
* @param {SwarmName} swarmName - The name of the swarm to be dumped.
|
|
3137
3143
|
* @returns {string} The UML representation of the swarm.
|
|
3138
3144
|
*/
|
|
3139
|
-
declare const dumpAgent: (agentName: AgentName) => string;
|
|
3145
|
+
declare const dumpAgent: (agentName: AgentName, { withSubtree }?: Partial<IConfig>) => string;
|
|
3140
3146
|
|
|
3141
3147
|
/**
|
|
3142
3148
|
* Dumps the swarm information into PlantUML format.
|