agent-swarm-kit 1.1.128 → 1.1.129
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 +420 -391
- package/build/index.mjs +420 -392
- package/package.json +1 -1
- package/types.d.ts +9 -1
package/build/index.cjs
CHANGED
|
@@ -4950,26 +4950,26 @@ class ClientOperator {
|
|
|
4950
4950
|
}
|
|
4951
4951
|
}
|
|
4952
4952
|
|
|
4953
|
-
const METHOD_NAME$
|
|
4953
|
+
const METHOD_NAME$1F = "function.commit.commitToolOutput";
|
|
4954
4954
|
/**
|
|
4955
4955
|
* Function implementation
|
|
4956
4956
|
*/
|
|
4957
4957
|
const commitToolOutputInternal = beginContext(async (toolId, content, clientId, agentName) => {
|
|
4958
4958
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
4959
4959
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
4960
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
4960
|
+
swarm$1.loggerService.log(METHOD_NAME$1F, {
|
|
4961
4961
|
toolId,
|
|
4962
4962
|
content,
|
|
4963
4963
|
clientId,
|
|
4964
4964
|
agentName,
|
|
4965
4965
|
});
|
|
4966
4966
|
// Validate the agent, session, and swarm to ensure they exist and are accessible
|
|
4967
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
4968
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
4967
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$1F);
|
|
4968
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1F);
|
|
4969
4969
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
4970
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
4970
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1F);
|
|
4971
4971
|
// Check if the specified agent is still the active agent in the swarm session
|
|
4972
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
4972
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$1F, clientId, swarmName);
|
|
4973
4973
|
if (currentAgentName !== agentName) {
|
|
4974
4974
|
// Log a skip message if the agent has changed during the operation
|
|
4975
4975
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
@@ -4982,7 +4982,7 @@ const commitToolOutputInternal = beginContext(async (toolId, content, clientId,
|
|
|
4982
4982
|
return;
|
|
4983
4983
|
}
|
|
4984
4984
|
// Commit the tool output to the session via the session public service
|
|
4985
|
-
await swarm$1.sessionPublicService.commitToolOutput(toolId, content, METHOD_NAME$
|
|
4985
|
+
await swarm$1.sessionPublicService.commitToolOutput(toolId, content, METHOD_NAME$1F, clientId, swarmName);
|
|
4986
4986
|
});
|
|
4987
4987
|
/**
|
|
4988
4988
|
* Commits the output of a tool execution to the active agent in a swarm session.
|
|
@@ -5004,7 +5004,7 @@ async function commitToolOutput(toolId, content, clientId, agentName) {
|
|
|
5004
5004
|
return await commitToolOutputInternal(toolId, content, clientId, agentName);
|
|
5005
5005
|
}
|
|
5006
5006
|
|
|
5007
|
-
const METHOD_NAME$
|
|
5007
|
+
const METHOD_NAME$1E = "function.target.execute";
|
|
5008
5008
|
/**
|
|
5009
5009
|
* Function implementation
|
|
5010
5010
|
*/
|
|
@@ -5012,19 +5012,19 @@ const executeInternal = beginContext(async (content, clientId, agentName) => {
|
|
|
5012
5012
|
const executionId = functoolsKit.randomString();
|
|
5013
5013
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
5014
5014
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
5015
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
5015
|
+
swarm$1.loggerService.log(METHOD_NAME$1E, {
|
|
5016
5016
|
content,
|
|
5017
5017
|
clientId,
|
|
5018
5018
|
agentName,
|
|
5019
5019
|
executionId,
|
|
5020
5020
|
});
|
|
5021
5021
|
// Validate the agent, session, and swarm
|
|
5022
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
5023
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
5022
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$1E);
|
|
5023
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1E);
|
|
5024
5024
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
5025
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
5025
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1E);
|
|
5026
5026
|
// Check if the specified agent is still the active agent
|
|
5027
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
5027
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$1E, clientId, swarmName);
|
|
5028
5028
|
if (currentAgentName !== agentName) {
|
|
5029
5029
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
5030
5030
|
swarm$1.loggerService.log('function "execute" skipped due to the agent change', {
|
|
@@ -5043,7 +5043,7 @@ const executeInternal = beginContext(async (content, clientId, agentName) => {
|
|
|
5043
5043
|
agentName,
|
|
5044
5044
|
swarmName,
|
|
5045
5045
|
});
|
|
5046
|
-
const result = await swarm$1.sessionPublicService.execute(content, "tool", METHOD_NAME$
|
|
5046
|
+
const result = await swarm$1.sessionPublicService.execute(content, "tool", METHOD_NAME$1E, clientId, swarmName);
|
|
5047
5047
|
isFinished = swarm$1.perfService.endExecution(executionId, clientId, result.length);
|
|
5048
5048
|
swarm$1.busService.commitExecutionEnd(clientId, {
|
|
5049
5049
|
agentName,
|
|
@@ -5085,26 +5085,26 @@ async function execute(content, clientId, agentName) {
|
|
|
5085
5085
|
}
|
|
5086
5086
|
|
|
5087
5087
|
/** @private Constant defining the method name for logging and validation context */
|
|
5088
|
-
const METHOD_NAME$
|
|
5088
|
+
const METHOD_NAME$1D = "function.commit.commitFlush";
|
|
5089
5089
|
/**
|
|
5090
5090
|
* Function implementation
|
|
5091
5091
|
*/
|
|
5092
5092
|
const commitFlushInternal = beginContext(async (clientId, agentName) => {
|
|
5093
5093
|
// Log the flush attempt if enabled
|
|
5094
5094
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
5095
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
5095
|
+
swarm$1.loggerService.log(METHOD_NAME$1D, {
|
|
5096
5096
|
clientId,
|
|
5097
5097
|
agentName,
|
|
5098
5098
|
});
|
|
5099
5099
|
// Validate the agent exists
|
|
5100
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
5100
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$1D);
|
|
5101
5101
|
// Validate the session exists and retrieve the associated swarm
|
|
5102
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
5102
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1D);
|
|
5103
5103
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
5104
5104
|
// Validate the swarm configuration
|
|
5105
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
5105
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1D);
|
|
5106
5106
|
// Check if the current agent matches the provided agent
|
|
5107
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
5107
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$1D, clientId, swarmName);
|
|
5108
5108
|
if (currentAgentName !== agentName) {
|
|
5109
5109
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
5110
5110
|
swarm$1.loggerService.log('function "commitFlush" skipped due to the agent change', {
|
|
@@ -5115,7 +5115,7 @@ const commitFlushInternal = beginContext(async (clientId, agentName) => {
|
|
|
5115
5115
|
return;
|
|
5116
5116
|
}
|
|
5117
5117
|
// Commit the flush of agent history via SessionPublicService
|
|
5118
|
-
await swarm$1.sessionPublicService.commitFlush(METHOD_NAME$
|
|
5118
|
+
await swarm$1.sessionPublicService.commitFlush(METHOD_NAME$1D, clientId, swarmName);
|
|
5119
5119
|
});
|
|
5120
5120
|
/**
|
|
5121
5121
|
* Commits a flush of agent history for a specific client and agent in the swarm system.
|
|
@@ -5134,25 +5134,25 @@ async function commitFlush(clientId, agentName) {
|
|
|
5134
5134
|
return await commitFlushInternal(clientId, agentName);
|
|
5135
5135
|
}
|
|
5136
5136
|
|
|
5137
|
-
const METHOD_NAME$
|
|
5137
|
+
const METHOD_NAME$1C = "function.target.emit";
|
|
5138
5138
|
/**
|
|
5139
5139
|
* Function implementation
|
|
5140
5140
|
*/
|
|
5141
5141
|
const emitInternal = beginContext(async (content, clientId, agentName) => {
|
|
5142
5142
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
5143
5143
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
5144
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
5144
|
+
swarm$1.loggerService.log(METHOD_NAME$1C, {
|
|
5145
5145
|
content,
|
|
5146
5146
|
clientId,
|
|
5147
5147
|
agentName,
|
|
5148
5148
|
});
|
|
5149
5149
|
// Validate the agent, session, and swarm
|
|
5150
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
5151
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
5150
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$1C);
|
|
5151
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1C);
|
|
5152
5152
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
5153
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
5153
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1C);
|
|
5154
5154
|
// Check if the specified agent is still the active agent
|
|
5155
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
5155
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$1C, clientId, swarmName);
|
|
5156
5156
|
if (currentAgentName !== agentName) {
|
|
5157
5157
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
5158
5158
|
swarm$1.loggerService.log('function "emit" skipped due to the agent change', {
|
|
@@ -5163,7 +5163,7 @@ const emitInternal = beginContext(async (content, clientId, agentName) => {
|
|
|
5163
5163
|
return;
|
|
5164
5164
|
}
|
|
5165
5165
|
// Emit the content directly via the session public service
|
|
5166
|
-
return await swarm$1.sessionPublicService.emit(content, METHOD_NAME$
|
|
5166
|
+
return await swarm$1.sessionPublicService.emit(content, METHOD_NAME$1C, clientId, swarmName);
|
|
5167
5167
|
});
|
|
5168
5168
|
/**
|
|
5169
5169
|
* Emits a string as model output without executing an incoming message, with agent activity validation.
|
|
@@ -5185,22 +5185,22 @@ async function emit(content, clientId, agentName) {
|
|
|
5185
5185
|
return await emitInternal(content, clientId, agentName);
|
|
5186
5186
|
}
|
|
5187
5187
|
|
|
5188
|
-
const METHOD_NAME$
|
|
5188
|
+
const METHOD_NAME$1B = "function.common.getAgentName";
|
|
5189
5189
|
/**
|
|
5190
5190
|
* Function implementation
|
|
5191
5191
|
*/
|
|
5192
5192
|
const getAgentNameInternal = beginContext(async (clientId) => {
|
|
5193
5193
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
5194
5194
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
5195
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
5195
|
+
swarm$1.loggerService.log(METHOD_NAME$1B, {
|
|
5196
5196
|
clientId,
|
|
5197
5197
|
});
|
|
5198
5198
|
// Validate the session and swarm to ensure they exist and are accessible
|
|
5199
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
5199
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1B);
|
|
5200
5200
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
5201
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
5201
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1B);
|
|
5202
5202
|
// Retrieve the active agent name via the swarm public service
|
|
5203
|
-
return await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
5203
|
+
return await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$1B, clientId, swarmName);
|
|
5204
5204
|
});
|
|
5205
5205
|
/**
|
|
5206
5206
|
* Retrieves the name of the active agent for a given client session in a swarm.
|
|
@@ -5221,26 +5221,26 @@ async function getAgentName(clientId) {
|
|
|
5221
5221
|
}
|
|
5222
5222
|
|
|
5223
5223
|
/** @private Constant defining the method name for logging and validation context */
|
|
5224
|
-
const METHOD_NAME$
|
|
5224
|
+
const METHOD_NAME$1A = "function.commit.commitStopTools";
|
|
5225
5225
|
/**
|
|
5226
5226
|
* Function implementation
|
|
5227
5227
|
*/
|
|
5228
5228
|
const commitStopToolsInternal = beginContext(async (clientId, agentName) => {
|
|
5229
5229
|
// Log the stop tools attempt if enabled
|
|
5230
5230
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
5231
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
5231
|
+
swarm$1.loggerService.log(METHOD_NAME$1A, {
|
|
5232
5232
|
clientId,
|
|
5233
5233
|
agentName,
|
|
5234
5234
|
});
|
|
5235
5235
|
// Validate the agent exists
|
|
5236
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
5236
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$1A);
|
|
5237
5237
|
// Validate the session exists and retrieve the associated swarm
|
|
5238
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
5238
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1A);
|
|
5239
5239
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
5240
5240
|
// Validate the swarm configuration
|
|
5241
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
5241
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1A);
|
|
5242
5242
|
// Check if the current agent matches the provided agent
|
|
5243
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
5243
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$1A, clientId, swarmName);
|
|
5244
5244
|
if (currentAgentName !== agentName) {
|
|
5245
5245
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
5246
5246
|
swarm$1.loggerService.log('function "commitStopTools" skipped due to the agent change', {
|
|
@@ -5251,7 +5251,7 @@ const commitStopToolsInternal = beginContext(async (clientId, agentName) => {
|
|
|
5251
5251
|
return;
|
|
5252
5252
|
}
|
|
5253
5253
|
// Commit the stop of the next tool execution via SessionPublicService
|
|
5254
|
-
await swarm$1.sessionPublicService.commitStopTools(METHOD_NAME$
|
|
5254
|
+
await swarm$1.sessionPublicService.commitStopTools(METHOD_NAME$1A, clientId, swarmName);
|
|
5255
5255
|
});
|
|
5256
5256
|
/**
|
|
5257
5257
|
* Prevents the next tool from being executed for a specific client and agent in the swarm system.
|
|
@@ -5812,12 +5812,12 @@ class AgentConnectionService {
|
|
|
5812
5812
|
}
|
|
5813
5813
|
|
|
5814
5814
|
/** @private Constant defining the method name for logging purposes */
|
|
5815
|
-
const METHOD_NAME$
|
|
5815
|
+
const METHOD_NAME$1z = "function.common.getPayload";
|
|
5816
5816
|
/**
|
|
5817
5817
|
* Function implementation
|
|
5818
5818
|
*/
|
|
5819
5819
|
const getPayloadInternal = () => {
|
|
5820
|
-
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG && swarm$1.loggerService.log(METHOD_NAME$
|
|
5820
|
+
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG && swarm$1.loggerService.log(METHOD_NAME$1z);
|
|
5821
5821
|
if (PayloadContextService.hasContext()) {
|
|
5822
5822
|
const { payload } = swarm$1.payloadContextService.context;
|
|
5823
5823
|
return payload;
|
|
@@ -18662,7 +18662,7 @@ const swarm = {
|
|
|
18662
18662
|
init();
|
|
18663
18663
|
var swarm$1 = swarm;
|
|
18664
18664
|
|
|
18665
|
-
const METHOD_NAME$
|
|
18665
|
+
const METHOD_NAME$1y = "cli.dumpDocs";
|
|
18666
18666
|
/**
|
|
18667
18667
|
* Dumps the documentation for the agents and swarms.
|
|
18668
18668
|
*
|
|
@@ -18672,7 +18672,7 @@ const METHOD_NAME$1x = "cli.dumpDocs";
|
|
|
18672
18672
|
*/
|
|
18673
18673
|
const dumpDocs = beginContext((prefix = "swarm", dirName = "./docs/chat", PlantUML, sanitizeMarkdown = (t) => t) => {
|
|
18674
18674
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
18675
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
18675
|
+
swarm$1.loggerService.log(METHOD_NAME$1y, {
|
|
18676
18676
|
dirName,
|
|
18677
18677
|
});
|
|
18678
18678
|
if (PlantUML) {
|
|
@@ -18682,10 +18682,10 @@ const dumpDocs = beginContext((prefix = "swarm", dirName = "./docs/chat", PlantU
|
|
|
18682
18682
|
}
|
|
18683
18683
|
swarm$1.agentValidationService
|
|
18684
18684
|
.getAgentList()
|
|
18685
|
-
.forEach((agentName) => swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
18685
|
+
.forEach((agentName) => swarm$1.agentValidationService.validate(agentName, METHOD_NAME$1y));
|
|
18686
18686
|
swarm$1.swarmValidationService
|
|
18687
18687
|
.getSwarmList()
|
|
18688
|
-
.forEach((swarmName) => swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
18688
|
+
.forEach((swarmName) => swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1y));
|
|
18689
18689
|
swarm$1.agentValidationService.getAgentList().forEach((agentName) => {
|
|
18690
18690
|
const { dependsOn } = swarm$1.agentSchemaService.get(agentName);
|
|
18691
18691
|
if (!dependsOn) {
|
|
@@ -18694,11 +18694,11 @@ const dumpDocs = beginContext((prefix = "swarm", dirName = "./docs/chat", PlantU
|
|
|
18694
18694
|
});
|
|
18695
18695
|
swarm$1.outlineValidationService
|
|
18696
18696
|
.getOutlineList()
|
|
18697
|
-
.forEach((swarmName) => swarm$1.outlineValidationService.validate(swarmName, METHOD_NAME$
|
|
18697
|
+
.forEach((swarmName) => swarm$1.outlineValidationService.validate(swarmName, METHOD_NAME$1y));
|
|
18698
18698
|
return swarm$1.docService.dumpDocs(prefix, dirName, sanitizeMarkdown);
|
|
18699
18699
|
});
|
|
18700
18700
|
|
|
18701
|
-
const METHOD_NAME$
|
|
18701
|
+
const METHOD_NAME$1x = "cli.dumpAgent";
|
|
18702
18702
|
/**
|
|
18703
18703
|
* Dumps the agent information into PlantUML format.
|
|
18704
18704
|
*
|
|
@@ -18707,14 +18707,14 @@ const METHOD_NAME$1w = "cli.dumpAgent";
|
|
|
18707
18707
|
*/
|
|
18708
18708
|
const dumpAgent = beginContext((agentName, { withSubtree = false } = {}) => {
|
|
18709
18709
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
18710
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
18710
|
+
swarm$1.loggerService.log(METHOD_NAME$1x, {
|
|
18711
18711
|
agentName,
|
|
18712
18712
|
});
|
|
18713
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
18713
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$1x);
|
|
18714
18714
|
return swarm$1.agentMetaService.toUML(agentName, withSubtree);
|
|
18715
18715
|
});
|
|
18716
18716
|
|
|
18717
|
-
const METHOD_NAME$
|
|
18717
|
+
const METHOD_NAME$1w = "cli.dumpSwarm";
|
|
18718
18718
|
/**
|
|
18719
18719
|
* Dumps the swarm information into PlantUML format.
|
|
18720
18720
|
*
|
|
@@ -18723,14 +18723,14 @@ const METHOD_NAME$1v = "cli.dumpSwarm";
|
|
|
18723
18723
|
*/
|
|
18724
18724
|
const dumpSwarm = beginContext((swarmName) => {
|
|
18725
18725
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
18726
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
18726
|
+
swarm$1.loggerService.log(METHOD_NAME$1w, {
|
|
18727
18727
|
swarmName,
|
|
18728
18728
|
});
|
|
18729
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
18729
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1w);
|
|
18730
18730
|
return swarm$1.swarmMetaService.toUML(swarmName);
|
|
18731
18731
|
});
|
|
18732
18732
|
|
|
18733
|
-
const METHOD_NAME$
|
|
18733
|
+
const METHOD_NAME$1v = "cli.dumpPerfomance";
|
|
18734
18734
|
const METHOD_NAME_INTERNAL$1 = "cli.dumpPerfomance.internal";
|
|
18735
18735
|
const METHOD_NAME_INTERVAL = "cli.dumpPerfomance.interval";
|
|
18736
18736
|
/**
|
|
@@ -18749,7 +18749,7 @@ const dumpPerfomanceInternal = beginContext(async (dirName = "./logs/meta") => {
|
|
|
18749
18749
|
* @returns {Promise<void>} A promise that resolves when the performance data has been dumped.
|
|
18750
18750
|
*/
|
|
18751
18751
|
const dumpPerfomance = async (dirName = "./logs/meta") => {
|
|
18752
|
-
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG && swarm$1.loggerService.log(METHOD_NAME$
|
|
18752
|
+
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG && swarm$1.loggerService.log(METHOD_NAME$1v);
|
|
18753
18753
|
await dumpPerfomanceInternal(dirName);
|
|
18754
18754
|
};
|
|
18755
18755
|
/**
|
|
@@ -18807,7 +18807,7 @@ const listenExecutionEvent = beginContext((clientId, fn) => {
|
|
|
18807
18807
|
return swarm$1.busService.subscribe(clientId, "execution-bus", functoolsKit.queued(async (e) => await fn(e)));
|
|
18808
18808
|
});
|
|
18809
18809
|
|
|
18810
|
-
const METHOD_NAME$
|
|
18810
|
+
const METHOD_NAME$1u = "cli.dumpClientPerformance";
|
|
18811
18811
|
const METHOD_NAME_INTERNAL = "cli.dumpClientPerformance.internal";
|
|
18812
18812
|
const METHOD_NAME_EXECUTE = "cli.dumpClientPerformance.execute";
|
|
18813
18813
|
/**
|
|
@@ -18831,7 +18831,7 @@ const dumpClientPerformanceInternal = beginContext(async (clientId, dirName = ".
|
|
|
18831
18831
|
* @returns {Promise<void>} A promise that resolves when the performance data has been dumped.
|
|
18832
18832
|
*/
|
|
18833
18833
|
const dumpClientPerformance = async (clientId, dirName = "./logs/client") => {
|
|
18834
|
-
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG && swarm$1.loggerService.log(METHOD_NAME$
|
|
18834
|
+
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG && swarm$1.loggerService.log(METHOD_NAME$1u);
|
|
18835
18835
|
await dumpClientPerformanceInternal(clientId, dirName);
|
|
18836
18836
|
};
|
|
18837
18837
|
/**
|
|
@@ -18852,24 +18852,24 @@ dumpClientPerformance.runAfterExecute = beginContext(async (dirName = "./logs/cl
|
|
|
18852
18852
|
});
|
|
18853
18853
|
|
|
18854
18854
|
/** @private Constant defining the method name for logging and validation context */
|
|
18855
|
-
const METHOD_NAME$
|
|
18855
|
+
const METHOD_NAME$1t = "function.commit.commitFlushForce";
|
|
18856
18856
|
/**
|
|
18857
18857
|
* Function implementation
|
|
18858
18858
|
*/
|
|
18859
18859
|
const commitFlushForceInternal = beginContext(async (clientId) => {
|
|
18860
18860
|
// Log the flush attempt if enabled
|
|
18861
18861
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
18862
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
18862
|
+
swarm$1.loggerService.log(METHOD_NAME$1t, {
|
|
18863
18863
|
clientId,
|
|
18864
|
-
METHOD_NAME: METHOD_NAME$
|
|
18864
|
+
METHOD_NAME: METHOD_NAME$1t,
|
|
18865
18865
|
});
|
|
18866
18866
|
// Validate the session exists and retrieve the associated swarm
|
|
18867
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
18867
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1t);
|
|
18868
18868
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
18869
18869
|
// Validate the swarm configuration
|
|
18870
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
18870
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1t);
|
|
18871
18871
|
// Commit the flush of agent history via SessionPublicService without agent checks
|
|
18872
|
-
await swarm$1.sessionPublicService.commitFlush(METHOD_NAME$
|
|
18872
|
+
await swarm$1.sessionPublicService.commitFlush(METHOD_NAME$1t, clientId, swarmName);
|
|
18873
18873
|
});
|
|
18874
18874
|
/**
|
|
18875
18875
|
* Forcefully commits a flush of agent history for a specific client in the swarm system, without checking the active agent.
|
|
@@ -18889,24 +18889,24 @@ async function commitFlushForce(clientId) {
|
|
|
18889
18889
|
return await commitFlushForceInternal(clientId);
|
|
18890
18890
|
}
|
|
18891
18891
|
|
|
18892
|
-
const METHOD_NAME$
|
|
18892
|
+
const METHOD_NAME$1s = "function.commit.commitToolOutputForce";
|
|
18893
18893
|
/**
|
|
18894
18894
|
* Function implementation
|
|
18895
18895
|
*/
|
|
18896
18896
|
const commitToolOutputForceInternal = beginContext(async (toolId, content, clientId) => {
|
|
18897
18897
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
18898
18898
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
18899
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
18899
|
+
swarm$1.loggerService.log(METHOD_NAME$1s, {
|
|
18900
18900
|
toolId,
|
|
18901
18901
|
content,
|
|
18902
18902
|
clientId,
|
|
18903
18903
|
});
|
|
18904
18904
|
// Validate the session and swarm to ensure they exist and are accessible
|
|
18905
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
18905
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1s);
|
|
18906
18906
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
18907
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
18907
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1s);
|
|
18908
18908
|
// Commit the tool output to the session via the session public service without checking the active agent
|
|
18909
|
-
await swarm$1.sessionPublicService.commitToolOutput(toolId, content, METHOD_NAME$
|
|
18909
|
+
await swarm$1.sessionPublicService.commitToolOutput(toolId, content, METHOD_NAME$1s, clientId, swarmName);
|
|
18910
18910
|
});
|
|
18911
18911
|
/**
|
|
18912
18912
|
* Commits the output of a tool execution to the active agent in a swarm session without checking the active agent.
|
|
@@ -18931,15 +18931,15 @@ async function commitToolOutputForce(toolId, content, clientId) {
|
|
|
18931
18931
|
* @private Constant defining the method name for logging and validation purposes.
|
|
18932
18932
|
* Used as an identifier in log messages and validation checks to track calls to `hasNavigation`.
|
|
18933
18933
|
*/
|
|
18934
|
-
const METHOD_NAME$
|
|
18934
|
+
const METHOD_NAME$1r = "function.common.hasNavigation";
|
|
18935
18935
|
/**
|
|
18936
18936
|
* Function implementation
|
|
18937
18937
|
*/
|
|
18938
18938
|
const hasNavigationInternal = async (clientId, agentName) => {
|
|
18939
18939
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
18940
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
18941
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
18942
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
18940
|
+
swarm$1.loggerService.log(METHOD_NAME$1r, { clientId });
|
|
18941
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$1r);
|
|
18942
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1r);
|
|
18943
18943
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
18944
18944
|
return swarm$1.navigationValidationService
|
|
18945
18945
|
.getNavigationRoute(clientId, swarmName)
|
|
@@ -18957,14 +18957,14 @@ async function hasNavigation(clientId, agentName) {
|
|
|
18957
18957
|
return await hasNavigationInternal(clientId, agentName);
|
|
18958
18958
|
}
|
|
18959
18959
|
|
|
18960
|
-
const METHOD_NAME$
|
|
18960
|
+
const METHOD_NAME$1q = "function.history.getRawHistory";
|
|
18961
18961
|
/**
|
|
18962
18962
|
* Function implementation
|
|
18963
18963
|
*/
|
|
18964
18964
|
const getRawHistoryInternal = beginContext(async (clientId, methodName) => {
|
|
18965
18965
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
18966
18966
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
18967
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
18967
|
+
swarm$1.loggerService.log(METHOD_NAME$1q, {
|
|
18968
18968
|
clientId,
|
|
18969
18969
|
});
|
|
18970
18970
|
// Validate the session and swarm
|
|
@@ -18993,21 +18993,21 @@ const getRawHistoryInternal = beginContext(async (clientId, methodName) => {
|
|
|
18993
18993
|
* console.log(rawHistory); // Outputs the full raw history array
|
|
18994
18994
|
*/
|
|
18995
18995
|
async function getRawHistory(clientId) {
|
|
18996
|
-
return await getRawHistoryInternal(clientId, METHOD_NAME$
|
|
18996
|
+
return await getRawHistoryInternal(clientId, METHOD_NAME$1q);
|
|
18997
18997
|
}
|
|
18998
18998
|
|
|
18999
|
-
const METHOD_NAME$
|
|
18999
|
+
const METHOD_NAME$1p = "function.history.getLastUserMessage";
|
|
19000
19000
|
/**
|
|
19001
19001
|
* Function implementation
|
|
19002
19002
|
*/
|
|
19003
19003
|
const getLastUserMessageInternal = beginContext(async (clientId) => {
|
|
19004
19004
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
19005
19005
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19006
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19006
|
+
swarm$1.loggerService.log(METHOD_NAME$1p, {
|
|
19007
19007
|
clientId,
|
|
19008
19008
|
});
|
|
19009
19009
|
// Fetch raw history and find the last user message
|
|
19010
|
-
const history = await getRawHistoryInternal(clientId, METHOD_NAME$
|
|
19010
|
+
const history = await getRawHistoryInternal(clientId, METHOD_NAME$1p);
|
|
19011
19011
|
const last = history.findLast(({ role, mode }) => role === "user" && mode === "user");
|
|
19012
19012
|
return last?.content ? last.content : null;
|
|
19013
19013
|
});
|
|
@@ -19031,7 +19031,7 @@ async function getLastUserMessage(clientId) {
|
|
|
19031
19031
|
|
|
19032
19032
|
const disposeSubject = new functoolsKit.Subject();
|
|
19033
19033
|
|
|
19034
|
-
const METHOD_NAME$
|
|
19034
|
+
const METHOD_NAME$1o = "function.navigate.changeToDefaultAgent";
|
|
19035
19035
|
/**
|
|
19036
19036
|
* Creates a change agent function with time-to-live (TTL) and queuing capabilities for switching to the default agent.
|
|
19037
19037
|
*
|
|
@@ -19054,7 +19054,7 @@ const createChangeToDefaultAgent = functoolsKit.memoize(([clientId]) => `${clien
|
|
|
19054
19054
|
}));
|
|
19055
19055
|
{
|
|
19056
19056
|
// Dispose of the current agent's resources and set up the new default agent
|
|
19057
|
-
const agentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
19057
|
+
const agentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$1o, clientId, swarmName);
|
|
19058
19058
|
await swarm$1.agentPublicService.dispose(methodName, clientId, agentName);
|
|
19059
19059
|
await swarm$1.historyPublicService.dispose(methodName, clientId, agentName);
|
|
19060
19060
|
await swarm$1.swarmPublicService.setAgentRef(methodName, clientId, swarmName, agentName, await swarm$1.agentPublicService.createAgentRef(methodName, clientId, agentName));
|
|
@@ -19082,20 +19082,20 @@ const createGc$3 = functoolsKit.singleshot(async () => {
|
|
|
19082
19082
|
const changeToDefaultAgentInternal = beginContext(async (clientId) => {
|
|
19083
19083
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
19084
19084
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19085
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19085
|
+
swarm$1.loggerService.log(METHOD_NAME$1o, {
|
|
19086
19086
|
clientId,
|
|
19087
19087
|
});
|
|
19088
19088
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
19089
19089
|
const { defaultAgent: agentName } = swarm$1.swarmSchemaService.get(swarmName);
|
|
19090
19090
|
{
|
|
19091
19091
|
// Validate session and default agent
|
|
19092
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
19093
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
19092
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1o);
|
|
19093
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$1o);
|
|
19094
19094
|
}
|
|
19095
19095
|
// Execute the agent change with TTL and queuing
|
|
19096
19096
|
const run = await createChangeToDefaultAgent(clientId);
|
|
19097
19097
|
createGc$3();
|
|
19098
|
-
return await run(METHOD_NAME$
|
|
19098
|
+
return await run(METHOD_NAME$1o, agentName, swarmName);
|
|
19099
19099
|
});
|
|
19100
19100
|
/**
|
|
19101
19101
|
* Navigates back to the default agent for a given client session in a swarm.
|
|
@@ -19114,23 +19114,23 @@ async function changeToDefaultAgent(clientId) {
|
|
|
19114
19114
|
return await changeToDefaultAgentInternal(clientId);
|
|
19115
19115
|
}
|
|
19116
19116
|
|
|
19117
|
-
const METHOD_NAME$
|
|
19117
|
+
const METHOD_NAME$1n = "function.target.emitForce";
|
|
19118
19118
|
/**
|
|
19119
19119
|
* Function implementation
|
|
19120
19120
|
*/
|
|
19121
19121
|
const emitForceInternal = beginContext(async (content, clientId) => {
|
|
19122
19122
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
19123
19123
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19124
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19124
|
+
swarm$1.loggerService.log(METHOD_NAME$1n, {
|
|
19125
19125
|
content,
|
|
19126
19126
|
clientId,
|
|
19127
19127
|
});
|
|
19128
19128
|
// Validate the session and swarm
|
|
19129
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
19129
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1n);
|
|
19130
19130
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
19131
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
19131
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1n);
|
|
19132
19132
|
// Emit the content directly via the session public service
|
|
19133
|
-
return await swarm$1.sessionPublicService.emit(content, METHOD_NAME$
|
|
19133
|
+
return await swarm$1.sessionPublicService.emit(content, METHOD_NAME$1n, clientId, swarmName);
|
|
19134
19134
|
});
|
|
19135
19135
|
/**
|
|
19136
19136
|
* Emits a string as model output without executing an incoming message or checking the active agent.
|
|
@@ -19151,7 +19151,7 @@ async function emitForce(content, clientId) {
|
|
|
19151
19151
|
return await emitForceInternal(content, clientId);
|
|
19152
19152
|
}
|
|
19153
19153
|
|
|
19154
|
-
const METHOD_NAME$
|
|
19154
|
+
const METHOD_NAME$1m = "function.target.executeForce";
|
|
19155
19155
|
/**
|
|
19156
19156
|
* Function implementation
|
|
19157
19157
|
*/
|
|
@@ -19159,22 +19159,22 @@ const executeForceInternal = beginContext(async (content, clientId) => {
|
|
|
19159
19159
|
const executionId = functoolsKit.randomString();
|
|
19160
19160
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
19161
19161
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19162
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19162
|
+
swarm$1.loggerService.log(METHOD_NAME$1m, {
|
|
19163
19163
|
content,
|
|
19164
19164
|
clientId,
|
|
19165
19165
|
executionId,
|
|
19166
19166
|
});
|
|
19167
19167
|
// Validate the session and swarm
|
|
19168
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
19168
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1m);
|
|
19169
19169
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
19170
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
19170
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1m);
|
|
19171
19171
|
// Execute the command within an execution context with performance tracking
|
|
19172
19172
|
return ExecutionContextService.runInContext(async () => {
|
|
19173
19173
|
let isFinished = false;
|
|
19174
19174
|
swarm$1.perfService.startExecution(executionId, clientId, content.length);
|
|
19175
19175
|
try {
|
|
19176
19176
|
swarm$1.busService.commitExecutionBegin(clientId, { swarmName });
|
|
19177
|
-
const result = await swarm$1.sessionPublicService.execute(content, "tool", METHOD_NAME$
|
|
19177
|
+
const result = await swarm$1.sessionPublicService.execute(content, "tool", METHOD_NAME$1m, clientId, swarmName);
|
|
19178
19178
|
isFinished = swarm$1.perfService.endExecution(executionId, clientId, result.length);
|
|
19179
19179
|
swarm$1.busService.commitExecutionEnd(clientId, { swarmName });
|
|
19180
19180
|
return result;
|
|
@@ -19212,24 +19212,24 @@ async function executeForce(content, clientId) {
|
|
|
19212
19212
|
}
|
|
19213
19213
|
|
|
19214
19214
|
/** @private Constant defining the method name for logging and validation context */
|
|
19215
|
-
const METHOD_NAME$
|
|
19215
|
+
const METHOD_NAME$1l = "function.commit.commitStopToolsForce";
|
|
19216
19216
|
/**
|
|
19217
19217
|
* Function implementation
|
|
19218
19218
|
*/
|
|
19219
19219
|
const commitStopToolsForceInternal = beginContext(async (clientId) => {
|
|
19220
19220
|
// Log the stop tools attempt if enabled
|
|
19221
19221
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19222
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19222
|
+
swarm$1.loggerService.log(METHOD_NAME$1l, {
|
|
19223
19223
|
clientId,
|
|
19224
|
-
METHOD_NAME: METHOD_NAME$
|
|
19224
|
+
METHOD_NAME: METHOD_NAME$1l,
|
|
19225
19225
|
});
|
|
19226
19226
|
// Validate the session exists and retrieve the associated swarm
|
|
19227
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
19227
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1l);
|
|
19228
19228
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
19229
19229
|
// Validate the swarm configuration
|
|
19230
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
19230
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$1l);
|
|
19231
19231
|
// Commit the stop of the next tool execution via SessionPublicService without agent checks
|
|
19232
|
-
await swarm$1.sessionPublicService.commitStopTools(METHOD_NAME$
|
|
19232
|
+
await swarm$1.sessionPublicService.commitStopTools(METHOD_NAME$1l, clientId, swarmName);
|
|
19233
19233
|
});
|
|
19234
19234
|
/**
|
|
19235
19235
|
* Forcefully prevents the next tool from being executed for a specific client in the swarm system, without checking the active agent.
|
|
@@ -19249,7 +19249,7 @@ async function commitStopToolsForce(clientId) {
|
|
|
19249
19249
|
return await commitStopToolsForceInternal(clientId);
|
|
19250
19250
|
}
|
|
19251
19251
|
|
|
19252
|
-
const METHOD_NAME$
|
|
19252
|
+
const METHOD_NAME$1k = "function.template.navigateToTriageAgent";
|
|
19253
19253
|
/**
|
|
19254
19254
|
* Will send tool output directly to the model without any additions
|
|
19255
19255
|
*/
|
|
@@ -19300,7 +19300,7 @@ const createNavigateToTriageAgent = ({ flushMessage, beforeNavigate, lastMessage
|
|
|
19300
19300
|
*/
|
|
19301
19301
|
return beginContext(async (toolId, clientId) => {
|
|
19302
19302
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19303
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19303
|
+
swarm$1.loggerService.log(METHOD_NAME$1k, {
|
|
19304
19304
|
clientId,
|
|
19305
19305
|
toolId,
|
|
19306
19306
|
});
|
|
@@ -19335,7 +19335,7 @@ const createNavigateToTriageAgent = ({ flushMessage, beforeNavigate, lastMessage
|
|
|
19335
19335
|
});
|
|
19336
19336
|
};
|
|
19337
19337
|
|
|
19338
|
-
const METHOD_NAME$
|
|
19338
|
+
const METHOD_NAME$1j = "function.navigate.changeToAgent";
|
|
19339
19339
|
/**
|
|
19340
19340
|
* Creates a change agent function with time-to-live (TTL) and queuing capabilities.
|
|
19341
19341
|
*
|
|
@@ -19359,7 +19359,7 @@ const createChangeToAgent = functoolsKit.memoize(([clientId]) => `${clientId}`,
|
|
|
19359
19359
|
}));
|
|
19360
19360
|
{
|
|
19361
19361
|
// Dispose of the current agent's resources and set up the new agent
|
|
19362
|
-
const agentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
19362
|
+
const agentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$1j, clientId, swarmName);
|
|
19363
19363
|
await swarm$1.agentPublicService.dispose(methodName, clientId, agentName);
|
|
19364
19364
|
await swarm$1.historyPublicService.dispose(methodName, clientId, agentName);
|
|
19365
19365
|
await swarm$1.swarmPublicService.setAgentRef(methodName, clientId, swarmName, agentName, await swarm$1.agentPublicService.createAgentRef(methodName, clientId, agentName));
|
|
@@ -19387,16 +19387,16 @@ const createGc$2 = functoolsKit.singleshot(async () => {
|
|
|
19387
19387
|
const changeToAgentInternal = beginContext(async (agentName, clientId) => {
|
|
19388
19388
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
19389
19389
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19390
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19390
|
+
swarm$1.loggerService.log(METHOD_NAME$1j, {
|
|
19391
19391
|
agentName,
|
|
19392
19392
|
clientId,
|
|
19393
19393
|
});
|
|
19394
19394
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
19395
19395
|
{
|
|
19396
19396
|
// Validate session, agent, and dependencies
|
|
19397
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
19398
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
19399
|
-
const activeAgent = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
19397
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1j);
|
|
19398
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$1j);
|
|
19399
|
+
const activeAgent = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$1j, clientId, swarmName);
|
|
19400
19400
|
if (!swarm$1.agentValidationService.hasDependency(activeAgent, agentName)) {
|
|
19401
19401
|
console.error(`agent-swarm missing dependency detected for activeAgent=${activeAgent} dependencyAgent=${agentName}`);
|
|
19402
19402
|
}
|
|
@@ -19414,7 +19414,7 @@ const changeToAgentInternal = beginContext(async (agentName, clientId) => {
|
|
|
19414
19414
|
// Execute the agent change with TTL and queuing
|
|
19415
19415
|
const run = await createChangeToAgent(clientId);
|
|
19416
19416
|
createGc$2();
|
|
19417
|
-
return await run(METHOD_NAME$
|
|
19417
|
+
return await run(METHOD_NAME$1j, agentName, swarmName);
|
|
19418
19418
|
});
|
|
19419
19419
|
/**
|
|
19420
19420
|
* Changes the active agent for a given client session in a swarm.
|
|
@@ -19434,7 +19434,7 @@ async function changeToAgent(agentName, clientId) {
|
|
|
19434
19434
|
return await changeToAgentInternal(agentName, clientId);
|
|
19435
19435
|
}
|
|
19436
19436
|
|
|
19437
|
-
const METHOD_NAME$
|
|
19437
|
+
const METHOD_NAME$1i = "function.template.navigateToAgent";
|
|
19438
19438
|
/**
|
|
19439
19439
|
* Will send tool output directly to the model without any additions
|
|
19440
19440
|
*/
|
|
@@ -19510,7 +19510,7 @@ const createNavigateToAgent = ({ beforeNavigate, lastMessage: lastMessageFn = DE
|
|
|
19510
19510
|
*/
|
|
19511
19511
|
return beginContext(async (toolId, clientId, agentName) => {
|
|
19512
19512
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19513
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19513
|
+
swarm$1.loggerService.log(METHOD_NAME$1i, {
|
|
19514
19514
|
clientId,
|
|
19515
19515
|
toolId,
|
|
19516
19516
|
});
|
|
@@ -19548,14 +19548,14 @@ const createNavigateToAgent = ({ beforeNavigate, lastMessage: lastMessageFn = DE
|
|
|
19548
19548
|
});
|
|
19549
19549
|
};
|
|
19550
19550
|
|
|
19551
|
-
const METHOD_NAME$
|
|
19551
|
+
const METHOD_NAME$1h = "function.setup.addTool";
|
|
19552
19552
|
/**
|
|
19553
19553
|
* Function implementation
|
|
19554
19554
|
*/
|
|
19555
19555
|
const addToolInternal = beginContext((toolSchema) => {
|
|
19556
19556
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
19557
19557
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19558
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19558
|
+
swarm$1.loggerService.log(METHOD_NAME$1h, {
|
|
19559
19559
|
toolSchema,
|
|
19560
19560
|
});
|
|
19561
19561
|
// Register the tool in the validation and schema services
|
|
@@ -19590,12 +19590,12 @@ function addTool(toolSchema) {
|
|
|
19590
19590
|
* Adds navigation functionality to an agent by creating a tool that allows navigation to a specified agent.
|
|
19591
19591
|
* @module addAgentNavigation
|
|
19592
19592
|
*/
|
|
19593
|
-
const METHOD_NAME$
|
|
19593
|
+
const METHOD_NAME$1g = "function.alias.addAgentNavigation";
|
|
19594
19594
|
/**
|
|
19595
19595
|
* Function implementation
|
|
19596
19596
|
*/
|
|
19597
19597
|
const addAgentNavigationInternal = beginContext(({ toolName, docNote, description, navigateTo, ...navigateProps }) => {
|
|
19598
|
-
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG && swarm$1.loggerService.log(METHOD_NAME$
|
|
19598
|
+
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG && swarm$1.loggerService.log(METHOD_NAME$1g);
|
|
19599
19599
|
const navigate = createNavigateToAgent(navigateProps);
|
|
19600
19600
|
const toolSchema = addTool({
|
|
19601
19601
|
toolName,
|
|
@@ -19639,12 +19639,12 @@ function addAgentNavigation(params) {
|
|
|
19639
19639
|
* Adds triage navigation functionality to an agent by creating a tool that facilitates navigation to a triage agent.
|
|
19640
19640
|
* @module addTriageNavigation
|
|
19641
19641
|
*/
|
|
19642
|
-
const METHOD_NAME$
|
|
19642
|
+
const METHOD_NAME$1f = "function.alias.addTriageNavigation";
|
|
19643
19643
|
/**
|
|
19644
19644
|
* Function implementation
|
|
19645
19645
|
*/
|
|
19646
19646
|
const addTriageNavigationInternal = beginContext(({ toolName, docNote, description, ...navigateProps }) => {
|
|
19647
|
-
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG && swarm$1.loggerService.log(METHOD_NAME$
|
|
19647
|
+
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG && swarm$1.loggerService.log(METHOD_NAME$1f);
|
|
19648
19648
|
const navigate = createNavigateToTriageAgent(navigateProps);
|
|
19649
19649
|
const toolSchema = addTool({
|
|
19650
19650
|
toolName,
|
|
@@ -19684,13 +19684,13 @@ function addTriageNavigation(params) {
|
|
|
19684
19684
|
}
|
|
19685
19685
|
|
|
19686
19686
|
/** @constant {string} METHOD_NAME - The name of the method used for logging */
|
|
19687
|
-
const METHOD_NAME$
|
|
19687
|
+
const METHOD_NAME$1e = "function.setup.addWiki";
|
|
19688
19688
|
/**
|
|
19689
19689
|
* Function implementation
|
|
19690
19690
|
*/
|
|
19691
19691
|
const addWikiInternal = beginContext((wikiSchema) => {
|
|
19692
19692
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19693
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19693
|
+
swarm$1.loggerService.log(METHOD_NAME$1e, {
|
|
19694
19694
|
wikiSchema,
|
|
19695
19695
|
});
|
|
19696
19696
|
swarm$1.wikiValidationService.addWiki(wikiSchema.wikiName, wikiSchema);
|
|
@@ -19777,14 +19777,14 @@ const mapAgentSchema = ({ system, systemDynamic, systemStatic, ...schema }) => r
|
|
|
19777
19777
|
: systemDynamic,
|
|
19778
19778
|
});
|
|
19779
19779
|
|
|
19780
|
-
const METHOD_NAME$
|
|
19780
|
+
const METHOD_NAME$1d = "function.setup.addAgent";
|
|
19781
19781
|
/**
|
|
19782
19782
|
* Function implementation
|
|
19783
19783
|
*/
|
|
19784
19784
|
const addAgentInternal = beginContext((publicAgentSchema) => {
|
|
19785
19785
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
19786
19786
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19787
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19787
|
+
swarm$1.loggerService.log(METHOD_NAME$1d, {
|
|
19788
19788
|
agentSchema: publicAgentSchema,
|
|
19789
19789
|
});
|
|
19790
19790
|
const agentSchema = mapAgentSchema(publicAgentSchema);
|
|
@@ -19814,14 +19814,14 @@ function addAgent(agentSchema) {
|
|
|
19814
19814
|
return addAgentInternal(agentSchema);
|
|
19815
19815
|
}
|
|
19816
19816
|
|
|
19817
|
-
const METHOD_NAME$
|
|
19817
|
+
const METHOD_NAME$1c = "function.setup.addCompletion";
|
|
19818
19818
|
/**
|
|
19819
19819
|
* Function implementation
|
|
19820
19820
|
*/
|
|
19821
19821
|
const addCompletionInternal = beginContext((completionSchema) => {
|
|
19822
19822
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
19823
19823
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19824
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19824
|
+
swarm$1.loggerService.log(METHOD_NAME$1c, {
|
|
19825
19825
|
completionSchema,
|
|
19826
19826
|
});
|
|
19827
19827
|
// Register the completion in the validation and schema services
|
|
@@ -19850,14 +19850,14 @@ function addCompletion(completionSchema) {
|
|
|
19850
19850
|
return addCompletionInternal(completionSchema);
|
|
19851
19851
|
}
|
|
19852
19852
|
|
|
19853
|
-
const METHOD_NAME$
|
|
19853
|
+
const METHOD_NAME$1b = "function.setup.addSwarm";
|
|
19854
19854
|
/**
|
|
19855
19855
|
* Function implementation
|
|
19856
19856
|
*/
|
|
19857
19857
|
const addSwarmInternal = beginContext((swarmSchema) => {
|
|
19858
19858
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
19859
19859
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19860
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19860
|
+
swarm$1.loggerService.log(METHOD_NAME$1b, {
|
|
19861
19861
|
swarmSchema,
|
|
19862
19862
|
});
|
|
19863
19863
|
// Register the swarm in the validation and schema services
|
|
@@ -19886,13 +19886,13 @@ function addSwarm(swarmSchema) {
|
|
|
19886
19886
|
return addSwarmInternal(swarmSchema);
|
|
19887
19887
|
}
|
|
19888
19888
|
|
|
19889
|
-
const METHOD_NAME$
|
|
19889
|
+
const METHOD_NAME$1a = "function.setup.addMCP";
|
|
19890
19890
|
/**
|
|
19891
19891
|
* Function implementation
|
|
19892
19892
|
*/
|
|
19893
19893
|
const addMCPInternal = beginContext((mcpSchema) => {
|
|
19894
19894
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19895
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19895
|
+
swarm$1.loggerService.log(METHOD_NAME$1a, {
|
|
19896
19896
|
mcpSchema,
|
|
19897
19897
|
});
|
|
19898
19898
|
swarm$1.mcpValidationService.addMCP(mcpSchema.mcpName, mcpSchema);
|
|
@@ -19908,14 +19908,14 @@ function addMCP(mcpSchema) {
|
|
|
19908
19908
|
return addMCPInternal(mcpSchema);
|
|
19909
19909
|
}
|
|
19910
19910
|
|
|
19911
|
-
const METHOD_NAME$
|
|
19911
|
+
const METHOD_NAME$19 = "function.setup.addState";
|
|
19912
19912
|
/**
|
|
19913
19913
|
* Function implementation
|
|
19914
19914
|
*/
|
|
19915
19915
|
const addStateInternal = beginContext((stateSchema) => {
|
|
19916
19916
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
19917
19917
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19918
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19918
|
+
swarm$1.loggerService.log(METHOD_NAME$19, {
|
|
19919
19919
|
stateSchema,
|
|
19920
19920
|
});
|
|
19921
19921
|
// Register the policy with StateValidationService for runtime validation
|
|
@@ -19953,14 +19953,14 @@ function addState(stateSchema) {
|
|
|
19953
19953
|
return addStateInternal(stateSchema);
|
|
19954
19954
|
}
|
|
19955
19955
|
|
|
19956
|
-
const METHOD_NAME$
|
|
19956
|
+
const METHOD_NAME$18 = "function.setup.addEmbedding";
|
|
19957
19957
|
/**
|
|
19958
19958
|
* Function implementation
|
|
19959
19959
|
*/
|
|
19960
19960
|
const addEmbeddingInternal = beginContext((embeddingSchema) => {
|
|
19961
19961
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
19962
19962
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19963
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19963
|
+
swarm$1.loggerService.log(METHOD_NAME$18, {
|
|
19964
19964
|
embeddingSchema,
|
|
19965
19965
|
});
|
|
19966
19966
|
// Register the embedding in the validation and schema services
|
|
@@ -19989,14 +19989,14 @@ function addEmbedding(embeddingSchema) {
|
|
|
19989
19989
|
return addEmbeddingInternal(embeddingSchema);
|
|
19990
19990
|
}
|
|
19991
19991
|
|
|
19992
|
-
const METHOD_NAME$
|
|
19992
|
+
const METHOD_NAME$17 = "function.setup.addStorage";
|
|
19993
19993
|
/**
|
|
19994
19994
|
* Function implementation
|
|
19995
19995
|
*/
|
|
19996
19996
|
const addStorageInternal = beginContext((storageSchema) => {
|
|
19997
19997
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
19998
19998
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
19999
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
19999
|
+
swarm$1.loggerService.log(METHOD_NAME$17, {
|
|
20000
20000
|
storageSchema,
|
|
20001
20001
|
});
|
|
20002
20002
|
// Register the storage in the validation and schema services
|
|
@@ -20034,14 +20034,14 @@ function addStorage(storageSchema) {
|
|
|
20034
20034
|
}
|
|
20035
20035
|
|
|
20036
20036
|
/** @private Constant defining the method name for logging and validation context */
|
|
20037
|
-
const METHOD_NAME$
|
|
20037
|
+
const METHOD_NAME$16 = "function.setup.addPolicy";
|
|
20038
20038
|
/**
|
|
20039
20039
|
* Function implementation
|
|
20040
20040
|
*/
|
|
20041
20041
|
const addPolicyInternal = beginContext((policySchema) => {
|
|
20042
20042
|
// Log the policy addition attempt if enabled
|
|
20043
20043
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20044
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20044
|
+
swarm$1.loggerService.log(METHOD_NAME$16, {
|
|
20045
20045
|
policySchema,
|
|
20046
20046
|
});
|
|
20047
20047
|
// Register the policy with PolicyValidationService for runtime validation
|
|
@@ -20102,13 +20102,13 @@ function addCompute(computeSchema) {
|
|
|
20102
20102
|
* @description Method name for the addPipeline operation.
|
|
20103
20103
|
* @private
|
|
20104
20104
|
*/
|
|
20105
|
-
const METHOD_NAME$
|
|
20105
|
+
const METHOD_NAME$15 = "function.setup.addPipeline";
|
|
20106
20106
|
/**
|
|
20107
20107
|
* Function implementation
|
|
20108
20108
|
*/
|
|
20109
20109
|
const addPipelineInternal = beginContext((pipelineSchema) => {
|
|
20110
20110
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20111
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20111
|
+
swarm$1.loggerService.log(METHOD_NAME$15, {
|
|
20112
20112
|
pipelineSchema,
|
|
20113
20113
|
});
|
|
20114
20114
|
swarm$1.pipelineValidationService.addPipeline(pipelineSchema.pipelineName, pipelineSchema);
|
|
@@ -20131,7 +20131,7 @@ function addPipeline(pipelineSchema) {
|
|
|
20131
20131
|
* @private
|
|
20132
20132
|
* @constant {string}
|
|
20133
20133
|
*/
|
|
20134
|
-
const METHOD_NAME$
|
|
20134
|
+
const METHOD_NAME$14 = "function.setup.addOutline";
|
|
20135
20135
|
/**
|
|
20136
20136
|
* Internal implementation of the outline addition logic, wrapped in a clean context.
|
|
20137
20137
|
* Registers the outline schema with both the validation and schema services and logs the operation if enabled.
|
|
@@ -20141,7 +20141,7 @@ const METHOD_NAME$13 = "function.setup.addOutline";
|
|
|
20141
20141
|
*/
|
|
20142
20142
|
const addOutlineInternal = beginContext((outlineSchema) => {
|
|
20143
20143
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20144
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20144
|
+
swarm$1.loggerService.log(METHOD_NAME$14, {
|
|
20145
20145
|
outlineSchema,
|
|
20146
20146
|
});
|
|
20147
20147
|
swarm$1.outlineValidationService.addOutline(outlineSchema.outlineName, outlineSchema);
|
|
@@ -20159,13 +20159,13 @@ function addOutline(outlineSchema) {
|
|
|
20159
20159
|
return addOutlineInternal(outlineSchema);
|
|
20160
20160
|
}
|
|
20161
20161
|
|
|
20162
|
-
const METHOD_NAME$
|
|
20162
|
+
const METHOD_NAME$13 = "function.test.overrideAgent";
|
|
20163
20163
|
/**
|
|
20164
20164
|
* Function implementation
|
|
20165
20165
|
*/
|
|
20166
20166
|
const overrideAgentInternal = beginContext((publicAgentSchema) => {
|
|
20167
20167
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20168
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20168
|
+
swarm$1.loggerService.log(METHOD_NAME$13, {
|
|
20169
20169
|
agentSchema: publicAgentSchema,
|
|
20170
20170
|
});
|
|
20171
20171
|
const agentSchema = mapAgentSchema(publicAgentSchema);
|
|
@@ -20196,13 +20196,13 @@ function overrideAgent(agentSchema) {
|
|
|
20196
20196
|
return overrideAgentInternal(agentSchema);
|
|
20197
20197
|
}
|
|
20198
20198
|
|
|
20199
|
-
const METHOD_NAME$
|
|
20199
|
+
const METHOD_NAME$12 = "function.test.overrideCompletion";
|
|
20200
20200
|
/**
|
|
20201
20201
|
* Function implementation
|
|
20202
20202
|
*/
|
|
20203
20203
|
const overrideCompletionInternal = beginContext((completionSchema) => {
|
|
20204
20204
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20205
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20205
|
+
swarm$1.loggerService.log(METHOD_NAME$12, {
|
|
20206
20206
|
completionSchema,
|
|
20207
20207
|
});
|
|
20208
20208
|
return swarm$1.completionSchemaService.override(completionSchema.completionName, completionSchema);
|
|
@@ -20232,13 +20232,13 @@ function overrideCompletion(completionSchema) {
|
|
|
20232
20232
|
return overrideCompletionInternal(completionSchema);
|
|
20233
20233
|
}
|
|
20234
20234
|
|
|
20235
|
-
const METHOD_NAME$
|
|
20235
|
+
const METHOD_NAME$11 = "function.test.overrideEmbeding";
|
|
20236
20236
|
/**
|
|
20237
20237
|
* Function implementation
|
|
20238
20238
|
*/
|
|
20239
20239
|
const overrideEmbedingInternal = beginContext((embeddingSchema) => {
|
|
20240
20240
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20241
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20241
|
+
swarm$1.loggerService.log(METHOD_NAME$11, {
|
|
20242
20242
|
embeddingSchema,
|
|
20243
20243
|
});
|
|
20244
20244
|
return swarm$1.embeddingSchemaService.override(embeddingSchema.embeddingName, embeddingSchema);
|
|
@@ -20270,13 +20270,13 @@ function overrideEmbeding(embeddingSchema) {
|
|
|
20270
20270
|
return overrideEmbedingInternal(embeddingSchema);
|
|
20271
20271
|
}
|
|
20272
20272
|
|
|
20273
|
-
const METHOD_NAME
|
|
20273
|
+
const METHOD_NAME$10 = "function.test.overridePolicy";
|
|
20274
20274
|
/**
|
|
20275
20275
|
* Function implementation
|
|
20276
20276
|
*/
|
|
20277
20277
|
const overridePolicyInternal = beginContext((policySchema) => {
|
|
20278
20278
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20279
|
-
swarm$1.loggerService.log(METHOD_NAME
|
|
20279
|
+
swarm$1.loggerService.log(METHOD_NAME$10, {
|
|
20280
20280
|
policySchema,
|
|
20281
20281
|
});
|
|
20282
20282
|
return swarm$1.policySchemaService.override(policySchema.policyName, policySchema);
|
|
@@ -20306,13 +20306,13 @@ function overridePolicy(policySchema) {
|
|
|
20306
20306
|
return overridePolicyInternal(policySchema);
|
|
20307
20307
|
}
|
|
20308
20308
|
|
|
20309
|
-
const METHOD_NAME
|
|
20309
|
+
const METHOD_NAME$$ = "function.test.overrideState";
|
|
20310
20310
|
/**
|
|
20311
20311
|
* Function implementation
|
|
20312
20312
|
*/
|
|
20313
20313
|
const overrideStateInternal = beginContext((stateSchema) => {
|
|
20314
20314
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20315
|
-
swarm$1.loggerService.log(METHOD_NAME
|
|
20315
|
+
swarm$1.loggerService.log(METHOD_NAME$$, {
|
|
20316
20316
|
stateSchema,
|
|
20317
20317
|
});
|
|
20318
20318
|
return swarm$1.stateSchemaService.override(stateSchema.stateName, stateSchema);
|
|
@@ -20343,13 +20343,13 @@ function overrideState(stateSchema) {
|
|
|
20343
20343
|
return overrideStateInternal(stateSchema);
|
|
20344
20344
|
}
|
|
20345
20345
|
|
|
20346
|
-
const METHOD_NAME$
|
|
20346
|
+
const METHOD_NAME$_ = "function.test.overrideStorage";
|
|
20347
20347
|
/**
|
|
20348
20348
|
* Function implementation
|
|
20349
20349
|
*/
|
|
20350
20350
|
const overrideStorageInternal = beginContext((storageSchema) => {
|
|
20351
20351
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20352
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20352
|
+
swarm$1.loggerService.log(METHOD_NAME$_, {
|
|
20353
20353
|
storageSchema,
|
|
20354
20354
|
});
|
|
20355
20355
|
return swarm$1.storageSchemaService.override(storageSchema.storageName, storageSchema);
|
|
@@ -20381,13 +20381,13 @@ function overrideStorage(storageSchema) {
|
|
|
20381
20381
|
return overrideStorageInternal(storageSchema);
|
|
20382
20382
|
}
|
|
20383
20383
|
|
|
20384
|
-
const METHOD_NAME$
|
|
20384
|
+
const METHOD_NAME$Z = "function.test.overrideSwarm";
|
|
20385
20385
|
/**
|
|
20386
20386
|
* Function implementation
|
|
20387
20387
|
*/
|
|
20388
20388
|
const overrideSwarmInternal = beginContext((swarmSchema) => {
|
|
20389
20389
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20390
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20390
|
+
swarm$1.loggerService.log(METHOD_NAME$Z, {
|
|
20391
20391
|
swarmSchema,
|
|
20392
20392
|
});
|
|
20393
20393
|
return swarm$1.swarmSchemaService.override(swarmSchema.swarmName, swarmSchema);
|
|
@@ -20417,13 +20417,13 @@ function overrideSwarm(swarmSchema) {
|
|
|
20417
20417
|
return overrideSwarmInternal(swarmSchema);
|
|
20418
20418
|
}
|
|
20419
20419
|
|
|
20420
|
-
const METHOD_NAME$
|
|
20420
|
+
const METHOD_NAME$Y = "function.test.overrideTool";
|
|
20421
20421
|
/**
|
|
20422
20422
|
* Function implementation
|
|
20423
20423
|
*/
|
|
20424
20424
|
const overrideToolInternal = beginContext((toolSchema) => {
|
|
20425
20425
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20426
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20426
|
+
swarm$1.loggerService.log(METHOD_NAME$Y, {
|
|
20427
20427
|
toolSchema,
|
|
20428
20428
|
});
|
|
20429
20429
|
return swarm$1.toolSchemaService.override(toolSchema.toolName, toolSchema);
|
|
@@ -20453,13 +20453,13 @@ function overrideTool(toolSchema) {
|
|
|
20453
20453
|
return overrideToolInternal(toolSchema);
|
|
20454
20454
|
}
|
|
20455
20455
|
|
|
20456
|
-
const METHOD_NAME$
|
|
20456
|
+
const METHOD_NAME$X = "function.test.overrideMCP";
|
|
20457
20457
|
/**
|
|
20458
20458
|
* Function implementation
|
|
20459
20459
|
*/
|
|
20460
20460
|
const overrideMCPInternal = beginContext((mcpSchema) => {
|
|
20461
20461
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20462
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20462
|
+
swarm$1.loggerService.log(METHOD_NAME$X, {
|
|
20463
20463
|
mcpSchema,
|
|
20464
20464
|
});
|
|
20465
20465
|
return swarm$1.mcpSchemaService.override(mcpSchema.mcpName, mcpSchema);
|
|
@@ -20473,13 +20473,13 @@ function overrideMCP(mcpSchema) {
|
|
|
20473
20473
|
return overrideMCPInternal(mcpSchema);
|
|
20474
20474
|
}
|
|
20475
20475
|
|
|
20476
|
-
const METHOD_NAME$
|
|
20476
|
+
const METHOD_NAME$W = "function.test.overrideWiki";
|
|
20477
20477
|
/**
|
|
20478
20478
|
* Function implementation
|
|
20479
20479
|
*/
|
|
20480
20480
|
const overrideWikiInternal = beginContext((wikiSchema) => {
|
|
20481
20481
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20482
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20482
|
+
swarm$1.loggerService.log(METHOD_NAME$W, {
|
|
20483
20483
|
wikiSchema,
|
|
20484
20484
|
});
|
|
20485
20485
|
return swarm$1.wikiSchemaService.override(wikiSchema.wikiName, wikiSchema);
|
|
@@ -20518,13 +20518,13 @@ function overrideWiki(wikiSchema) {
|
|
|
20518
20518
|
* @description Method name for the overrideCompute operation.
|
|
20519
20519
|
* @private
|
|
20520
20520
|
*/
|
|
20521
|
-
const METHOD_NAME$
|
|
20521
|
+
const METHOD_NAME$V = "function.test.overrideCompute";
|
|
20522
20522
|
/**
|
|
20523
20523
|
* Function implementation
|
|
20524
20524
|
*/
|
|
20525
20525
|
const overrideComputeInternal = beginContext((computeSchema) => {
|
|
20526
20526
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20527
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20527
|
+
swarm$1.loggerService.log(METHOD_NAME$V, {
|
|
20528
20528
|
computeSchema,
|
|
20529
20529
|
});
|
|
20530
20530
|
return swarm$1.computeSchemaService.override(computeSchema.computeName, computeSchema);
|
|
@@ -20547,13 +20547,13 @@ function overrideCompute(computeSchema) {
|
|
|
20547
20547
|
* @description Method name for the overridePipeline operation.
|
|
20548
20548
|
* @private
|
|
20549
20549
|
*/
|
|
20550
|
-
const METHOD_NAME$
|
|
20550
|
+
const METHOD_NAME$U = "function.test.overridePipeline";
|
|
20551
20551
|
/**
|
|
20552
20552
|
* Function implementation
|
|
20553
20553
|
*/
|
|
20554
20554
|
const overridePipelineInternal = beginContext((pipelineSchema) => {
|
|
20555
20555
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20556
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20556
|
+
swarm$1.loggerService.log(METHOD_NAME$U, {
|
|
20557
20557
|
pipelineSchema,
|
|
20558
20558
|
});
|
|
20559
20559
|
return swarm$1.pipelineSchemaService.override(pipelineSchema.pipelineName, pipelineSchema);
|
|
@@ -20574,7 +20574,7 @@ function overridePipeline(pipelineSchema) {
|
|
|
20574
20574
|
* @private
|
|
20575
20575
|
* @constant {string}
|
|
20576
20576
|
*/
|
|
20577
|
-
const METHOD_NAME$
|
|
20577
|
+
const METHOD_NAME$T = "function.test.overrideOutline";
|
|
20578
20578
|
/**
|
|
20579
20579
|
* Internal implementation of the outline override logic, wrapped in a clean context.
|
|
20580
20580
|
* Updates the specified outline schema in the swarm's schema service and logs the operation if enabled.
|
|
@@ -20583,7 +20583,7 @@ const METHOD_NAME$S = "function.test.overrideOutline";
|
|
|
20583
20583
|
*/
|
|
20584
20584
|
const overrideOutlineInternal = beginContext((outlineSchema) => {
|
|
20585
20585
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20586
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20586
|
+
swarm$1.loggerService.log(METHOD_NAME$T, {
|
|
20587
20587
|
outlineSchema,
|
|
20588
20588
|
});
|
|
20589
20589
|
return swarm$1.outlineSchemaService.override(outlineSchema.outlineName, outlineSchema);
|
|
@@ -20598,23 +20598,23 @@ function overrideOutline(outlineSchema) {
|
|
|
20598
20598
|
return overrideOutlineInternal(outlineSchema);
|
|
20599
20599
|
}
|
|
20600
20600
|
|
|
20601
|
-
const METHOD_NAME$
|
|
20601
|
+
const METHOD_NAME$S = "function.other.markOnline";
|
|
20602
20602
|
/**
|
|
20603
20603
|
* Function implementation
|
|
20604
20604
|
*/
|
|
20605
20605
|
const markOnlineInternal = async (clientId, swarmName) => {
|
|
20606
20606
|
// Log the operation if logging is enabled in the global configuration
|
|
20607
20607
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20608
|
-
swarm.loggerService.log(METHOD_NAME$
|
|
20608
|
+
swarm.loggerService.log(METHOD_NAME$S, {
|
|
20609
20609
|
clientId,
|
|
20610
20610
|
});
|
|
20611
20611
|
// Validate the swarm name
|
|
20612
|
-
swarm.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
20612
|
+
swarm.swarmValidationService.validate(swarmName, METHOD_NAME$S);
|
|
20613
20613
|
// Run the operation in the method context
|
|
20614
20614
|
return await MethodContextService.runInContext(async () => {
|
|
20615
|
-
await swarm.aliveService.markOnline(clientId, swarmName, METHOD_NAME$
|
|
20615
|
+
await swarm.aliveService.markOnline(clientId, swarmName, METHOD_NAME$S);
|
|
20616
20616
|
}, {
|
|
20617
|
-
methodName: METHOD_NAME$
|
|
20617
|
+
methodName: METHOD_NAME$S,
|
|
20618
20618
|
agentName: "",
|
|
20619
20619
|
policyName: "",
|
|
20620
20620
|
stateName: "",
|
|
@@ -20637,20 +20637,20 @@ async function markOnline(clientId, swarmName) {
|
|
|
20637
20637
|
return await markOnlineInternal(clientId, swarmName);
|
|
20638
20638
|
}
|
|
20639
20639
|
|
|
20640
|
-
const METHOD_NAME$
|
|
20640
|
+
const METHOD_NAME$R = "function.other.markOffline";
|
|
20641
20641
|
/**
|
|
20642
20642
|
* Function implementation
|
|
20643
20643
|
*/
|
|
20644
20644
|
const markOfflineInternal = async (clientId, swarmName) => {
|
|
20645
20645
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20646
|
-
swarm.loggerService.log(METHOD_NAME$
|
|
20646
|
+
swarm.loggerService.log(METHOD_NAME$R, {
|
|
20647
20647
|
clientId,
|
|
20648
20648
|
});
|
|
20649
|
-
swarm.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
20649
|
+
swarm.swarmValidationService.validate(swarmName, METHOD_NAME$R);
|
|
20650
20650
|
return await MethodContextService.runInContext(async () => {
|
|
20651
|
-
await swarm.aliveService.markOffline(clientId, swarmName, METHOD_NAME$
|
|
20651
|
+
await swarm.aliveService.markOffline(clientId, swarmName, METHOD_NAME$R);
|
|
20652
20652
|
}, {
|
|
20653
|
-
methodName: METHOD_NAME$
|
|
20653
|
+
methodName: METHOD_NAME$R,
|
|
20654
20654
|
agentName: "",
|
|
20655
20655
|
policyName: "",
|
|
20656
20656
|
stateName: "",
|
|
@@ -20678,27 +20678,27 @@ async function markOffline(clientId, swarmName) {
|
|
|
20678
20678
|
}
|
|
20679
20679
|
|
|
20680
20680
|
/** @private Constant defining the method name for logging and validation context */
|
|
20681
|
-
const METHOD_NAME$
|
|
20681
|
+
const METHOD_NAME$Q = "function.commit.commitSystemMessage";
|
|
20682
20682
|
/**
|
|
20683
20683
|
* Function implementation
|
|
20684
20684
|
*/
|
|
20685
20685
|
const commitSystemMessageInternal = beginContext(async (content, clientId, agentName) => {
|
|
20686
20686
|
// Log the commit attempt if enabled
|
|
20687
20687
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20688
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20688
|
+
swarm$1.loggerService.log(METHOD_NAME$Q, {
|
|
20689
20689
|
content,
|
|
20690
20690
|
clientId,
|
|
20691
20691
|
agentName,
|
|
20692
20692
|
});
|
|
20693
20693
|
// Validate the agent exists
|
|
20694
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
20694
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$Q);
|
|
20695
20695
|
// Validate the session exists and retrieve the associated swarm
|
|
20696
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
20696
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$Q);
|
|
20697
20697
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
20698
20698
|
// Validate the swarm configuration
|
|
20699
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
20699
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$Q);
|
|
20700
20700
|
// Check if the current agent matches the provided agent
|
|
20701
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
20701
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$Q, clientId, swarmName);
|
|
20702
20702
|
if (currentAgentName !== agentName) {
|
|
20703
20703
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20704
20704
|
swarm$1.loggerService.log('function "commitSystemMessage" skipped due to the agent change', {
|
|
@@ -20709,7 +20709,7 @@ const commitSystemMessageInternal = beginContext(async (content, clientId, agent
|
|
|
20709
20709
|
return;
|
|
20710
20710
|
}
|
|
20711
20711
|
// Commit the system message via SessionPublicService
|
|
20712
|
-
await swarm$1.sessionPublicService.commitSystemMessage(content, METHOD_NAME$
|
|
20712
|
+
await swarm$1.sessionPublicService.commitSystemMessage(content, METHOD_NAME$Q, clientId, swarmName);
|
|
20713
20713
|
});
|
|
20714
20714
|
/**
|
|
20715
20715
|
* Commits a system-generated message to the active agent in the swarm system.
|
|
@@ -20730,26 +20730,26 @@ async function commitSystemMessage(content, clientId, agentName) {
|
|
|
20730
20730
|
return await commitSystemMessageInternal(content, clientId, agentName);
|
|
20731
20731
|
}
|
|
20732
20732
|
|
|
20733
|
-
const METHOD_NAME$
|
|
20733
|
+
const METHOD_NAME$P = "function.commit.commitSystemMessage";
|
|
20734
20734
|
/**
|
|
20735
20735
|
* Function implementation
|
|
20736
20736
|
*/
|
|
20737
20737
|
const commitUserMessageInternal = beginContext(async (content, mode, clientId, agentName, payload) => {
|
|
20738
20738
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
20739
20739
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20740
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20740
|
+
swarm$1.loggerService.log(METHOD_NAME$P, {
|
|
20741
20741
|
content,
|
|
20742
20742
|
clientId,
|
|
20743
20743
|
agentName,
|
|
20744
20744
|
mode,
|
|
20745
20745
|
});
|
|
20746
20746
|
// Validate the agent, session, and swarm to ensure they exist and are accessible
|
|
20747
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
20748
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
20747
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$P);
|
|
20748
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$P);
|
|
20749
20749
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
20750
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
20750
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$P);
|
|
20751
20751
|
// Check if the specified agent is still the active agent in the swarm session
|
|
20752
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
20752
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$P, clientId, swarmName);
|
|
20753
20753
|
if (currentAgentName !== agentName) {
|
|
20754
20754
|
// Log a skip message if the agent has changed during the operation
|
|
20755
20755
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
@@ -20762,14 +20762,14 @@ const commitUserMessageInternal = beginContext(async (content, mode, clientId, a
|
|
|
20762
20762
|
}
|
|
20763
20763
|
if (payload) {
|
|
20764
20764
|
return await PayloadContextService.runInContext(async () => {
|
|
20765
|
-
await swarm$1.sessionPublicService.commitUserMessage(content, mode, METHOD_NAME$
|
|
20765
|
+
await swarm$1.sessionPublicService.commitUserMessage(content, mode, METHOD_NAME$P, clientId, swarmName);
|
|
20766
20766
|
}, {
|
|
20767
20767
|
clientId,
|
|
20768
20768
|
payload,
|
|
20769
20769
|
});
|
|
20770
20770
|
}
|
|
20771
20771
|
// Commit the user message to the agent's history via the session public service
|
|
20772
|
-
return await swarm$1.sessionPublicService.commitUserMessage(content, mode, METHOD_NAME$
|
|
20772
|
+
return await swarm$1.sessionPublicService.commitUserMessage(content, mode, METHOD_NAME$P, clientId, swarmName);
|
|
20773
20773
|
});
|
|
20774
20774
|
/**
|
|
20775
20775
|
* Commits a user message to the active agent's history in a swarm session without triggering a response.
|
|
@@ -20791,24 +20791,24 @@ async function commitUserMessage(content, mode, clientId, agentName, payload) {
|
|
|
20791
20791
|
}
|
|
20792
20792
|
|
|
20793
20793
|
/** @private Constant defining the method name for logging and validation context */
|
|
20794
|
-
const METHOD_NAME$
|
|
20794
|
+
const METHOD_NAME$O = "function.commit.commitSystemMessageForce";
|
|
20795
20795
|
/**
|
|
20796
20796
|
* Function implementation
|
|
20797
20797
|
*/
|
|
20798
20798
|
const commitSystemMessageForceInternal = beginContext(async (content, clientId) => {
|
|
20799
20799
|
// Log the commit attempt if enabled
|
|
20800
20800
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20801
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20801
|
+
swarm$1.loggerService.log(METHOD_NAME$O, {
|
|
20802
20802
|
content,
|
|
20803
20803
|
clientId,
|
|
20804
20804
|
});
|
|
20805
20805
|
// Validate the session exists and retrieve the associated swarm
|
|
20806
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
20806
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$O);
|
|
20807
20807
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
20808
20808
|
// Validate the swarm configuration
|
|
20809
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
20809
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$O);
|
|
20810
20810
|
// Commit the system message via SessionPublicService without agent checks
|
|
20811
|
-
await swarm$1.sessionPublicService.commitSystemMessage(content, METHOD_NAME$
|
|
20811
|
+
await swarm$1.sessionPublicService.commitSystemMessage(content, METHOD_NAME$O, clientId, swarmName);
|
|
20812
20812
|
});
|
|
20813
20813
|
/**
|
|
20814
20814
|
* Forcefully commits a system-generated message to a session in the swarm system, without checking the active agent.
|
|
@@ -20829,32 +20829,32 @@ async function commitSystemMessageForce(content, clientId) {
|
|
|
20829
20829
|
return await commitSystemMessageForceInternal(content, clientId);
|
|
20830
20830
|
}
|
|
20831
20831
|
|
|
20832
|
-
const METHOD_NAME$
|
|
20832
|
+
const METHOD_NAME$N = "function.commit.commitSystemMessage";
|
|
20833
20833
|
/**
|
|
20834
20834
|
* Function implementation
|
|
20835
20835
|
*/
|
|
20836
20836
|
const commitUserMessageForceInternal = beginContext(async (content, mode, clientId, payload) => {
|
|
20837
20837
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
20838
20838
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20839
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20839
|
+
swarm$1.loggerService.log(METHOD_NAME$N, {
|
|
20840
20840
|
content,
|
|
20841
20841
|
clientId,
|
|
20842
20842
|
mode,
|
|
20843
20843
|
});
|
|
20844
20844
|
// Validate the session and swarm to ensure they exist and are accessible
|
|
20845
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
20845
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$N);
|
|
20846
20846
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
20847
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
20847
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$N);
|
|
20848
20848
|
if (payload) {
|
|
20849
20849
|
return await PayloadContextService.runInContext(async () => {
|
|
20850
|
-
await swarm$1.sessionPublicService.commitUserMessage(content, mode, METHOD_NAME$
|
|
20850
|
+
await swarm$1.sessionPublicService.commitUserMessage(content, mode, METHOD_NAME$N, clientId, swarmName);
|
|
20851
20851
|
}, {
|
|
20852
20852
|
clientId,
|
|
20853
20853
|
payload,
|
|
20854
20854
|
});
|
|
20855
20855
|
}
|
|
20856
20856
|
// Commit the user message to the agent's history via the session public service without checking the active agent
|
|
20857
|
-
return await swarm$1.sessionPublicService.commitUserMessage(content, mode, METHOD_NAME$
|
|
20857
|
+
return await swarm$1.sessionPublicService.commitUserMessage(content, mode, METHOD_NAME$N, clientId, swarmName);
|
|
20858
20858
|
});
|
|
20859
20859
|
/**
|
|
20860
20860
|
* Commits a user message to the active agent's history in a swarm session without triggering a response and without checking the active agent.
|
|
@@ -20875,27 +20875,27 @@ async function commitUserMessageForce(content, mode, clientId, payload) {
|
|
|
20875
20875
|
}
|
|
20876
20876
|
|
|
20877
20877
|
/** @private Constant defining the method name for logging and validation context */
|
|
20878
|
-
const METHOD_NAME$
|
|
20878
|
+
const METHOD_NAME$M = "function.commit.commitAssistantMessage";
|
|
20879
20879
|
/**
|
|
20880
20880
|
* Function implementation
|
|
20881
20881
|
*/
|
|
20882
20882
|
const commitAssistantMessageInternal = beginContext(async (content, clientId, agentName) => {
|
|
20883
20883
|
// Log the commit attempt if enabled
|
|
20884
20884
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20885
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20885
|
+
swarm$1.loggerService.log(METHOD_NAME$M, {
|
|
20886
20886
|
content,
|
|
20887
20887
|
clientId,
|
|
20888
20888
|
agentName,
|
|
20889
20889
|
});
|
|
20890
20890
|
// Validate the agent exists
|
|
20891
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
20891
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$M);
|
|
20892
20892
|
// Validate the session exists and retrieve the associated swarm
|
|
20893
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
20893
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$M);
|
|
20894
20894
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
20895
20895
|
// Validate the swarm configuration
|
|
20896
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
20896
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$M);
|
|
20897
20897
|
// Check if the current agent matches the provided agent
|
|
20898
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
20898
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$M, clientId, swarmName);
|
|
20899
20899
|
if (currentAgentName !== agentName) {
|
|
20900
20900
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20901
20901
|
swarm$1.loggerService.log('function "commitAssistantMessage" skipped due to the agent change', {
|
|
@@ -20906,7 +20906,7 @@ const commitAssistantMessageInternal = beginContext(async (content, clientId, ag
|
|
|
20906
20906
|
return;
|
|
20907
20907
|
}
|
|
20908
20908
|
// Commit the assistant message via SessionPublicService
|
|
20909
|
-
await swarm$1.sessionPublicService.commitAssistantMessage(content, METHOD_NAME$
|
|
20909
|
+
await swarm$1.sessionPublicService.commitAssistantMessage(content, METHOD_NAME$M, clientId, swarmName);
|
|
20910
20910
|
});
|
|
20911
20911
|
/**
|
|
20912
20912
|
* Commits an assistant-generated message to the active agent in the swarm system.
|
|
@@ -20927,24 +20927,24 @@ async function commitAssistantMessage(content, clientId, agentName) {
|
|
|
20927
20927
|
}
|
|
20928
20928
|
|
|
20929
20929
|
/** @private Constant defining the method name for logging and validation context */
|
|
20930
|
-
const METHOD_NAME$
|
|
20930
|
+
const METHOD_NAME$L = "function.commit.commitAssistantMessageForce";
|
|
20931
20931
|
/**
|
|
20932
20932
|
* Function implementation
|
|
20933
20933
|
*/
|
|
20934
20934
|
const commitAssistantMessageForceInternal = beginContext(async (content, clientId) => {
|
|
20935
20935
|
// Log the commit attempt if enabled
|
|
20936
20936
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20937
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20937
|
+
swarm$1.loggerService.log(METHOD_NAME$L, {
|
|
20938
20938
|
content,
|
|
20939
20939
|
clientId,
|
|
20940
20940
|
});
|
|
20941
20941
|
// Validate the session exists and retrieve the associated swarm
|
|
20942
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
20942
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$L);
|
|
20943
20943
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
20944
20944
|
// Validate the swarm configuration
|
|
20945
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
20945
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$L);
|
|
20946
20946
|
// Commit the assistant message via SessionPublicService without agent checks
|
|
20947
|
-
await swarm$1.sessionPublicService.commitAssistantMessage(content, METHOD_NAME$
|
|
20947
|
+
await swarm$1.sessionPublicService.commitAssistantMessage(content, METHOD_NAME$L, clientId, swarmName);
|
|
20948
20948
|
});
|
|
20949
20949
|
/**
|
|
20950
20950
|
* Forcefully commits an assistant-generated message to a session in the swarm system, without checking the active agent.
|
|
@@ -20966,26 +20966,26 @@ async function commitAssistantMessageForce(content, clientId) {
|
|
|
20966
20966
|
}
|
|
20967
20967
|
|
|
20968
20968
|
/** @private Constant defining the method name for logging and validation context */
|
|
20969
|
-
const METHOD_NAME$
|
|
20969
|
+
const METHOD_NAME$K = "function.commit.cancelOutput";
|
|
20970
20970
|
/**
|
|
20971
20971
|
* Function implementation
|
|
20972
20972
|
*/
|
|
20973
20973
|
const cancelOutputInternal = beginContext(async (clientId, agentName) => {
|
|
20974
20974
|
// Log the cancellation attempt if enabled
|
|
20975
20975
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20976
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
20976
|
+
swarm$1.loggerService.log(METHOD_NAME$K, {
|
|
20977
20977
|
clientId,
|
|
20978
20978
|
agentName,
|
|
20979
20979
|
});
|
|
20980
20980
|
// Validate the agent exists
|
|
20981
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
20981
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$K);
|
|
20982
20982
|
// Validate the session exists and retrieve the associated swarm
|
|
20983
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
20983
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$K);
|
|
20984
20984
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
20985
20985
|
// Validate the swarm configuration
|
|
20986
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
20986
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$K);
|
|
20987
20987
|
// Check if the current agent matches the provided agent
|
|
20988
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
20988
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$K, clientId, swarmName);
|
|
20989
20989
|
if (currentAgentName !== agentName) {
|
|
20990
20990
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20991
20991
|
swarm$1.loggerService.log('function "cancelOutput" skipped due to the agent change', {
|
|
@@ -20996,7 +20996,7 @@ const cancelOutputInternal = beginContext(async (clientId, agentName) => {
|
|
|
20996
20996
|
return;
|
|
20997
20997
|
}
|
|
20998
20998
|
// Perform the output cancellation via SwarmPublicService
|
|
20999
|
-
await swarm$1.swarmPublicService.cancelOutput(METHOD_NAME$
|
|
20999
|
+
await swarm$1.swarmPublicService.cancelOutput(METHOD_NAME$K, clientId, swarmName);
|
|
21000
21000
|
});
|
|
21001
21001
|
/**
|
|
21002
21002
|
* Cancels the awaited output for a specific client and agent by emitting an empty string.
|
|
@@ -21015,23 +21015,23 @@ async function cancelOutput(clientId, agentName) {
|
|
|
21015
21015
|
}
|
|
21016
21016
|
|
|
21017
21017
|
/** @private Constant defining the method name for logging and validation context */
|
|
21018
|
-
const METHOD_NAME$
|
|
21018
|
+
const METHOD_NAME$J = "function.commit.cancelOutputForce";
|
|
21019
21019
|
/**
|
|
21020
21020
|
* Function implementation
|
|
21021
21021
|
*/
|
|
21022
21022
|
const cancelOutputForceInternal = beginContext(async (clientId) => {
|
|
21023
21023
|
// Log the cancellation attempt if enabled
|
|
21024
21024
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21025
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21025
|
+
swarm$1.loggerService.log(METHOD_NAME$J, {
|
|
21026
21026
|
clientId,
|
|
21027
21027
|
});
|
|
21028
21028
|
// Validate the session exists and retrieve the associated swarm
|
|
21029
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
21029
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$J);
|
|
21030
21030
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
21031
21031
|
// Validate the swarm configuration
|
|
21032
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
21032
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$J);
|
|
21033
21033
|
// Perform the output cancellation via SwarmPublicService without agent checks
|
|
21034
|
-
await swarm$1.swarmPublicService.cancelOutput(METHOD_NAME$
|
|
21034
|
+
await swarm$1.swarmPublicService.cancelOutput(METHOD_NAME$J, clientId, swarmName);
|
|
21035
21035
|
});
|
|
21036
21036
|
/**
|
|
21037
21037
|
* Forcefully cancels the awaited output for a specific client by emitting an empty string, without checking the active agent.
|
|
@@ -21050,22 +21050,22 @@ async function cancelOutputForce(clientId) {
|
|
|
21050
21050
|
return await cancelOutputForceInternal(clientId);
|
|
21051
21051
|
}
|
|
21052
21052
|
|
|
21053
|
-
const METHOD_NAME$
|
|
21053
|
+
const METHOD_NAME$I = "function.commit.commitToolRequest";
|
|
21054
21054
|
/**
|
|
21055
21055
|
* Function implementation
|
|
21056
21056
|
*/
|
|
21057
21057
|
const commitToolRequestInternal = beginContext(async (request, clientId, agentName) => {
|
|
21058
21058
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21059
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21059
|
+
swarm$1.loggerService.log(METHOD_NAME$I, {
|
|
21060
21060
|
request,
|
|
21061
21061
|
clientId,
|
|
21062
21062
|
agentName,
|
|
21063
21063
|
});
|
|
21064
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
21065
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
21064
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$I);
|
|
21065
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$I);
|
|
21066
21066
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
21067
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
21068
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
21067
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$I);
|
|
21068
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$I, clientId, swarmName);
|
|
21069
21069
|
if (currentAgentName !== agentName) {
|
|
21070
21070
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21071
21071
|
swarm$1.loggerService.log('function "commitToolRequest" skipped due to the agent change', {
|
|
@@ -21075,7 +21075,7 @@ const commitToolRequestInternal = beginContext(async (request, clientId, agentNa
|
|
|
21075
21075
|
});
|
|
21076
21076
|
return null;
|
|
21077
21077
|
}
|
|
21078
|
-
return await swarm$1.sessionPublicService.commitToolRequest(Array.isArray(request) ? request : [request], METHOD_NAME$
|
|
21078
|
+
return await swarm$1.sessionPublicService.commitToolRequest(Array.isArray(request) ? request : [request], METHOD_NAME$I, clientId, swarmName);
|
|
21079
21079
|
});
|
|
21080
21080
|
/**
|
|
21081
21081
|
* Commits a tool request to the active agent in the swarm system.
|
|
@@ -21091,21 +21091,21 @@ async function commitToolRequest(request, clientId, agentName) {
|
|
|
21091
21091
|
return await commitToolRequestInternal(request, clientId, agentName);
|
|
21092
21092
|
}
|
|
21093
21093
|
|
|
21094
|
-
const METHOD_NAME$
|
|
21094
|
+
const METHOD_NAME$H = "function.commit.commitToolRequestForce";
|
|
21095
21095
|
/**
|
|
21096
21096
|
* Function implementation
|
|
21097
21097
|
*/
|
|
21098
21098
|
const commitToolRequestForceInternal = beginContext(async (request, clientId) => {
|
|
21099
21099
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21100
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21100
|
+
swarm$1.loggerService.log(METHOD_NAME$H, {
|
|
21101
21101
|
request,
|
|
21102
21102
|
clientId,
|
|
21103
21103
|
});
|
|
21104
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
21104
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$H);
|
|
21105
21105
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
21106
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
21106
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$H);
|
|
21107
21107
|
const requests = Array.isArray(request) ? request : [request];
|
|
21108
|
-
return await swarm$1.sessionPublicService.commitToolRequest(requests, METHOD_NAME$
|
|
21108
|
+
return await swarm$1.sessionPublicService.commitToolRequest(requests, METHOD_NAME$H, clientId, swarmName);
|
|
21109
21109
|
});
|
|
21110
21110
|
/**
|
|
21111
21111
|
* Forcefully commits a tool request to the active agent in the swarm system.
|
|
@@ -21122,27 +21122,27 @@ async function commitToolRequestForce(request, clientId) {
|
|
|
21122
21122
|
}
|
|
21123
21123
|
|
|
21124
21124
|
/** @constant {string} METHOD_NAME - The name of the method used for logging and validation */
|
|
21125
|
-
const METHOD_NAME$
|
|
21125
|
+
const METHOD_NAME$G = "function.target.question";
|
|
21126
21126
|
/**
|
|
21127
21127
|
* Function implementation
|
|
21128
21128
|
*/
|
|
21129
21129
|
const questionInternal = beginContext(async (message, clientId, agentName, wikiName) => {
|
|
21130
21130
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21131
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21131
|
+
swarm$1.loggerService.log(METHOD_NAME$G, {
|
|
21132
21132
|
message,
|
|
21133
21133
|
clientId,
|
|
21134
21134
|
agentName,
|
|
21135
21135
|
wikiName,
|
|
21136
21136
|
});
|
|
21137
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
21138
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
21137
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$G);
|
|
21138
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$G);
|
|
21139
21139
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
21140
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
21141
|
-
swarm$1.wikiValidationService.validate(wikiName, METHOD_NAME$
|
|
21140
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$G);
|
|
21141
|
+
swarm$1.wikiValidationService.validate(wikiName, METHOD_NAME$G);
|
|
21142
21142
|
if (!swarm$1.agentValidationService.hasWiki(agentName, wikiName)) {
|
|
21143
|
-
throw new Error(`agent-swarm ${METHOD_NAME$
|
|
21143
|
+
throw new Error(`agent-swarm ${METHOD_NAME$G} ${wikiName} not registered in ${agentName}`);
|
|
21144
21144
|
}
|
|
21145
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
21145
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$G, clientId, swarmName);
|
|
21146
21146
|
if (currentAgentName !== agentName) {
|
|
21147
21147
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21148
21148
|
swarm$1.loggerService.log('function "question" skipped due to the agent change', {
|
|
@@ -21177,23 +21177,23 @@ async function question(message, clientId, agentName, wikiName) {
|
|
|
21177
21177
|
}
|
|
21178
21178
|
|
|
21179
21179
|
/** @constant {string} METHOD_NAME - The name of the method used for logging and validation */
|
|
21180
|
-
const METHOD_NAME$
|
|
21180
|
+
const METHOD_NAME$F = "function.target.questionForce";
|
|
21181
21181
|
/**
|
|
21182
21182
|
* Function implementation
|
|
21183
21183
|
*/
|
|
21184
21184
|
const questionForceInternal = beginContext(async (message, clientId, wikiName) => {
|
|
21185
21185
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21186
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21186
|
+
swarm$1.loggerService.log(METHOD_NAME$F, {
|
|
21187
21187
|
message,
|
|
21188
21188
|
clientId,
|
|
21189
21189
|
wikiName,
|
|
21190
21190
|
});
|
|
21191
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
21191
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$F);
|
|
21192
21192
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
21193
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
21194
|
-
swarm$1.wikiValidationService.validate(wikiName, METHOD_NAME$
|
|
21193
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$F);
|
|
21194
|
+
swarm$1.wikiValidationService.validate(wikiName, METHOD_NAME$F);
|
|
21195
21195
|
const { getChat, callbacks } = swarm$1.wikiSchemaService.get(wikiName);
|
|
21196
|
-
const agentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
21196
|
+
const agentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$F, clientId, swarmName);
|
|
21197
21197
|
const args = {
|
|
21198
21198
|
clientId,
|
|
21199
21199
|
message,
|
|
@@ -21216,7 +21216,7 @@ async function questionForce(message, clientId, wikiName) {
|
|
|
21216
21216
|
return await questionForceInternal(message, clientId, wikiName);
|
|
21217
21217
|
}
|
|
21218
21218
|
|
|
21219
|
-
const METHOD_NAME$
|
|
21219
|
+
const METHOD_NAME$E = "function.target.json";
|
|
21220
21220
|
const MAX_ATTEMPTS = 5;
|
|
21221
21221
|
/**
|
|
21222
21222
|
* A class implementing the IOutlineHistory interface to manage a history of outline messages.
|
|
@@ -21267,11 +21267,11 @@ class OutlineHistory {
|
|
|
21267
21267
|
*/
|
|
21268
21268
|
const jsonInternal = beginContext(async (outlineName, param) => {
|
|
21269
21269
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21270
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21271
|
-
swarm$1.outlineValidationService.validate(outlineName, METHOD_NAME$
|
|
21270
|
+
swarm$1.loggerService.log(METHOD_NAME$E, {});
|
|
21271
|
+
swarm$1.outlineValidationService.validate(outlineName, METHOD_NAME$E);
|
|
21272
21272
|
const resultId = functoolsKit.randomString();
|
|
21273
21273
|
const { getOutlineHistory, completion, validations = [], maxAttempts = MAX_ATTEMPTS, format, prompt, system, callbacks: outlineCallbacks, } = swarm$1.outlineSchemaService.get(outlineName);
|
|
21274
|
-
swarm$1.completionValidationService.validate(completion, METHOD_NAME$
|
|
21274
|
+
swarm$1.completionValidationService.validate(completion, METHOD_NAME$E);
|
|
21275
21275
|
const { getCompletion, flags = [], callbacks: completionCallbacks, } = swarm$1.completionSchemaService.get(completion);
|
|
21276
21276
|
let errorMessage = "";
|
|
21277
21277
|
let history;
|
|
@@ -21387,7 +21387,7 @@ async function json(outlineName, param = {}) {
|
|
|
21387
21387
|
return await jsonInternal(outlineName, param);
|
|
21388
21388
|
}
|
|
21389
21389
|
|
|
21390
|
-
const METHOD_NAME$
|
|
21390
|
+
const METHOD_NAME$D = "function.target.disposeConnection";
|
|
21391
21391
|
/**
|
|
21392
21392
|
* Disposes of a client session and all related resources within a swarm.
|
|
21393
21393
|
*
|
|
@@ -21404,10 +21404,10 @@ const METHOD_NAME$C = "function.target.disposeConnection";
|
|
|
21404
21404
|
* @example
|
|
21405
21405
|
* await disposeConnection("client-123", "TaskSwarm");
|
|
21406
21406
|
*/
|
|
21407
|
-
const disposeConnection = beginContext(async (clientId, swarmName, methodName = METHOD_NAME$
|
|
21407
|
+
const disposeConnection = beginContext(async (clientId, swarmName, methodName = METHOD_NAME$D) => {
|
|
21408
21408
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
21409
21409
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21410
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21410
|
+
swarm$1.loggerService.log(METHOD_NAME$D, {
|
|
21411
21411
|
clientId,
|
|
21412
21412
|
swarmName,
|
|
21413
21413
|
});
|
|
@@ -21513,7 +21513,7 @@ const disposeConnection = beginContext(async (clientId, swarmName, methodName =
|
|
|
21513
21513
|
PersistMemoryAdapter.dispose(clientId);
|
|
21514
21514
|
});
|
|
21515
21515
|
|
|
21516
|
-
const METHOD_NAME$
|
|
21516
|
+
const METHOD_NAME$C = "function.target.makeAutoDispose";
|
|
21517
21517
|
/**
|
|
21518
21518
|
* Default timeout in seconds before auto-dispose is triggered.
|
|
21519
21519
|
* @constant {number}
|
|
@@ -21544,7 +21544,7 @@ const DEFAULT_TIMEOUT = 15 * 60;
|
|
|
21544
21544
|
const makeAutoDispose = beginContext((clientId, swarmName, { timeoutSeconds = DEFAULT_TIMEOUT, onDestroy, } = {}) => {
|
|
21545
21545
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
21546
21546
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21547
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21547
|
+
swarm$1.loggerService.log(METHOD_NAME$C, {
|
|
21548
21548
|
clientId,
|
|
21549
21549
|
swarmName,
|
|
21550
21550
|
});
|
|
@@ -21577,30 +21577,30 @@ const makeAutoDispose = beginContext((clientId, swarmName, { timeoutSeconds = DE
|
|
|
21577
21577
|
};
|
|
21578
21578
|
});
|
|
21579
21579
|
|
|
21580
|
-
const METHOD_NAME$
|
|
21580
|
+
const METHOD_NAME$B = "function.target.notify";
|
|
21581
21581
|
/**
|
|
21582
21582
|
* Function implementation
|
|
21583
21583
|
*/
|
|
21584
21584
|
const notifyInternal = beginContext(async (content, clientId, agentName) => {
|
|
21585
21585
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
21586
21586
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21587
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21587
|
+
swarm$1.loggerService.log(METHOD_NAME$B, {
|
|
21588
21588
|
content,
|
|
21589
21589
|
clientId,
|
|
21590
21590
|
agentName,
|
|
21591
21591
|
});
|
|
21592
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
21592
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$B);
|
|
21593
21593
|
// Check if the session mode is "makeConnection"
|
|
21594
21594
|
if (swarm$1.sessionValidationService.getSessionMode(clientId) !==
|
|
21595
21595
|
"makeConnection") {
|
|
21596
21596
|
throw new Error(`agent-swarm-kit notify session is not makeConnection clientId=${clientId}`);
|
|
21597
21597
|
}
|
|
21598
21598
|
// Validate the agent, session, and swarm
|
|
21599
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
21599
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$B);
|
|
21600
21600
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
21601
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
21601
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$B);
|
|
21602
21602
|
// Check if the specified agent is still the active agent
|
|
21603
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
21603
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$B, clientId, swarmName);
|
|
21604
21604
|
if (currentAgentName !== agentName) {
|
|
21605
21605
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21606
21606
|
swarm$1.loggerService.log('function "notify" skipped due to the agent change', {
|
|
@@ -21611,7 +21611,7 @@ const notifyInternal = beginContext(async (content, clientId, agentName) => {
|
|
|
21611
21611
|
return;
|
|
21612
21612
|
}
|
|
21613
21613
|
// Notify the content directly via the session public service
|
|
21614
|
-
return await swarm$1.sessionPublicService.notify(content, METHOD_NAME$
|
|
21614
|
+
return await swarm$1.sessionPublicService.notify(content, METHOD_NAME$B, clientId, swarmName);
|
|
21615
21615
|
});
|
|
21616
21616
|
/**
|
|
21617
21617
|
* Sends a notification message as output from the swarm session without executing an incoming message.
|
|
@@ -21633,18 +21633,18 @@ async function notify(content, clientId, agentName) {
|
|
|
21633
21633
|
return await notifyInternal(content, clientId, agentName);
|
|
21634
21634
|
}
|
|
21635
21635
|
|
|
21636
|
-
const METHOD_NAME$
|
|
21636
|
+
const METHOD_NAME$A = "function.target.notifyForce";
|
|
21637
21637
|
/**
|
|
21638
21638
|
* Function implementation
|
|
21639
21639
|
*/
|
|
21640
21640
|
const notifyForceInternal = beginContext(async (content, clientId) => {
|
|
21641
21641
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
21642
21642
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21643
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21643
|
+
swarm$1.loggerService.log(METHOD_NAME$A, {
|
|
21644
21644
|
content,
|
|
21645
21645
|
clientId,
|
|
21646
21646
|
});
|
|
21647
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
21647
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$A);
|
|
21648
21648
|
// Check if the session mode is "makeConnection"
|
|
21649
21649
|
if (swarm$1.sessionValidationService.getSessionMode(clientId) !==
|
|
21650
21650
|
"makeConnection") {
|
|
@@ -21652,9 +21652,9 @@ const notifyForceInternal = beginContext(async (content, clientId) => {
|
|
|
21652
21652
|
}
|
|
21653
21653
|
// Validate the agent, session, and swarm
|
|
21654
21654
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
21655
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
21655
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$A);
|
|
21656
21656
|
// Notify the content directly via the session public service
|
|
21657
|
-
return await swarm$1.sessionPublicService.notify(content, METHOD_NAME$
|
|
21657
|
+
return await swarm$1.sessionPublicService.notify(content, METHOD_NAME$A, clientId, swarmName);
|
|
21658
21658
|
});
|
|
21659
21659
|
/**
|
|
21660
21660
|
* Sends a notification message as output from the swarm session without executing an incoming message.
|
|
@@ -21675,7 +21675,7 @@ async function notifyForce(content, clientId) {
|
|
|
21675
21675
|
return await notifyForceInternal(content, clientId);
|
|
21676
21676
|
}
|
|
21677
21677
|
|
|
21678
|
-
const METHOD_NAME$
|
|
21678
|
+
const METHOD_NAME$z = "function.target.runStateless";
|
|
21679
21679
|
/**
|
|
21680
21680
|
* Function implementation
|
|
21681
21681
|
*/
|
|
@@ -21683,19 +21683,19 @@ const runStatelessInternal = beginContext(async (content, clientId, agentName) =
|
|
|
21683
21683
|
const executionId = functoolsKit.randomString();
|
|
21684
21684
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
21685
21685
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21686
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21686
|
+
swarm$1.loggerService.log(METHOD_NAME$z, {
|
|
21687
21687
|
content,
|
|
21688
21688
|
clientId,
|
|
21689
21689
|
agentName,
|
|
21690
21690
|
executionId,
|
|
21691
21691
|
});
|
|
21692
21692
|
// Validate the agent, session, and swarm
|
|
21693
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
21694
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
21693
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$z);
|
|
21694
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$z);
|
|
21695
21695
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
21696
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
21696
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$z);
|
|
21697
21697
|
// Check if the specified agent is still the active agent
|
|
21698
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
21698
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$z, clientId, swarmName);
|
|
21699
21699
|
if (currentAgentName !== agentName) {
|
|
21700
21700
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21701
21701
|
swarm$1.loggerService.log('function "runStateless" skipped due to the agent change', {
|
|
@@ -21714,7 +21714,7 @@ const runStatelessInternal = beginContext(async (content, clientId, agentName) =
|
|
|
21714
21714
|
agentName,
|
|
21715
21715
|
swarmName,
|
|
21716
21716
|
});
|
|
21717
|
-
const result = await swarm$1.sessionPublicService.run(content, METHOD_NAME$
|
|
21717
|
+
const result = await swarm$1.sessionPublicService.run(content, METHOD_NAME$z, clientId, swarmName);
|
|
21718
21718
|
isFinished = swarm$1.perfService.endExecution(executionId, clientId, result.length);
|
|
21719
21719
|
swarm$1.busService.commitExecutionEnd(clientId, {
|
|
21720
21720
|
agentName,
|
|
@@ -21756,7 +21756,7 @@ async function runStateless(content, clientId, agentName) {
|
|
|
21756
21756
|
return await runStatelessInternal(content, clientId, agentName);
|
|
21757
21757
|
}
|
|
21758
21758
|
|
|
21759
|
-
const METHOD_NAME$
|
|
21759
|
+
const METHOD_NAME$y = "function.target.runStatelessForce";
|
|
21760
21760
|
/**
|
|
21761
21761
|
* Function implementation
|
|
21762
21762
|
*/
|
|
@@ -21764,22 +21764,22 @@ const runStatelessForceInternal = beginContext(async (content, clientId) => {
|
|
|
21764
21764
|
const executionId = functoolsKit.randomString();
|
|
21765
21765
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
21766
21766
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21767
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21767
|
+
swarm$1.loggerService.log(METHOD_NAME$y, {
|
|
21768
21768
|
content,
|
|
21769
21769
|
clientId,
|
|
21770
21770
|
executionId,
|
|
21771
21771
|
});
|
|
21772
21772
|
// Validate the session and swarm
|
|
21773
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
21773
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$y);
|
|
21774
21774
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
21775
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
21775
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$y);
|
|
21776
21776
|
// Execute the command statelessly within an execution context with performance tracking
|
|
21777
21777
|
return ExecutionContextService.runInContext(async () => {
|
|
21778
21778
|
let isFinished = false;
|
|
21779
21779
|
swarm$1.perfService.startExecution(executionId, clientId, content.length);
|
|
21780
21780
|
try {
|
|
21781
21781
|
swarm$1.busService.commitExecutionBegin(clientId, { swarmName });
|
|
21782
|
-
const result = await swarm$1.sessionPublicService.run(content, METHOD_NAME$
|
|
21782
|
+
const result = await swarm$1.sessionPublicService.run(content, METHOD_NAME$y, clientId, swarmName);
|
|
21783
21783
|
isFinished = swarm$1.perfService.endExecution(executionId, clientId, result.length);
|
|
21784
21784
|
swarm$1.busService.commitExecutionEnd(clientId, { swarmName });
|
|
21785
21785
|
return result;
|
|
@@ -21826,7 +21826,7 @@ const SCHEDULED_DELAY$1 = 1000;
|
|
|
21826
21826
|
* @constant {number}
|
|
21827
21827
|
*/
|
|
21828
21828
|
const RATE_DELAY = 10000;
|
|
21829
|
-
const METHOD_NAME$
|
|
21829
|
+
const METHOD_NAME$x = "function.target.makeConnection";
|
|
21830
21830
|
/**
|
|
21831
21831
|
* Internal implementation of the connection factory for a client to a swarm.
|
|
21832
21832
|
*
|
|
@@ -21841,21 +21841,21 @@ const METHOD_NAME$w = "function.target.makeConnection";
|
|
|
21841
21841
|
const makeConnectionInternal = (connector, clientId, swarmName) => {
|
|
21842
21842
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
21843
21843
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
21844
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
21844
|
+
swarm$1.loggerService.log(METHOD_NAME$x, {
|
|
21845
21845
|
clientId,
|
|
21846
21846
|
swarmName,
|
|
21847
21847
|
});
|
|
21848
21848
|
// Validate the swarm and initialize the session
|
|
21849
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
21849
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$x);
|
|
21850
21850
|
swarm$1.sessionValidationService.addSession(clientId, swarmName, "makeConnection");
|
|
21851
21851
|
// Create a queued send function using the session public service
|
|
21852
|
-
const send = functoolsKit.queued(swarm$1.sessionPublicService.connect(connector, METHOD_NAME$
|
|
21852
|
+
const send = functoolsKit.queued(swarm$1.sessionPublicService.connect(connector, METHOD_NAME$x, clientId, swarmName));
|
|
21853
21853
|
// Return a wrapped send function with validation and agent context
|
|
21854
21854
|
return (async (outgoing) => {
|
|
21855
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
21855
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$x);
|
|
21856
21856
|
return await send({
|
|
21857
21857
|
data: outgoing,
|
|
21858
|
-
agentName: await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
21858
|
+
agentName: await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$x, clientId, swarmName),
|
|
21859
21859
|
clientId,
|
|
21860
21860
|
});
|
|
21861
21861
|
});
|
|
@@ -21938,13 +21938,13 @@ makeConnection.scheduled = (connector, clientId, swarmName, { delay = SCHEDULED_
|
|
|
21938
21938
|
await online();
|
|
21939
21939
|
if (payload) {
|
|
21940
21940
|
return await PayloadContextService.runInContext(async () => {
|
|
21941
|
-
await swarm$1.sessionPublicService.commitUserMessage(content, "user", METHOD_NAME$
|
|
21941
|
+
await swarm$1.sessionPublicService.commitUserMessage(content, "user", METHOD_NAME$x, clientId, swarmName);
|
|
21942
21942
|
}, {
|
|
21943
21943
|
clientId,
|
|
21944
21944
|
payload,
|
|
21945
21945
|
});
|
|
21946
21946
|
}
|
|
21947
|
-
await swarm$1.sessionPublicService.commitUserMessage(content, "user", METHOD_NAME$
|
|
21947
|
+
await swarm$1.sessionPublicService.commitUserMessage(content, "user", METHOD_NAME$x, clientId, swarmName);
|
|
21948
21948
|
}),
|
|
21949
21949
|
delay,
|
|
21950
21950
|
});
|
|
@@ -22007,7 +22007,7 @@ makeConnection.rate = (connector, clientId, swarmName, { delay = RATE_DELAY } =
|
|
|
22007
22007
|
};
|
|
22008
22008
|
};
|
|
22009
22009
|
|
|
22010
|
-
const METHOD_NAME$
|
|
22010
|
+
const METHOD_NAME$w = "function.target.complete";
|
|
22011
22011
|
/**
|
|
22012
22012
|
* Creates a complete function with time-to-live (TTL) and queuing capabilities.
|
|
22013
22013
|
*
|
|
@@ -22060,7 +22060,7 @@ const complete = beginContext(async (content, clientId, swarmName, payload = nul
|
|
|
22060
22060
|
const executionId = functoolsKit.randomString();
|
|
22061
22061
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
22062
22062
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22063
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22063
|
+
swarm$1.loggerService.log(METHOD_NAME$w, {
|
|
22064
22064
|
content,
|
|
22065
22065
|
clientId,
|
|
22066
22066
|
executionId,
|
|
@@ -22078,7 +22078,7 @@ const complete = beginContext(async (content, clientId, swarmName, payload = nul
|
|
|
22078
22078
|
swarm$1.navigationValidationService.beginMonit(clientId, swarmName);
|
|
22079
22079
|
try {
|
|
22080
22080
|
swarm$1.busService.commitExecutionBegin(clientId, { swarmName });
|
|
22081
|
-
const result = await run(METHOD_NAME$
|
|
22081
|
+
const result = await run(METHOD_NAME$w, content);
|
|
22082
22082
|
isFinished = swarm$1.perfService.endExecution(executionId, clientId, result.length);
|
|
22083
22083
|
swarm$1.busService.commitExecutionEnd(clientId, { swarmName });
|
|
22084
22084
|
return result;
|
|
@@ -22109,7 +22109,7 @@ const complete = beginContext(async (content, clientId, swarmName, payload = nul
|
|
|
22109
22109
|
* @constant {number}
|
|
22110
22110
|
*/
|
|
22111
22111
|
const SCHEDULED_DELAY = 1000;
|
|
22112
|
-
const METHOD_NAME$
|
|
22112
|
+
const METHOD_NAME$v = "function.target.session";
|
|
22113
22113
|
/**
|
|
22114
22114
|
* Internal implementation of the session factory for a client and swarm.
|
|
22115
22115
|
*
|
|
@@ -22124,23 +22124,23 @@ const sessionInternal = (clientId, swarmName, { onDispose = () => { } } = {}) =>
|
|
|
22124
22124
|
const executionId = functoolsKit.randomString();
|
|
22125
22125
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
22126
22126
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22127
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22127
|
+
swarm$1.loggerService.log(METHOD_NAME$v, {
|
|
22128
22128
|
clientId,
|
|
22129
22129
|
swarmName,
|
|
22130
22130
|
executionId,
|
|
22131
22131
|
});
|
|
22132
22132
|
// Validate the swarm and initialize the session
|
|
22133
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
22133
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$v);
|
|
22134
22134
|
swarm$1.sessionValidationService.addSession(clientId, swarmName, "session");
|
|
22135
22135
|
const complete = functoolsKit.queued(async (content) => {
|
|
22136
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
22136
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$v);
|
|
22137
22137
|
return ExecutionContextService.runInContext(async () => {
|
|
22138
22138
|
let isFinished = false;
|
|
22139
22139
|
swarm$1.perfService.startExecution(executionId, clientId, content.length);
|
|
22140
22140
|
swarm$1.navigationValidationService.beginMonit(clientId, swarmName);
|
|
22141
22141
|
try {
|
|
22142
22142
|
swarm$1.busService.commitExecutionBegin(clientId, { swarmName });
|
|
22143
|
-
const result = await swarm$1.sessionPublicService.execute(content, "user", METHOD_NAME$
|
|
22143
|
+
const result = await swarm$1.sessionPublicService.execute(content, "user", METHOD_NAME$v, clientId, swarmName);
|
|
22144
22144
|
isFinished = swarm$1.perfService.endExecution(executionId, clientId, result.length);
|
|
22145
22145
|
swarm$1.busService.commitExecutionEnd(clientId, { swarmName });
|
|
22146
22146
|
return result;
|
|
@@ -22162,7 +22162,7 @@ const sessionInternal = (clientId, swarmName, { onDispose = () => { } } = {}) =>
|
|
|
22162
22162
|
return await complete(content);
|
|
22163
22163
|
}),
|
|
22164
22164
|
dispose: async () => {
|
|
22165
|
-
await disposeConnection(clientId, swarmName, METHOD_NAME$
|
|
22165
|
+
await disposeConnection(clientId, swarmName, METHOD_NAME$v);
|
|
22166
22166
|
await onDispose();
|
|
22167
22167
|
},
|
|
22168
22168
|
};
|
|
@@ -22262,13 +22262,13 @@ session.scheduled = (clientId, swarmName, { delay = SCHEDULED_DELAY, onDispose }
|
|
|
22262
22262
|
await online();
|
|
22263
22263
|
if (payload) {
|
|
22264
22264
|
return await PayloadContextService.runInContext(async () => {
|
|
22265
|
-
return await swarm$1.sessionPublicService.commitUserMessage(content, "user", METHOD_NAME$
|
|
22265
|
+
return await swarm$1.sessionPublicService.commitUserMessage(content, "user", METHOD_NAME$v, clientId, swarmName);
|
|
22266
22266
|
}, {
|
|
22267
22267
|
clientId,
|
|
22268
22268
|
payload,
|
|
22269
22269
|
});
|
|
22270
22270
|
}
|
|
22271
|
-
return await swarm$1.sessionPublicService.commitUserMessage(content, "user", METHOD_NAME$
|
|
22271
|
+
return await swarm$1.sessionPublicService.commitUserMessage(content, "user", METHOD_NAME$v, clientId, swarmName);
|
|
22272
22272
|
}),
|
|
22273
22273
|
delay,
|
|
22274
22274
|
});
|
|
@@ -22356,13 +22356,13 @@ session.rate = (clientId, swarmName, { delay = SCHEDULED_DELAY, onDispose } = {}
|
|
|
22356
22356
|
* @description Method name for the scope operation.
|
|
22357
22357
|
* @private
|
|
22358
22358
|
*/
|
|
22359
|
-
const METHOD_NAME$
|
|
22359
|
+
const METHOD_NAME$u = "function.target.fork";
|
|
22360
22360
|
/**
|
|
22361
22361
|
* Function implementation
|
|
22362
22362
|
*/
|
|
22363
22363
|
const forkInternal = beginContext(async (runFn, { clientId, swarmName, onError }) => {
|
|
22364
22364
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22365
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22365
|
+
swarm$1.loggerService.log(METHOD_NAME$u, {
|
|
22366
22366
|
clientId,
|
|
22367
22367
|
swarmName,
|
|
22368
22368
|
});
|
|
@@ -22370,9 +22370,9 @@ const forkInternal = beginContext(async (runFn, { clientId, swarmName, onError }
|
|
|
22370
22370
|
throw new Error(`agent-swarm scope Session already exists for clientId=${clientId}`);
|
|
22371
22371
|
}
|
|
22372
22372
|
swarm$1.sessionValidationService.addSession(clientId, swarmName, "scope");
|
|
22373
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
22374
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
22375
|
-
const agentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
22373
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$u);
|
|
22374
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$u);
|
|
22375
|
+
const agentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$u, clientId, swarmName);
|
|
22376
22376
|
let result = null;
|
|
22377
22377
|
try {
|
|
22378
22378
|
result = (await runFn(clientId, agentName));
|
|
@@ -22382,7 +22382,7 @@ const forkInternal = beginContext(async (runFn, { clientId, swarmName, onError }
|
|
|
22382
22382
|
onError && onError(error);
|
|
22383
22383
|
}
|
|
22384
22384
|
finally {
|
|
22385
|
-
await disposeConnection(clientId, swarmName, METHOD_NAME$
|
|
22385
|
+
await disposeConnection(clientId, swarmName, METHOD_NAME$u);
|
|
22386
22386
|
}
|
|
22387
22387
|
return result;
|
|
22388
22388
|
});
|
|
@@ -22407,12 +22407,12 @@ async function fork(runFn, options) {
|
|
|
22407
22407
|
* @description Method name for the scope operation.
|
|
22408
22408
|
* @private
|
|
22409
22409
|
*/
|
|
22410
|
-
const METHOD_NAME$
|
|
22410
|
+
const METHOD_NAME$t = "function.target.scope";
|
|
22411
22411
|
/**
|
|
22412
22412
|
* Function implementation
|
|
22413
22413
|
*/
|
|
22414
22414
|
const scopeInternal = beginContext(async (runFn, { agentSchemaService = swarm$1.agentSchemaService.registry, completionSchemaService = swarm$1.completionSchemaService.registry, computeSchemaService = swarm$1.computeSchemaService.registry, embeddingSchemaService = swarm$1.embeddingSchemaService.registry, mcpSchemaService = swarm$1.mcpSchemaService.registry, pipelineSchemaService = swarm$1.pipelineSchemaService.registry, policySchemaService = swarm$1.policySchemaService.registry, stateSchemaService = swarm$1.stateSchemaService.registry, storageSchemaService = swarm$1.storageSchemaService.registry, swarmSchemaService = swarm$1.swarmSchemaService.registry, toolSchemaService = swarm$1.toolSchemaService.registry, wikiSchemaService = swarm$1.wikiSchemaService.registry, outlineSchemaService = swarm$1.outlineSchemaService.registry, } = {}) => {
|
|
22415
|
-
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG && swarm$1.loggerService.log(METHOD_NAME$
|
|
22415
|
+
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG && swarm$1.loggerService.log(METHOD_NAME$t);
|
|
22416
22416
|
return await SchemaContextService.runInContext(runFn, {
|
|
22417
22417
|
registry: {
|
|
22418
22418
|
agentSchemaService,
|
|
@@ -22451,20 +22451,20 @@ async function scope(runFn, options) {
|
|
|
22451
22451
|
* @description Method name for the startPipeline operation.
|
|
22452
22452
|
* @private
|
|
22453
22453
|
*/
|
|
22454
|
-
const METHOD_NAME$
|
|
22454
|
+
const METHOD_NAME$s = "function.target.startPipeline";
|
|
22455
22455
|
/**
|
|
22456
22456
|
* Function implementation
|
|
22457
22457
|
*/
|
|
22458
22458
|
const startPipelineInternal = beginContext(async (clientId, pipelineName, agentName, payload = {}) => {
|
|
22459
22459
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22460
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22460
|
+
swarm$1.loggerService.log(METHOD_NAME$s, {
|
|
22461
22461
|
clientId,
|
|
22462
22462
|
pipelineName,
|
|
22463
22463
|
});
|
|
22464
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
22465
|
-
swarm$1.pipelineValidationService.validate(pipelineName, METHOD_NAME$
|
|
22466
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
22467
|
-
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$
|
|
22464
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$s);
|
|
22465
|
+
swarm$1.pipelineValidationService.validate(pipelineName, METHOD_NAME$s);
|
|
22466
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$s);
|
|
22467
|
+
const currentAgentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$s, clientId, await swarm$1.sessionValidationService.getSwarm(clientId));
|
|
22468
22468
|
if (currentAgentName !== agentName) {
|
|
22469
22469
|
await changeToAgent(agentName, clientId);
|
|
22470
22470
|
}
|
|
@@ -22509,13 +22509,13 @@ async function startPipeline(clientId, pipelineName, agentName, payload) {
|
|
|
22509
22509
|
}
|
|
22510
22510
|
|
|
22511
22511
|
/** @private Constant defining the method name for logging purposes */
|
|
22512
|
-
const METHOD_NAME$
|
|
22512
|
+
const METHOD_NAME$r = "function.common.hasSession";
|
|
22513
22513
|
/**
|
|
22514
22514
|
* Function implementation
|
|
22515
22515
|
*/
|
|
22516
22516
|
const hasSessionInternal = (clientId) => {
|
|
22517
22517
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22518
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22518
|
+
swarm$1.loggerService.log(METHOD_NAME$r, { clientId });
|
|
22519
22519
|
return swarm$1.sessionValidationService.hasSession(clientId);
|
|
22520
22520
|
};
|
|
22521
22521
|
/**
|
|
@@ -22531,22 +22531,22 @@ function hasSession(clientId) {
|
|
|
22531
22531
|
return hasSessionInternal(clientId);
|
|
22532
22532
|
}
|
|
22533
22533
|
|
|
22534
|
-
const METHOD_NAME$
|
|
22534
|
+
const METHOD_NAME$q = "function.common.getCheckBusy";
|
|
22535
22535
|
/**
|
|
22536
22536
|
* Function implementation
|
|
22537
22537
|
*/
|
|
22538
22538
|
const getCheckBusyInternal = beginContext(async (clientId) => {
|
|
22539
22539
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22540
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22540
|
+
swarm$1.loggerService.log(METHOD_NAME$q, {
|
|
22541
22541
|
clientId,
|
|
22542
22542
|
});
|
|
22543
22543
|
if (!swarm$1.sessionValidationService.hasSession(clientId)) {
|
|
22544
22544
|
return false;
|
|
22545
22545
|
}
|
|
22546
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
22546
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$q);
|
|
22547
22547
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
22548
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
22549
|
-
return await swarm$1.swarmPublicService.getCheckBusy(METHOD_NAME$
|
|
22548
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$q);
|
|
22549
|
+
return await swarm$1.swarmPublicService.getCheckBusy(METHOD_NAME$q, clientId, swarmName);
|
|
22550
22550
|
});
|
|
22551
22551
|
/**
|
|
22552
22552
|
* Checks if the swarm associated with the given client ID is currently busy.
|
|
@@ -22558,27 +22558,27 @@ async function getCheckBusy(clientId) {
|
|
|
22558
22558
|
return await getCheckBusyInternal(clientId);
|
|
22559
22559
|
}
|
|
22560
22560
|
|
|
22561
|
-
const METHOD_NAME$
|
|
22561
|
+
const METHOD_NAME$p = "function.common.getAgentHistory";
|
|
22562
22562
|
/**
|
|
22563
22563
|
* Function implementation
|
|
22564
22564
|
*/
|
|
22565
22565
|
const getAgentHistoryInternal = beginContext(async (clientId, agentName) => {
|
|
22566
22566
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
22567
22567
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22568
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22568
|
+
swarm$1.loggerService.log(METHOD_NAME$p, {
|
|
22569
22569
|
clientId,
|
|
22570
22570
|
agentName,
|
|
22571
22571
|
});
|
|
22572
22572
|
// Validate the session and agent to ensure they exist and are accessible
|
|
22573
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
22574
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
22573
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$p);
|
|
22574
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$p);
|
|
22575
22575
|
// Retrieve the agent's prompt configuration from the agent schema service
|
|
22576
22576
|
const { prompt: upperPrompt } = swarm$1.agentSchemaService.get(agentName);
|
|
22577
22577
|
const prompt = typeof upperPrompt === "string"
|
|
22578
22578
|
? upperPrompt
|
|
22579
22579
|
: await upperPrompt(clientId, agentName);
|
|
22580
22580
|
// Fetch the agent's history using the prompt and rescue tweaks via the history public service
|
|
22581
|
-
const history = await swarm$1.historyPublicService.toArrayForAgent(prompt, METHOD_NAME$
|
|
22581
|
+
const history = await swarm$1.historyPublicService.toArrayForAgent(prompt, METHOD_NAME$p, clientId, agentName);
|
|
22582
22582
|
// Return a shallow copy of the history array
|
|
22583
22583
|
return [...history];
|
|
22584
22584
|
});
|
|
@@ -22601,17 +22601,17 @@ async function getAgentHistory(clientId, agentName) {
|
|
|
22601
22601
|
return await getAgentHistoryInternal(clientId, agentName);
|
|
22602
22602
|
}
|
|
22603
22603
|
|
|
22604
|
-
const METHOD_NAME$
|
|
22604
|
+
const METHOD_NAME$o = "function.common.getSessionMode";
|
|
22605
22605
|
const getSessionModeInternal = beginContext(async (clientId) => {
|
|
22606
22606
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
22607
22607
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22608
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22608
|
+
swarm$1.loggerService.log(METHOD_NAME$o, {
|
|
22609
22609
|
clientId,
|
|
22610
22610
|
});
|
|
22611
22611
|
// Validate the session and swarm to ensure they exist and are accessible
|
|
22612
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
22612
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$o);
|
|
22613
22613
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
22614
|
-
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$
|
|
22614
|
+
swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME$o);
|
|
22615
22615
|
// Retrieve the session mode from the session validation service
|
|
22616
22616
|
return swarm$1.sessionValidationService.getSessionMode(clientId);
|
|
22617
22617
|
});
|
|
@@ -22633,14 +22633,14 @@ async function getSessionMode(clientId) {
|
|
|
22633
22633
|
return await getSessionModeInternal(clientId);
|
|
22634
22634
|
}
|
|
22635
22635
|
|
|
22636
|
-
const METHOD_NAME$
|
|
22636
|
+
const METHOD_NAME$n = "function.common.getSessionContext";
|
|
22637
22637
|
/**
|
|
22638
22638
|
* Function implementation
|
|
22639
22639
|
*/
|
|
22640
22640
|
const getSessionContextInternal = async () => {
|
|
22641
22641
|
// Log the operation if logging is enabled in GLOBAL_CONFIG
|
|
22642
22642
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22643
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22643
|
+
swarm$1.loggerService.log(METHOD_NAME$n);
|
|
22644
22644
|
// Determine the method context, if active
|
|
22645
22645
|
const methodContext = MethodContextService.hasContext()
|
|
22646
22646
|
? swarm$1.methodContextService.context
|
|
@@ -22680,17 +22680,17 @@ async function getSessionContext() {
|
|
|
22680
22680
|
* @private Constant defining the method name for logging purposes.
|
|
22681
22681
|
* Used as an identifier in log messages to track calls to `getNavigationRoute`.
|
|
22682
22682
|
*/
|
|
22683
|
-
const METHOD_NAME$
|
|
22683
|
+
const METHOD_NAME$m = "function.common.getNavigationRoute";
|
|
22684
22684
|
/**
|
|
22685
22685
|
* Function implementation
|
|
22686
22686
|
*/
|
|
22687
22687
|
const getNavigationRouteInternal = (clientId, swarmName) => {
|
|
22688
22688
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22689
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22689
|
+
swarm$1.loggerService.log(METHOD_NAME$m, {
|
|
22690
22690
|
clientId,
|
|
22691
22691
|
swarmName,
|
|
22692
22692
|
});
|
|
22693
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$
|
|
22693
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$m);
|
|
22694
22694
|
return swarm$1.navigationValidationService.getNavigationRoute(clientId, swarmName);
|
|
22695
22695
|
};
|
|
22696
22696
|
/**
|
|
@@ -22709,7 +22709,7 @@ function getNavigationRoute(clientId, swarmName) {
|
|
|
22709
22709
|
* Provides a utility to retrieve the model-facing name of a tool for a given agent and client context.
|
|
22710
22710
|
* Validates tool and agent existence, logs the operation if enabled, and supports both static and dynamic tool name resolution.
|
|
22711
22711
|
*/
|
|
22712
|
-
const METHOD_NAME$
|
|
22712
|
+
const METHOD_NAME$l = "function.common.getToolNameForModel";
|
|
22713
22713
|
/**
|
|
22714
22714
|
* Internal implementation for resolving the model-facing tool name.
|
|
22715
22715
|
* Validates the tool and agent, logs the operation, and invokes the tool schema's function property if dynamic.
|
|
@@ -22722,13 +22722,13 @@ const METHOD_NAME$k = "function.common.getToolNameForModel";
|
|
|
22722
22722
|
*/
|
|
22723
22723
|
const getToolNameForModelInternal = beginContext(async (toolName, clientId, agentName) => {
|
|
22724
22724
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22725
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22725
|
+
swarm$1.loggerService.log(METHOD_NAME$l, {
|
|
22726
22726
|
toolName,
|
|
22727
22727
|
clientId,
|
|
22728
22728
|
agentName,
|
|
22729
22729
|
});
|
|
22730
|
-
swarm$1.toolValidationService.validate(toolName, METHOD_NAME$
|
|
22731
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$
|
|
22730
|
+
swarm$1.toolValidationService.validate(toolName, METHOD_NAME$l);
|
|
22731
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$l);
|
|
22732
22732
|
const { function: fn } = swarm$1.toolSchemaService.get(toolName);
|
|
22733
22733
|
if (typeof fn === "function") {
|
|
22734
22734
|
const { name } = await fn(clientId, agentName);
|
|
@@ -22751,18 +22751,18 @@ async function getToolNameForModel(toolName, clientId, agentName) {
|
|
|
22751
22751
|
return await getToolNameForModelInternal(toolName, clientId, agentName);
|
|
22752
22752
|
}
|
|
22753
22753
|
|
|
22754
|
-
const METHOD_NAME$
|
|
22754
|
+
const METHOD_NAME$k = "function.history.getUserHistory";
|
|
22755
22755
|
/**
|
|
22756
22756
|
* Function implementation
|
|
22757
22757
|
*/
|
|
22758
22758
|
const getUserHistoryInternal = beginContext(async (clientId) => {
|
|
22759
22759
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
22760
22760
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22761
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22761
|
+
swarm$1.loggerService.log(METHOD_NAME$k, {
|
|
22762
22762
|
clientId,
|
|
22763
22763
|
});
|
|
22764
22764
|
// Fetch raw history and filter for user role and mode
|
|
22765
|
-
const history = await getRawHistoryInternal(clientId, METHOD_NAME$
|
|
22765
|
+
const history = await getRawHistoryInternal(clientId, METHOD_NAME$k);
|
|
22766
22766
|
return history.filter(({ role, mode }) => role === "user" && mode === "user");
|
|
22767
22767
|
});
|
|
22768
22768
|
/**
|
|
@@ -22783,18 +22783,18 @@ async function getUserHistory(clientId) {
|
|
|
22783
22783
|
return await getUserHistoryInternal(clientId);
|
|
22784
22784
|
}
|
|
22785
22785
|
|
|
22786
|
-
const METHOD_NAME$
|
|
22786
|
+
const METHOD_NAME$j = "function.history.getAssistantHistory";
|
|
22787
22787
|
/**
|
|
22788
22788
|
* Function implementation
|
|
22789
22789
|
*/
|
|
22790
22790
|
const getAssistantHistoryInternal = beginContext(async (clientId) => {
|
|
22791
22791
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
22792
22792
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22793
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22793
|
+
swarm$1.loggerService.log(METHOD_NAME$j, {
|
|
22794
22794
|
clientId,
|
|
22795
22795
|
});
|
|
22796
22796
|
// Fetch raw history and filter for assistant role
|
|
22797
|
-
const history = await getRawHistoryInternal(clientId, METHOD_NAME$
|
|
22797
|
+
const history = await getRawHistoryInternal(clientId, METHOD_NAME$j);
|
|
22798
22798
|
return history.filter(({ role }) => role === "assistant");
|
|
22799
22799
|
});
|
|
22800
22800
|
/**
|
|
@@ -22815,18 +22815,18 @@ async function getAssistantHistory(clientId) {
|
|
|
22815
22815
|
return await getAssistantHistoryInternal(clientId);
|
|
22816
22816
|
}
|
|
22817
22817
|
|
|
22818
|
-
const METHOD_NAME$
|
|
22818
|
+
const METHOD_NAME$i = "function.history.getLastAssistantMessage";
|
|
22819
22819
|
/**
|
|
22820
22820
|
* Function implementation
|
|
22821
22821
|
*/
|
|
22822
22822
|
const getLastAssistantMessageInternal = beginContext(async (clientId) => {
|
|
22823
22823
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
22824
22824
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22825
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22825
|
+
swarm$1.loggerService.log(METHOD_NAME$i, {
|
|
22826
22826
|
clientId,
|
|
22827
22827
|
});
|
|
22828
22828
|
// Fetch raw history and find the last assistant message
|
|
22829
|
-
const history = await getRawHistoryInternal(clientId, METHOD_NAME$
|
|
22829
|
+
const history = await getRawHistoryInternal(clientId, METHOD_NAME$i);
|
|
22830
22830
|
const last = history.findLast(({ role }) => role === "assistant");
|
|
22831
22831
|
return last?.content ? last.content : null;
|
|
22832
22832
|
});
|
|
@@ -22848,18 +22848,18 @@ async function getLastAssistantMessage(clientId) {
|
|
|
22848
22848
|
return await getLastAssistantMessageInternal(clientId);
|
|
22849
22849
|
}
|
|
22850
22850
|
|
|
22851
|
-
const METHOD_NAME$
|
|
22851
|
+
const METHOD_NAME$h = "function.history.getLastSystemMessage";
|
|
22852
22852
|
/**
|
|
22853
22853
|
* Function implementation
|
|
22854
22854
|
*/
|
|
22855
22855
|
const getLastSystemMessageInternal = beginContext(async (clientId) => {
|
|
22856
22856
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
22857
22857
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22858
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22858
|
+
swarm$1.loggerService.log(METHOD_NAME$h, {
|
|
22859
22859
|
clientId,
|
|
22860
22860
|
});
|
|
22861
22861
|
// Fetch raw history and find the last system message
|
|
22862
|
-
const history = await getRawHistoryInternal(clientId, METHOD_NAME$
|
|
22862
|
+
const history = await getRawHistoryInternal(clientId, METHOD_NAME$h);
|
|
22863
22863
|
const last = history.findLast(({ role }) => role === "system");
|
|
22864
22864
|
return last ? last.content : null;
|
|
22865
22865
|
});
|
|
@@ -22881,7 +22881,7 @@ async function getLastSystemMessage(clientId) {
|
|
|
22881
22881
|
return await getLastSystemMessageInternal(clientId);
|
|
22882
22882
|
}
|
|
22883
22883
|
|
|
22884
|
-
const METHOD_NAME$
|
|
22884
|
+
const METHOD_NAME$g = "function.dump.getAgent";
|
|
22885
22885
|
/**
|
|
22886
22886
|
* Retrieves an agent schema by its name from the swarm's agent schema service.
|
|
22887
22887
|
* Logs the operation if logging is enabled in the global configuration.
|
|
@@ -22892,13 +22892,13 @@ const METHOD_NAME$f = "function.dump.getAgent";
|
|
|
22892
22892
|
*/
|
|
22893
22893
|
function getAgent(agentName) {
|
|
22894
22894
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22895
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22895
|
+
swarm$1.loggerService.log(METHOD_NAME$g, {
|
|
22896
22896
|
agentName,
|
|
22897
22897
|
});
|
|
22898
22898
|
return swarm$1.agentSchemaService.get(agentName);
|
|
22899
22899
|
}
|
|
22900
22900
|
|
|
22901
|
-
const METHOD_NAME$
|
|
22901
|
+
const METHOD_NAME$f = "function.dump.getCompletion";
|
|
22902
22902
|
/**
|
|
22903
22903
|
* Retrieves a completion schema by its name from the swarm's completion schema service.
|
|
22904
22904
|
* Logs the operation if logging is enabled in the global configuration.
|
|
@@ -22909,13 +22909,13 @@ const METHOD_NAME$e = "function.dump.getCompletion";
|
|
|
22909
22909
|
*/
|
|
22910
22910
|
function getCompletion(completionName) {
|
|
22911
22911
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22912
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22912
|
+
swarm$1.loggerService.log(METHOD_NAME$f, {
|
|
22913
22913
|
completionName,
|
|
22914
22914
|
});
|
|
22915
22915
|
return swarm$1.completionSchemaService.get(completionName);
|
|
22916
22916
|
}
|
|
22917
22917
|
|
|
22918
|
-
const METHOD_NAME$
|
|
22918
|
+
const METHOD_NAME$e = "function.dump.getCompute";
|
|
22919
22919
|
/**
|
|
22920
22920
|
* Retrieves a compute schema by its name from the swarm's compute schema service.
|
|
22921
22921
|
* Logs the operation if logging is enabled in the global configuration.
|
|
@@ -22926,13 +22926,13 @@ const METHOD_NAME$d = "function.dump.getCompute";
|
|
|
22926
22926
|
*/
|
|
22927
22927
|
function getCompute(computeName) {
|
|
22928
22928
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22929
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22929
|
+
swarm$1.loggerService.log(METHOD_NAME$e, {
|
|
22930
22930
|
computeName,
|
|
22931
22931
|
});
|
|
22932
22932
|
return swarm$1.computeSchemaService.get(computeName);
|
|
22933
22933
|
}
|
|
22934
22934
|
|
|
22935
|
-
const METHOD_NAME$
|
|
22935
|
+
const METHOD_NAME$d = "function.dump.getEmbeding";
|
|
22936
22936
|
/**
|
|
22937
22937
|
* Retrieves an embedding schema by its name from the swarm's embedding schema service.
|
|
22938
22938
|
* Logs the operation if logging is enabled in the global configuration.
|
|
@@ -22943,13 +22943,13 @@ const METHOD_NAME$c = "function.dump.getEmbeding";
|
|
|
22943
22943
|
*/
|
|
22944
22944
|
function getEmbeding(embeddingName) {
|
|
22945
22945
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22946
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22946
|
+
swarm$1.loggerService.log(METHOD_NAME$d, {
|
|
22947
22947
|
embeddingName,
|
|
22948
22948
|
});
|
|
22949
22949
|
return swarm$1.embeddingSchemaService.get(embeddingName);
|
|
22950
22950
|
}
|
|
22951
22951
|
|
|
22952
|
-
const METHOD_NAME$
|
|
22952
|
+
const METHOD_NAME$c = "function.dump.getMCP";
|
|
22953
22953
|
/**
|
|
22954
22954
|
* Retrieves an MCP (Model Context Protocol) schema by its name from the swarm's MCP schema service.
|
|
22955
22955
|
* Logs the operation if logging is enabled in the global configuration.
|
|
@@ -22960,13 +22960,13 @@ const METHOD_NAME$b = "function.dump.getMCP";
|
|
|
22960
22960
|
*/
|
|
22961
22961
|
function getMCP(mcpName) {
|
|
22962
22962
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22963
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22963
|
+
swarm$1.loggerService.log(METHOD_NAME$c, {
|
|
22964
22964
|
mcpName,
|
|
22965
22965
|
});
|
|
22966
22966
|
return swarm$1.mcpSchemaService.get(mcpName);
|
|
22967
22967
|
}
|
|
22968
22968
|
|
|
22969
|
-
const METHOD_NAME$
|
|
22969
|
+
const METHOD_NAME$b = "function.dump.getPipeline";
|
|
22970
22970
|
/**
|
|
22971
22971
|
* Retrieves a pipeline schema by its name from the swarm's pipeline schema service.
|
|
22972
22972
|
* Logs the operation if logging is enabled in the global configuration.
|
|
@@ -22977,13 +22977,13 @@ const METHOD_NAME$a = "function.dump.getPipeline";
|
|
|
22977
22977
|
*/
|
|
22978
22978
|
function getPipeline(pipelineName) {
|
|
22979
22979
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22980
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22980
|
+
swarm$1.loggerService.log(METHOD_NAME$b, {
|
|
22981
22981
|
pipelineName,
|
|
22982
22982
|
});
|
|
22983
22983
|
return swarm$1.pipelineSchemaService.get(pipelineName);
|
|
22984
22984
|
}
|
|
22985
22985
|
|
|
22986
|
-
const METHOD_NAME$
|
|
22986
|
+
const METHOD_NAME$a = "function.dump.getPolicy";
|
|
22987
22987
|
/**
|
|
22988
22988
|
* Retrieves a policy schema by its name from the swarm's policy schema service.
|
|
22989
22989
|
* Logs the operation if logging is enabled in the global configuration.
|
|
@@ -22994,13 +22994,13 @@ const METHOD_NAME$9 = "function.dump.getPolicy";
|
|
|
22994
22994
|
*/
|
|
22995
22995
|
function getPolicy(policyName) {
|
|
22996
22996
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
22997
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
22997
|
+
swarm$1.loggerService.log(METHOD_NAME$a, {
|
|
22998
22998
|
policyName,
|
|
22999
22999
|
});
|
|
23000
23000
|
return swarm$1.policySchemaService.get(policyName);
|
|
23001
23001
|
}
|
|
23002
23002
|
|
|
23003
|
-
const METHOD_NAME$
|
|
23003
|
+
const METHOD_NAME$9 = "function.dump.getState";
|
|
23004
23004
|
/**
|
|
23005
23005
|
* Retrieves a state schema by its name from the swarm's state schema service.
|
|
23006
23006
|
* Logs the operation if logging is enabled in the global configuration.
|
|
@@ -23011,13 +23011,13 @@ const METHOD_NAME$8 = "function.dump.getState";
|
|
|
23011
23011
|
*/
|
|
23012
23012
|
function getState(stateName) {
|
|
23013
23013
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
23014
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
23014
|
+
swarm$1.loggerService.log(METHOD_NAME$9, {
|
|
23015
23015
|
stateName,
|
|
23016
23016
|
});
|
|
23017
23017
|
return swarm$1.stateSchemaService.get(stateName);
|
|
23018
23018
|
}
|
|
23019
23019
|
|
|
23020
|
-
const METHOD_NAME$
|
|
23020
|
+
const METHOD_NAME$8 = "function.dump.getStorage";
|
|
23021
23021
|
/**
|
|
23022
23022
|
* Retrieves a storage schema by its name from the swarm's storage schema service.
|
|
23023
23023
|
* Logs the operation if logging is enabled in the global configuration.
|
|
@@ -23028,13 +23028,13 @@ const METHOD_NAME$7 = "function.dump.getStorage";
|
|
|
23028
23028
|
*/
|
|
23029
23029
|
function getStorage(storageName) {
|
|
23030
23030
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
23031
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
23031
|
+
swarm$1.loggerService.log(METHOD_NAME$8, {
|
|
23032
23032
|
storageName,
|
|
23033
23033
|
});
|
|
23034
23034
|
return swarm$1.storageSchemaService.get(storageName);
|
|
23035
23035
|
}
|
|
23036
23036
|
|
|
23037
|
-
const METHOD_NAME$
|
|
23037
|
+
const METHOD_NAME$7 = "function.dump.getSwarm";
|
|
23038
23038
|
/**
|
|
23039
23039
|
* Retrieves a swarm schema by its name from the swarm's swarm schema service.
|
|
23040
23040
|
* Logs the operation if logging is enabled in the global configuration.
|
|
@@ -23045,13 +23045,13 @@ const METHOD_NAME$6 = "function.dump.getSwarm";
|
|
|
23045
23045
|
*/
|
|
23046
23046
|
function getSwarm(swarmName) {
|
|
23047
23047
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
23048
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
23048
|
+
swarm$1.loggerService.log(METHOD_NAME$7, {
|
|
23049
23049
|
swarmName,
|
|
23050
23050
|
});
|
|
23051
23051
|
return swarm$1.swarmSchemaService.get(swarmName);
|
|
23052
23052
|
}
|
|
23053
23053
|
|
|
23054
|
-
const METHOD_NAME$
|
|
23054
|
+
const METHOD_NAME$6 = "function.dump.getTool";
|
|
23055
23055
|
/**
|
|
23056
23056
|
* Retrieves a tool schema by its name from the swarm's tool schema service.
|
|
23057
23057
|
* Logs the operation if logging is enabled in the global configuration.
|
|
@@ -23062,13 +23062,13 @@ const METHOD_NAME$5 = "function.dump.getTool";
|
|
|
23062
23062
|
*/
|
|
23063
23063
|
function getTool(toolName) {
|
|
23064
23064
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
23065
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
23065
|
+
swarm$1.loggerService.log(METHOD_NAME$6, {
|
|
23066
23066
|
toolName,
|
|
23067
23067
|
});
|
|
23068
23068
|
return swarm$1.toolSchemaService.get(toolName);
|
|
23069
23069
|
}
|
|
23070
23070
|
|
|
23071
|
-
const METHOD_NAME$
|
|
23071
|
+
const METHOD_NAME$5 = "function.dump.getWiki";
|
|
23072
23072
|
/**
|
|
23073
23073
|
* Retrieves a wiki schema by its name from the swarm's wiki schema service.
|
|
23074
23074
|
* Logs the operation if logging is enabled in the global configuration.
|
|
@@ -23079,13 +23079,13 @@ const METHOD_NAME$4 = "function.dump.getWiki";
|
|
|
23079
23079
|
*/
|
|
23080
23080
|
function getWiki(wikiName) {
|
|
23081
23081
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
23082
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
23082
|
+
swarm$1.loggerService.log(METHOD_NAME$5, {
|
|
23083
23083
|
wikiName,
|
|
23084
23084
|
});
|
|
23085
23085
|
return swarm$1.wikiSchemaService.get(wikiName);
|
|
23086
23086
|
}
|
|
23087
23087
|
|
|
23088
|
-
const METHOD_NAME$
|
|
23088
|
+
const METHOD_NAME$4 = "function.event.listenEvent";
|
|
23089
23089
|
/**
|
|
23090
23090
|
* Set of reserved event source names that cannot be used for custom events.
|
|
23091
23091
|
* @constant {Set<EventSource>}
|
|
@@ -23106,7 +23106,7 @@ const DISALLOWED_EVENT_SOURCE_LIST$2 = new Set([
|
|
|
23106
23106
|
const eventInternal = beginContext(async (clientId, topicName, payload) => {
|
|
23107
23107
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
23108
23108
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
23109
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
23109
|
+
swarm$1.loggerService.log(METHOD_NAME$4, {
|
|
23110
23110
|
clientId,
|
|
23111
23111
|
});
|
|
23112
23112
|
// Check if the topic name is reserved
|
|
@@ -23142,7 +23142,7 @@ async function event(clientId, topicName, payload) {
|
|
|
23142
23142
|
return await eventInternal(clientId, topicName, payload);
|
|
23143
23143
|
}
|
|
23144
23144
|
|
|
23145
|
-
const METHOD_NAME$
|
|
23145
|
+
const METHOD_NAME$3 = "function.event.listenEvent";
|
|
23146
23146
|
/**
|
|
23147
23147
|
* Set of reserved event source names that cannot be used for custom event topics.
|
|
23148
23148
|
* @constant {Set<EventSource>}
|
|
@@ -23177,7 +23177,7 @@ const validateClientId$g = (clientId) => {
|
|
|
23177
23177
|
const listenEventInternal = beginContext((clientId, topicName, fn) => {
|
|
23178
23178
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
23179
23179
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
23180
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
23180
|
+
swarm$1.loggerService.log(METHOD_NAME$3, {
|
|
23181
23181
|
clientId,
|
|
23182
23182
|
});
|
|
23183
23183
|
// Check if the topic name is reserved
|
|
@@ -23213,7 +23213,7 @@ function listenEvent(clientId, topicName, fn) {
|
|
|
23213
23213
|
return listenEventInternal(clientId, topicName, fn);
|
|
23214
23214
|
}
|
|
23215
23215
|
|
|
23216
|
-
const METHOD_NAME$
|
|
23216
|
+
const METHOD_NAME$2 = "function.event.listenEventOnce";
|
|
23217
23217
|
/**
|
|
23218
23218
|
* Set of reserved event source names that cannot be used for custom event topics.
|
|
23219
23219
|
* @constant {Set<EventSource>}
|
|
@@ -23248,7 +23248,7 @@ const validateClientId$f = (clientId) => {
|
|
|
23248
23248
|
const listenEventOnceInternal = beginContext((clientId, topicName, filterFn, fn) => {
|
|
23249
23249
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
23250
23250
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
23251
|
-
swarm$1.loggerService.log(METHOD_NAME$
|
|
23251
|
+
swarm$1.loggerService.log(METHOD_NAME$2, {
|
|
23252
23252
|
clientId,
|
|
23253
23253
|
});
|
|
23254
23254
|
// Check if the topic name is reserved
|
|
@@ -23290,7 +23290,7 @@ function listenEventOnce(clientId, topicName, filterFn, fn) {
|
|
|
23290
23290
|
return listenEventOnceInternal(clientId, topicName, filterFn, fn);
|
|
23291
23291
|
}
|
|
23292
23292
|
|
|
23293
|
-
const METHOD_NAME = "function.navigate.changeToPrevAgent";
|
|
23293
|
+
const METHOD_NAME$1 = "function.navigate.changeToPrevAgent";
|
|
23294
23294
|
/**
|
|
23295
23295
|
* Creates a change agent function with time-to-live (TTL) and queuing capabilities for switching to the previous agent.
|
|
23296
23296
|
*
|
|
@@ -23313,7 +23313,7 @@ const createChangeToPrevAgent = functoolsKit.memoize(([clientId]) => `${clientId
|
|
|
23313
23313
|
}));
|
|
23314
23314
|
{
|
|
23315
23315
|
// Dispose of the current agent's resources and set up the new agent
|
|
23316
|
-
const agentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME, clientId, swarmName);
|
|
23316
|
+
const agentName = await swarm$1.swarmPublicService.getAgentName(METHOD_NAME$1, clientId, swarmName);
|
|
23317
23317
|
await swarm$1.agentPublicService.dispose(methodName, clientId, agentName);
|
|
23318
23318
|
await swarm$1.historyPublicService.dispose(methodName, clientId, agentName);
|
|
23319
23319
|
await swarm$1.swarmPublicService.setAgentRef(methodName, clientId, swarmName, agentName, await swarm$1.agentPublicService.createAgentRef(methodName, clientId, agentName));
|
|
@@ -23341,20 +23341,20 @@ const createGc = functoolsKit.singleshot(async () => {
|
|
|
23341
23341
|
const changeToPrevAgentInternal = beginContext(async (clientId) => {
|
|
23342
23342
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
23343
23343
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
23344
|
-
swarm$1.loggerService.log(METHOD_NAME, {
|
|
23344
|
+
swarm$1.loggerService.log(METHOD_NAME$1, {
|
|
23345
23345
|
clientId,
|
|
23346
23346
|
});
|
|
23347
23347
|
const swarmName = swarm$1.sessionValidationService.getSwarm(clientId);
|
|
23348
|
-
const agentName = await swarm$1.swarmPublicService.navigationPop(METHOD_NAME, clientId, swarmName);
|
|
23348
|
+
const agentName = await swarm$1.swarmPublicService.navigationPop(METHOD_NAME$1, clientId, swarmName);
|
|
23349
23349
|
{
|
|
23350
23350
|
// Validate session and the retrieved agent
|
|
23351
|
-
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME);
|
|
23352
|
-
swarm$1.agentValidationService.validate(agentName, METHOD_NAME);
|
|
23351
|
+
swarm$1.sessionValidationService.validate(clientId, METHOD_NAME$1);
|
|
23352
|
+
swarm$1.agentValidationService.validate(agentName, METHOD_NAME$1);
|
|
23353
23353
|
}
|
|
23354
23354
|
// Execute the agent change with TTL and queuing
|
|
23355
23355
|
const run = await createChangeToPrevAgent(clientId);
|
|
23356
23356
|
createGc();
|
|
23357
|
-
return await run(METHOD_NAME, agentName, swarmName);
|
|
23357
|
+
return await run(METHOD_NAME$1, agentName, swarmName);
|
|
23358
23358
|
});
|
|
23359
23359
|
/**
|
|
23360
23360
|
* Navigates back to the previous or default agent for a given client session in a swarm.
|
|
@@ -25664,6 +25664,34 @@ class AdapterUtils {
|
|
|
25664
25664
|
*/
|
|
25665
25665
|
const Adapter = new AdapterUtils();
|
|
25666
25666
|
|
|
25667
|
+
const METHOD_NAME = "function.common.validate";
|
|
25668
|
+
/**
|
|
25669
|
+
* Runs validation for all swarms, agents, and outlines.
|
|
25670
|
+
* This function is wrapped with `singleshot` to ensure it only runs once per process.
|
|
25671
|
+
* Logs the validation process if logging is enabled in the global config.
|
|
25672
|
+
*
|
|
25673
|
+
* @private
|
|
25674
|
+
*/
|
|
25675
|
+
const validateInternal = functoolsKit.singleshot(() => {
|
|
25676
|
+
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
25677
|
+
swarm$1.loggerService.log(METHOD_NAME);
|
|
25678
|
+
const swarmList = swarm$1.swarmValidationService.getSwarmList();
|
|
25679
|
+
const agentList = swarmList.flatMap((swarmName) => swarm$1.swarmValidationService.getAgentList(swarmName));
|
|
25680
|
+
const outlineList = swarm$1.outlineValidationService.getOutlineList();
|
|
25681
|
+
swarmList.forEach((swarmName) => swarm$1.swarmValidationService.validate(swarmName, METHOD_NAME));
|
|
25682
|
+
agentList.forEach((agentName) => swarm$1.agentValidationService.validate(agentName, METHOD_NAME));
|
|
25683
|
+
outlineList.forEach((outlineName) => swarm$1.outlineValidationService.validate(outlineName, METHOD_NAME));
|
|
25684
|
+
});
|
|
25685
|
+
/**
|
|
25686
|
+
* Validates all swarms, agents, and outlines in the system.
|
|
25687
|
+
* This function is idempotent and will only perform validation once per process.
|
|
25688
|
+
*
|
|
25689
|
+
* @returns {void}
|
|
25690
|
+
*/
|
|
25691
|
+
function validate() {
|
|
25692
|
+
return validateInternal();
|
|
25693
|
+
}
|
|
25694
|
+
|
|
25667
25695
|
/**
|
|
25668
25696
|
* Converts a given schema object into a JSON schema format object.
|
|
25669
25697
|
*
|
|
@@ -25851,3 +25879,4 @@ exports.setConfig = setConfig;
|
|
|
25851
25879
|
exports.startPipeline = startPipeline;
|
|
25852
25880
|
exports.swarm = swarm;
|
|
25853
25881
|
exports.toJsonSchema = toJsonSchema;
|
|
25882
|
+
exports.validate = validate;
|