agent-swarm-kit 1.0.237 → 1.0.239
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 +4 -3
- package/build/index.mjs +4 -3
- package/package.json +1 -1
package/build/index.cjs
CHANGED
|
@@ -4628,7 +4628,6 @@ class AgentConnectionService {
|
|
|
4628
4628
|
*/
|
|
4629
4629
|
this.getAgent = functoolsKit.memoize(([clientId, agentName]) => `${clientId}-${agentName}`, (clientId, agentName) => {
|
|
4630
4630
|
const { prompt, system, operator, systemStatic = system, systemDynamic, tools, transform = GLOBAL_CONFIG.CC_AGENT_OUTPUT_TRANSFORM, map = GLOBAL_CONFIG.CC_AGENT_OUTPUT_MAP, maxToolCalls = GLOBAL_CONFIG.CC_MAX_TOOL_CALLS, mapToolCalls = GLOBAL_CONFIG.CC_AGENT_MAP_TOOLS, callbacks, storages, states, connectOperator = GLOBAL_CONFIG.CC_DEFAULT_CONNECT_OPERATOR, completion: completionName, validate = validateDefault, } = this.agentSchemaService.get(agentName);
|
|
4631
|
-
const completion = this.completionSchemaService.get(completionName);
|
|
4632
4631
|
const history = this.historyConnectionService.getHistory(clientId, agentName);
|
|
4633
4632
|
this.sessionValidationService.addAgentUsage(clientId, agentName);
|
|
4634
4633
|
storages?.forEach((storageName) => this.storageConnectionService
|
|
@@ -4663,7 +4662,7 @@ class AgentConnectionService {
|
|
|
4663
4662
|
transform,
|
|
4664
4663
|
map,
|
|
4665
4664
|
tools: tools?.map(this.toolSchemaService.get),
|
|
4666
|
-
completion,
|
|
4665
|
+
completion: this.completionSchemaService.get(completionName),
|
|
4667
4666
|
...callbacks,
|
|
4668
4667
|
});
|
|
4669
4668
|
});
|
|
@@ -8346,7 +8345,9 @@ class AgentValidationService {
|
|
|
8346
8345
|
if (!agent) {
|
|
8347
8346
|
throw new Error(`agent-swarm agent ${agentName} not found source=${source}`);
|
|
8348
8347
|
}
|
|
8349
|
-
|
|
8348
|
+
if (!agent.operator) {
|
|
8349
|
+
this.completionValidationService.validate(agent.completion, source);
|
|
8350
|
+
}
|
|
8350
8351
|
agent.tools?.forEach((toolName) => {
|
|
8351
8352
|
if (typeof toolName !== "string") {
|
|
8352
8353
|
throw new Error(`agent-swarm agent ${agentName} tool list is invalid (toolName=${String(toolName)}) source=${source}`);
|
package/build/index.mjs
CHANGED
|
@@ -4626,7 +4626,6 @@ class AgentConnectionService {
|
|
|
4626
4626
|
*/
|
|
4627
4627
|
this.getAgent = memoize(([clientId, agentName]) => `${clientId}-${agentName}`, (clientId, agentName) => {
|
|
4628
4628
|
const { prompt, system, operator, systemStatic = system, systemDynamic, tools, transform = GLOBAL_CONFIG.CC_AGENT_OUTPUT_TRANSFORM, map = GLOBAL_CONFIG.CC_AGENT_OUTPUT_MAP, maxToolCalls = GLOBAL_CONFIG.CC_MAX_TOOL_CALLS, mapToolCalls = GLOBAL_CONFIG.CC_AGENT_MAP_TOOLS, callbacks, storages, states, connectOperator = GLOBAL_CONFIG.CC_DEFAULT_CONNECT_OPERATOR, completion: completionName, validate = validateDefault, } = this.agentSchemaService.get(agentName);
|
|
4629
|
-
const completion = this.completionSchemaService.get(completionName);
|
|
4630
4629
|
const history = this.historyConnectionService.getHistory(clientId, agentName);
|
|
4631
4630
|
this.sessionValidationService.addAgentUsage(clientId, agentName);
|
|
4632
4631
|
storages?.forEach((storageName) => this.storageConnectionService
|
|
@@ -4661,7 +4660,7 @@ class AgentConnectionService {
|
|
|
4661
4660
|
transform,
|
|
4662
4661
|
map,
|
|
4663
4662
|
tools: tools?.map(this.toolSchemaService.get),
|
|
4664
|
-
completion,
|
|
4663
|
+
completion: this.completionSchemaService.get(completionName),
|
|
4665
4664
|
...callbacks,
|
|
4666
4665
|
});
|
|
4667
4666
|
});
|
|
@@ -8344,7 +8343,9 @@ class AgentValidationService {
|
|
|
8344
8343
|
if (!agent) {
|
|
8345
8344
|
throw new Error(`agent-swarm agent ${agentName} not found source=${source}`);
|
|
8346
8345
|
}
|
|
8347
|
-
|
|
8346
|
+
if (!agent.operator) {
|
|
8347
|
+
this.completionValidationService.validate(agent.completion, source);
|
|
8348
|
+
}
|
|
8348
8349
|
agent.tools?.forEach((toolName) => {
|
|
8349
8350
|
if (typeof toolName !== "string") {
|
|
8350
8351
|
throw new Error(`agent-swarm agent ${agentName} tool list is invalid (toolName=${String(toolName)}) source=${source}`);
|