Skip to content

Commit ce6acc0

Browse files
committed
patch
1 parent 8ce9b05 commit ce6acc0

16 files changed

Lines changed: 89 additions & 50 deletions

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agent-swarm-kit",
3-
"version": "1.1.130",
3+
"version": "1.1.131",
44
"description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
55
"author": {
66
"name": "Petr Tripolsky",

src/functions/test/overrideCompletion.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ICompletionSchema } from "../../interfaces/Completion.interface";
22
import swarm from "../../lib";
33
import { GLOBAL_CONFIG } from "../../config/params";
44
import beginContext from "../../utils/beginContext";
5+
import removeUndefined from "../../helpers/removeUndefined";
56

67
const METHOD_NAME = "function.test.overrideCompletion";
78

@@ -13,12 +14,14 @@ type TCompletionSchema = {
1314
* Function implementation
1415
*/
1516
const overrideCompletionInternal = beginContext(
16-
(completionSchema: TCompletionSchema) => {
17+
(publicCompletionSchema: TCompletionSchema) => {
1718
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
1819
swarm.loggerService.log(METHOD_NAME, {
19-
completionSchema,
20+
completionSchema: publicCompletionSchema,
2021
});
2122

23+
const completionSchema = removeUndefined(publicCompletionSchema);
24+
2225
return swarm.completionSchemaService.override(
2326
completionSchema.completionName,
2427
completionSchema

src/functions/test/overrideCompute.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { IComputeSchema } from "../../interfaces/Compute.interface";
77
import swarm from "../../lib";
88
import { GLOBAL_CONFIG } from "../../config/params";
99
import beginContext from "../../utils/beginContext";
10+
import removeUndefined from "../../helpers/removeUndefined";
1011

1112
/**
1213
* @constant {string} METHOD_NAME
@@ -26,12 +27,14 @@ type TComputeSchema = {
2627
/**
2728
* Function implementation
2829
*/
29-
const overrideComputeInternal = beginContext((computeSchema: TComputeSchema) => {
30+
const overrideComputeInternal = beginContext((publicComputeSchema: TComputeSchema) => {
3031
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
3132
swarm.loggerService.log(METHOD_NAME, {
32-
computeSchema,
33+
computeSchema: publicComputeSchema,
3334
});
3435

36+
const computeSchema = removeUndefined(publicComputeSchema);
37+
3538
return swarm.computeSchemaService.override(computeSchema.computeName, computeSchema);
3639
});
3740

src/functions/test/overrideEmbeding.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { IEmbeddingSchema } from "../../interfaces/Embedding.interface";
22
import swarm from "../../lib";
33
import { GLOBAL_CONFIG } from "../../config/params";
44
import beginContext from "../../utils/beginContext";
5+
import removeUndefined from "../../helpers/removeUndefined";
56

67
const METHOD_NAME = "function.test.overrideEmbeding";
78

@@ -13,12 +14,14 @@ type TEmbeddingSchema = {
1314
* Function implementation
1415
*/
1516
const overrideEmbedingInternal = beginContext(
16-
(embeddingSchema: TEmbeddingSchema) => {
17+
(publicEmbeddingSchema: TEmbeddingSchema) => {
1718
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
1819
swarm.loggerService.log(METHOD_NAME, {
19-
embeddingSchema,
20+
embeddingSchema: publicEmbeddingSchema,
2021
});
2122

23+
const embeddingSchema = removeUndefined(publicEmbeddingSchema);
24+
2225
return swarm.embeddingSchemaService.override(
2326
embeddingSchema.embeddingName,
2427
embeddingSchema

src/functions/test/overrideMCP.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { IMCPSchema } from "../../interfaces/MCP.interface";
22
import swarm from "../../lib";
33
import { GLOBAL_CONFIG } from "../../config/params";
44
import beginContext from "../../utils/beginContext";
5+
import removeUndefined from "../../helpers/removeUndefined";
56

67
const METHOD_NAME = "function.test.overrideMCP";
78

@@ -15,12 +16,14 @@ type TMCPSchema = {
1516
/**
1617
* Function implementation
1718
*/
18-
const overrideMCPInternal = beginContext((mcpSchema: TMCPSchema) => {
19+
const overrideMCPInternal = beginContext((publicMcpSchema: TMCPSchema) => {
1920
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
2021
swarm.loggerService.log(METHOD_NAME, {
21-
mcpSchema,
22+
mcpSchema: publicMcpSchema,
2223
});
2324

25+
const mcpSchema = removeUndefined(publicMcpSchema);
26+
2427
return swarm.mcpSchemaService.override(mcpSchema.mcpName, mcpSchema);
2528
});
2629

src/functions/test/overrideOutline.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { IOutlineSchema } from "../../interfaces/Outline.interface";
22
import swarm from "../../lib";
33
import { GLOBAL_CONFIG } from "../../config/params";
44
import beginContext from "../../utils/beginContext";
5+
import removeUndefined from "../../helpers/removeUndefined";
56

67
/**
78
* Constant defining the method name for logging purposes.
@@ -29,11 +30,13 @@ type TOutlineSchema = {
2930
* @param {TOutlineSchema} outlineSchema - The partial outline schema to apply.
3031
*/
3132
const overrideOutlineInternal = beginContext(
32-
(outlineSchema: TOutlineSchema) => {
33+
(publicOutlineSchema: TOutlineSchema) => {
3334
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
3435
swarm.loggerService.log(METHOD_NAME, {
35-
outlineSchema,
36+
outlineSchema: publicOutlineSchema,
3637
});
38+
39+
const outlineSchema = removeUndefined(publicOutlineSchema);
3740

3841
return swarm.outlineSchemaService.override(
3942
outlineSchema.outlineName,

src/functions/test/overridePipeline.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { IPipelineSchema } from "../../model/Pipeline.model";
77
import swarm from "../../lib";
88
import { GLOBAL_CONFIG } from "../../config/params";
99
import beginContext from "../../utils/beginContext";
10+
import removeUndefined from "../../helpers/removeUndefined";
1011

1112
/**
1213
* @constant {string} METHOD_NAME
@@ -27,12 +28,14 @@ type TPipelineSchema = {
2728
* Function implementation
2829
*/
2930
const overridePipelineInternal = beginContext(
30-
(pipelineSchema: TPipelineSchema) => {
31+
(publicPipelineSchema: TPipelineSchema) => {
3132
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
3233
swarm.loggerService.log(METHOD_NAME, {
33-
pipelineSchema,
34+
pipelineSchema: publicPipelineSchema,
3435
});
3536

37+
const pipelineSchema = removeUndefined(publicPipelineSchema);
38+
3639
return swarm.pipelineSchemaService.override(
3740
pipelineSchema.pipelineName,
3841
pipelineSchema

src/functions/test/overridePolicy.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { IPolicySchema } from "../../interfaces/Policy.interface";
22
import swarm from "../../lib";
33
import { GLOBAL_CONFIG } from "../../config/params";
44
import beginContext from "../../utils/beginContext";
5+
import removeUndefined from "../../helpers/removeUndefined";
56

67
const METHOD_NAME = "function.test.overridePolicy";
78

@@ -12,12 +13,14 @@ type TPolicySchema = {
1213
/**
1314
* Function implementation
1415
*/
15-
const overridePolicyInternal = beginContext((policySchema: TPolicySchema) => {
16+
const overridePolicyInternal = beginContext((publicPolicySchema: TPolicySchema) => {
1617
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
1718
swarm.loggerService.log(METHOD_NAME, {
18-
policySchema,
19+
policySchema: publicPolicySchema,
1920
});
2021

22+
const policySchema = removeUndefined(publicPolicySchema);
23+
2124
return swarm.policySchemaService.override(policySchema.policyName, policySchema);
2225
});
2326

src/functions/test/overrideState.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { IStateSchema } from "../../interfaces/State.interface";
22
import swarm from "../../lib";
33
import { GLOBAL_CONFIG } from "../../config/params";
44
import beginContext from "../../utils/beginContext";
5+
import removeUndefined from "../../helpers/removeUndefined";
56

67
const METHOD_NAME = "function.test.overrideState";
78

@@ -12,12 +13,14 @@ type TStateSchema<T extends unknown = any> = {
1213
/**
1314
* Function implementation
1415
*/
15-
const overrideStateInternal = beginContext((stateSchema: TStateSchema) => {
16+
const overrideStateInternal = beginContext((publicStateSchema: TStateSchema) => {
1617
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
1718
swarm.loggerService.log(METHOD_NAME, {
18-
stateSchema,
19+
stateSchema: publicStateSchema,
1920
});
2021

22+
const stateSchema = removeUndefined(publicStateSchema);
23+
2124
return swarm.stateSchemaService.override(stateSchema.stateName, stateSchema);
2225
});
2326

0 commit comments

Comments
 (0)