agent-swarm-kit 1.1.130 → 1.1.132

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 CHANGED
@@ -19727,6 +19727,7 @@ function removeUndefined(obj) {
19727
19727
  });
19728
19728
  return result;
19729
19729
  }
19730
+
19730
19731
  /**
19731
19732
  * Maps an external agent schema (`IAgentSchema`) to an internal agent schema (`IAgentSchemaInternal`).
19732
19733
  * Ensures that `system`, `systemStatic`, and `systemDynamic` properties are normalized into arrays or functions
@@ -20200,11 +20201,12 @@ const METHOD_NAME$12 = "function.test.overrideCompletion";
20200
20201
  /**
20201
20202
  * Function implementation
20202
20203
  */
20203
- const overrideCompletionInternal = beginContext((completionSchema) => {
20204
+ const overrideCompletionInternal = beginContext((publicCompletionSchema) => {
20204
20205
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20205
20206
  swarm$1.loggerService.log(METHOD_NAME$12, {
20206
- completionSchema,
20207
+ completionSchema: publicCompletionSchema,
20207
20208
  });
20209
+ const completionSchema = removeUndefined(publicCompletionSchema);
20208
20210
  return swarm$1.completionSchemaService.override(completionSchema.completionName, completionSchema);
20209
20211
  });
20210
20212
  /**
@@ -20236,11 +20238,12 @@ const METHOD_NAME$11 = "function.test.overrideEmbeding";
20236
20238
  /**
20237
20239
  * Function implementation
20238
20240
  */
20239
- const overrideEmbedingInternal = beginContext((embeddingSchema) => {
20241
+ const overrideEmbedingInternal = beginContext((publicEmbeddingSchema) => {
20240
20242
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20241
20243
  swarm$1.loggerService.log(METHOD_NAME$11, {
20242
- embeddingSchema,
20244
+ embeddingSchema: publicEmbeddingSchema,
20243
20245
  });
20246
+ const embeddingSchema = removeUndefined(publicEmbeddingSchema);
20244
20247
  return swarm$1.embeddingSchemaService.override(embeddingSchema.embeddingName, embeddingSchema);
20245
20248
  });
20246
20249
  /**
@@ -20274,11 +20277,12 @@ const METHOD_NAME$10 = "function.test.overridePolicy";
20274
20277
  /**
20275
20278
  * Function implementation
20276
20279
  */
20277
- const overridePolicyInternal = beginContext((policySchema) => {
20280
+ const overridePolicyInternal = beginContext((publicPolicySchema) => {
20278
20281
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20279
20282
  swarm$1.loggerService.log(METHOD_NAME$10, {
20280
- policySchema,
20283
+ policySchema: publicPolicySchema,
20281
20284
  });
20285
+ const policySchema = removeUndefined(publicPolicySchema);
20282
20286
  return swarm$1.policySchemaService.override(policySchema.policyName, policySchema);
20283
20287
  });
20284
20288
  /**
@@ -20310,11 +20314,12 @@ const METHOD_NAME$$ = "function.test.overrideState";
20310
20314
  /**
20311
20315
  * Function implementation
20312
20316
  */
20313
- const overrideStateInternal = beginContext((stateSchema) => {
20317
+ const overrideStateInternal = beginContext((publicStateSchema) => {
20314
20318
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20315
20319
  swarm$1.loggerService.log(METHOD_NAME$$, {
20316
- stateSchema,
20320
+ stateSchema: publicStateSchema,
20317
20321
  });
20322
+ const stateSchema = removeUndefined(publicStateSchema);
20318
20323
  return swarm$1.stateSchemaService.override(stateSchema.stateName, stateSchema);
20319
20324
  });
20320
20325
  /**
@@ -20347,11 +20352,12 @@ const METHOD_NAME$_ = "function.test.overrideStorage";
20347
20352
  /**
20348
20353
  * Function implementation
20349
20354
  */
20350
- const overrideStorageInternal = beginContext((storageSchema) => {
20355
+ const overrideStorageInternal = beginContext((publicStorageSchema) => {
20351
20356
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20352
20357
  swarm$1.loggerService.log(METHOD_NAME$_, {
20353
- storageSchema,
20358
+ storageSchema: publicStorageSchema,
20354
20359
  });
20360
+ const storageSchema = removeUndefined(publicStorageSchema);
20355
20361
  return swarm$1.storageSchemaService.override(storageSchema.storageName, storageSchema);
20356
20362
  });
20357
20363
  /**
@@ -20385,11 +20391,12 @@ const METHOD_NAME$Z = "function.test.overrideSwarm";
20385
20391
  /**
20386
20392
  * Function implementation
20387
20393
  */
20388
- const overrideSwarmInternal = beginContext((swarmSchema) => {
20394
+ const overrideSwarmInternal = beginContext((publicSwarmSchema) => {
20389
20395
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20390
20396
  swarm$1.loggerService.log(METHOD_NAME$Z, {
20391
- swarmSchema,
20397
+ swarmSchema: publicSwarmSchema,
20392
20398
  });
20399
+ const swarmSchema = removeUndefined(publicSwarmSchema);
20393
20400
  return swarm$1.swarmSchemaService.override(swarmSchema.swarmName, swarmSchema);
20394
20401
  });
20395
20402
  /**
@@ -20421,11 +20428,12 @@ const METHOD_NAME$Y = "function.test.overrideTool";
20421
20428
  /**
20422
20429
  * Function implementation
20423
20430
  */
20424
- const overrideToolInternal = beginContext((toolSchema) => {
20431
+ const overrideToolInternal = beginContext((publicToolSchema) => {
20425
20432
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20426
20433
  swarm$1.loggerService.log(METHOD_NAME$Y, {
20427
- toolSchema,
20434
+ toolSchema: publicToolSchema,
20428
20435
  });
20436
+ const toolSchema = removeUndefined(publicToolSchema);
20429
20437
  return swarm$1.toolSchemaService.override(toolSchema.toolName, toolSchema);
20430
20438
  });
20431
20439
  /**
@@ -20457,11 +20465,12 @@ const METHOD_NAME$X = "function.test.overrideMCP";
20457
20465
  /**
20458
20466
  * Function implementation
20459
20467
  */
20460
- const overrideMCPInternal = beginContext((mcpSchema) => {
20468
+ const overrideMCPInternal = beginContext((publicMcpSchema) => {
20461
20469
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20462
20470
  swarm$1.loggerService.log(METHOD_NAME$X, {
20463
- mcpSchema,
20471
+ mcpSchema: publicMcpSchema,
20464
20472
  });
20473
+ const mcpSchema = removeUndefined(publicMcpSchema);
20465
20474
  return swarm$1.mcpSchemaService.override(mcpSchema.mcpName, mcpSchema);
20466
20475
  });
20467
20476
  /**
@@ -20477,11 +20486,12 @@ const METHOD_NAME$W = "function.test.overrideWiki";
20477
20486
  /**
20478
20487
  * Function implementation
20479
20488
  */
20480
- const overrideWikiInternal = beginContext((wikiSchema) => {
20489
+ const overrideWikiInternal = beginContext((publicWikiSchema) => {
20481
20490
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20482
20491
  swarm$1.loggerService.log(METHOD_NAME$W, {
20483
- wikiSchema,
20492
+ wikiSchema: publicWikiSchema,
20484
20493
  });
20494
+ const wikiSchema = removeUndefined(publicWikiSchema);
20485
20495
  return swarm$1.wikiSchemaService.override(wikiSchema.wikiName, wikiSchema);
20486
20496
  });
20487
20497
  /**
@@ -20522,11 +20532,12 @@ const METHOD_NAME$V = "function.test.overrideCompute";
20522
20532
  /**
20523
20533
  * Function implementation
20524
20534
  */
20525
- const overrideComputeInternal = beginContext((computeSchema) => {
20535
+ const overrideComputeInternal = beginContext((publicComputeSchema) => {
20526
20536
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20527
20537
  swarm$1.loggerService.log(METHOD_NAME$V, {
20528
- computeSchema,
20538
+ computeSchema: publicComputeSchema,
20529
20539
  });
20540
+ const computeSchema = removeUndefined(publicComputeSchema);
20530
20541
  return swarm$1.computeSchemaService.override(computeSchema.computeName, computeSchema);
20531
20542
  });
20532
20543
  /**
@@ -20551,11 +20562,12 @@ const METHOD_NAME$U = "function.test.overridePipeline";
20551
20562
  /**
20552
20563
  * Function implementation
20553
20564
  */
20554
- const overridePipelineInternal = beginContext((pipelineSchema) => {
20565
+ const overridePipelineInternal = beginContext((publicPipelineSchema) => {
20555
20566
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20556
20567
  swarm$1.loggerService.log(METHOD_NAME$U, {
20557
- pipelineSchema,
20568
+ pipelineSchema: publicPipelineSchema,
20558
20569
  });
20570
+ const pipelineSchema = removeUndefined(publicPipelineSchema);
20559
20571
  return swarm$1.pipelineSchemaService.override(pipelineSchema.pipelineName, pipelineSchema);
20560
20572
  });
20561
20573
  /**
@@ -20581,11 +20593,12 @@ const METHOD_NAME$T = "function.test.overrideOutline";
20581
20593
  * @private
20582
20594
  * @param {TOutlineSchema} outlineSchema - The partial outline schema to apply.
20583
20595
  */
20584
- const overrideOutlineInternal = beginContext((outlineSchema) => {
20596
+ const overrideOutlineInternal = beginContext((publicOutlineSchema) => {
20585
20597
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20586
20598
  swarm$1.loggerService.log(METHOD_NAME$T, {
20587
- outlineSchema,
20599
+ outlineSchema: publicOutlineSchema,
20588
20600
  });
20601
+ const outlineSchema = removeUndefined(publicOutlineSchema);
20589
20602
  return swarm$1.outlineSchemaService.override(outlineSchema.outlineName, outlineSchema);
20590
20603
  });
20591
20604
  /**
@@ -21298,6 +21311,7 @@ const jsonInternal = beginContext(async (outlineName, param) => {
21298
21311
  });
21299
21312
  }
21300
21313
  };
21314
+ let lastData = null;
21301
21315
  for (let attempt = 0; attempt < maxAttempts; attempt++) {
21302
21316
  await makeHistory();
21303
21317
  const inputArgs = {
@@ -21326,6 +21340,9 @@ const jsonInternal = beginContext(async (outlineName, param) => {
21326
21340
  }, output);
21327
21341
  }
21328
21342
  const data = JSON.parse(output.content);
21343
+ {
21344
+ lastData = data;
21345
+ }
21329
21346
  const validationArgs = {
21330
21347
  ...inputArgs,
21331
21348
  data,
@@ -21351,6 +21368,7 @@ const jsonInternal = beginContext(async (outlineName, param) => {
21351
21368
  errorMessage = functoolsKit.getErrorMessage(error);
21352
21369
  console.error(`agent-swarm outline error outlineName=${outlineName} attempt=${attempt}`, {
21353
21370
  param,
21371
+ lastData,
21354
21372
  errorMessage,
21355
21373
  });
21356
21374
  }
package/build/index.mjs CHANGED
@@ -19725,6 +19725,7 @@ function removeUndefined(obj) {
19725
19725
  });
19726
19726
  return result;
19727
19727
  }
19728
+
19728
19729
  /**
19729
19730
  * Maps an external agent schema (`IAgentSchema`) to an internal agent schema (`IAgentSchemaInternal`).
19730
19731
  * Ensures that `system`, `systemStatic`, and `systemDynamic` properties are normalized into arrays or functions
@@ -20198,11 +20199,12 @@ const METHOD_NAME$12 = "function.test.overrideCompletion";
20198
20199
  /**
20199
20200
  * Function implementation
20200
20201
  */
20201
- const overrideCompletionInternal = beginContext((completionSchema) => {
20202
+ const overrideCompletionInternal = beginContext((publicCompletionSchema) => {
20202
20203
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20203
20204
  swarm$1.loggerService.log(METHOD_NAME$12, {
20204
- completionSchema,
20205
+ completionSchema: publicCompletionSchema,
20205
20206
  });
20207
+ const completionSchema = removeUndefined(publicCompletionSchema);
20206
20208
  return swarm$1.completionSchemaService.override(completionSchema.completionName, completionSchema);
20207
20209
  });
20208
20210
  /**
@@ -20234,11 +20236,12 @@ const METHOD_NAME$11 = "function.test.overrideEmbeding";
20234
20236
  /**
20235
20237
  * Function implementation
20236
20238
  */
20237
- const overrideEmbedingInternal = beginContext((embeddingSchema) => {
20239
+ const overrideEmbedingInternal = beginContext((publicEmbeddingSchema) => {
20238
20240
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20239
20241
  swarm$1.loggerService.log(METHOD_NAME$11, {
20240
- embeddingSchema,
20242
+ embeddingSchema: publicEmbeddingSchema,
20241
20243
  });
20244
+ const embeddingSchema = removeUndefined(publicEmbeddingSchema);
20242
20245
  return swarm$1.embeddingSchemaService.override(embeddingSchema.embeddingName, embeddingSchema);
20243
20246
  });
20244
20247
  /**
@@ -20272,11 +20275,12 @@ const METHOD_NAME$10 = "function.test.overridePolicy";
20272
20275
  /**
20273
20276
  * Function implementation
20274
20277
  */
20275
- const overridePolicyInternal = beginContext((policySchema) => {
20278
+ const overridePolicyInternal = beginContext((publicPolicySchema) => {
20276
20279
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20277
20280
  swarm$1.loggerService.log(METHOD_NAME$10, {
20278
- policySchema,
20281
+ policySchema: publicPolicySchema,
20279
20282
  });
20283
+ const policySchema = removeUndefined(publicPolicySchema);
20280
20284
  return swarm$1.policySchemaService.override(policySchema.policyName, policySchema);
20281
20285
  });
20282
20286
  /**
@@ -20308,11 +20312,12 @@ const METHOD_NAME$$ = "function.test.overrideState";
20308
20312
  /**
20309
20313
  * Function implementation
20310
20314
  */
20311
- const overrideStateInternal = beginContext((stateSchema) => {
20315
+ const overrideStateInternal = beginContext((publicStateSchema) => {
20312
20316
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20313
20317
  swarm$1.loggerService.log(METHOD_NAME$$, {
20314
- stateSchema,
20318
+ stateSchema: publicStateSchema,
20315
20319
  });
20320
+ const stateSchema = removeUndefined(publicStateSchema);
20316
20321
  return swarm$1.stateSchemaService.override(stateSchema.stateName, stateSchema);
20317
20322
  });
20318
20323
  /**
@@ -20345,11 +20350,12 @@ const METHOD_NAME$_ = "function.test.overrideStorage";
20345
20350
  /**
20346
20351
  * Function implementation
20347
20352
  */
20348
- const overrideStorageInternal = beginContext((storageSchema) => {
20353
+ const overrideStorageInternal = beginContext((publicStorageSchema) => {
20349
20354
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20350
20355
  swarm$1.loggerService.log(METHOD_NAME$_, {
20351
- storageSchema,
20356
+ storageSchema: publicStorageSchema,
20352
20357
  });
20358
+ const storageSchema = removeUndefined(publicStorageSchema);
20353
20359
  return swarm$1.storageSchemaService.override(storageSchema.storageName, storageSchema);
20354
20360
  });
20355
20361
  /**
@@ -20383,11 +20389,12 @@ const METHOD_NAME$Z = "function.test.overrideSwarm";
20383
20389
  /**
20384
20390
  * Function implementation
20385
20391
  */
20386
- const overrideSwarmInternal = beginContext((swarmSchema) => {
20392
+ const overrideSwarmInternal = beginContext((publicSwarmSchema) => {
20387
20393
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20388
20394
  swarm$1.loggerService.log(METHOD_NAME$Z, {
20389
- swarmSchema,
20395
+ swarmSchema: publicSwarmSchema,
20390
20396
  });
20397
+ const swarmSchema = removeUndefined(publicSwarmSchema);
20391
20398
  return swarm$1.swarmSchemaService.override(swarmSchema.swarmName, swarmSchema);
20392
20399
  });
20393
20400
  /**
@@ -20419,11 +20426,12 @@ const METHOD_NAME$Y = "function.test.overrideTool";
20419
20426
  /**
20420
20427
  * Function implementation
20421
20428
  */
20422
- const overrideToolInternal = beginContext((toolSchema) => {
20429
+ const overrideToolInternal = beginContext((publicToolSchema) => {
20423
20430
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20424
20431
  swarm$1.loggerService.log(METHOD_NAME$Y, {
20425
- toolSchema,
20432
+ toolSchema: publicToolSchema,
20426
20433
  });
20434
+ const toolSchema = removeUndefined(publicToolSchema);
20427
20435
  return swarm$1.toolSchemaService.override(toolSchema.toolName, toolSchema);
20428
20436
  });
20429
20437
  /**
@@ -20455,11 +20463,12 @@ const METHOD_NAME$X = "function.test.overrideMCP";
20455
20463
  /**
20456
20464
  * Function implementation
20457
20465
  */
20458
- const overrideMCPInternal = beginContext((mcpSchema) => {
20466
+ const overrideMCPInternal = beginContext((publicMcpSchema) => {
20459
20467
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20460
20468
  swarm$1.loggerService.log(METHOD_NAME$X, {
20461
- mcpSchema,
20469
+ mcpSchema: publicMcpSchema,
20462
20470
  });
20471
+ const mcpSchema = removeUndefined(publicMcpSchema);
20463
20472
  return swarm$1.mcpSchemaService.override(mcpSchema.mcpName, mcpSchema);
20464
20473
  });
20465
20474
  /**
@@ -20475,11 +20484,12 @@ const METHOD_NAME$W = "function.test.overrideWiki";
20475
20484
  /**
20476
20485
  * Function implementation
20477
20486
  */
20478
- const overrideWikiInternal = beginContext((wikiSchema) => {
20487
+ const overrideWikiInternal = beginContext((publicWikiSchema) => {
20479
20488
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20480
20489
  swarm$1.loggerService.log(METHOD_NAME$W, {
20481
- wikiSchema,
20490
+ wikiSchema: publicWikiSchema,
20482
20491
  });
20492
+ const wikiSchema = removeUndefined(publicWikiSchema);
20483
20493
  return swarm$1.wikiSchemaService.override(wikiSchema.wikiName, wikiSchema);
20484
20494
  });
20485
20495
  /**
@@ -20520,11 +20530,12 @@ const METHOD_NAME$V = "function.test.overrideCompute";
20520
20530
  /**
20521
20531
  * Function implementation
20522
20532
  */
20523
- const overrideComputeInternal = beginContext((computeSchema) => {
20533
+ const overrideComputeInternal = beginContext((publicComputeSchema) => {
20524
20534
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20525
20535
  swarm$1.loggerService.log(METHOD_NAME$V, {
20526
- computeSchema,
20536
+ computeSchema: publicComputeSchema,
20527
20537
  });
20538
+ const computeSchema = removeUndefined(publicComputeSchema);
20528
20539
  return swarm$1.computeSchemaService.override(computeSchema.computeName, computeSchema);
20529
20540
  });
20530
20541
  /**
@@ -20549,11 +20560,12 @@ const METHOD_NAME$U = "function.test.overridePipeline";
20549
20560
  /**
20550
20561
  * Function implementation
20551
20562
  */
20552
- const overridePipelineInternal = beginContext((pipelineSchema) => {
20563
+ const overridePipelineInternal = beginContext((publicPipelineSchema) => {
20553
20564
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20554
20565
  swarm$1.loggerService.log(METHOD_NAME$U, {
20555
- pipelineSchema,
20566
+ pipelineSchema: publicPipelineSchema,
20556
20567
  });
20568
+ const pipelineSchema = removeUndefined(publicPipelineSchema);
20557
20569
  return swarm$1.pipelineSchemaService.override(pipelineSchema.pipelineName, pipelineSchema);
20558
20570
  });
20559
20571
  /**
@@ -20579,11 +20591,12 @@ const METHOD_NAME$T = "function.test.overrideOutline";
20579
20591
  * @private
20580
20592
  * @param {TOutlineSchema} outlineSchema - The partial outline schema to apply.
20581
20593
  */
20582
- const overrideOutlineInternal = beginContext((outlineSchema) => {
20594
+ const overrideOutlineInternal = beginContext((publicOutlineSchema) => {
20583
20595
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
20584
20596
  swarm$1.loggerService.log(METHOD_NAME$T, {
20585
- outlineSchema,
20597
+ outlineSchema: publicOutlineSchema,
20586
20598
  });
20599
+ const outlineSchema = removeUndefined(publicOutlineSchema);
20587
20600
  return swarm$1.outlineSchemaService.override(outlineSchema.outlineName, outlineSchema);
20588
20601
  });
20589
20602
  /**
@@ -21296,6 +21309,7 @@ const jsonInternal = beginContext(async (outlineName, param) => {
21296
21309
  });
21297
21310
  }
21298
21311
  };
21312
+ let lastData = null;
21299
21313
  for (let attempt = 0; attempt < maxAttempts; attempt++) {
21300
21314
  await makeHistory();
21301
21315
  const inputArgs = {
@@ -21324,6 +21338,9 @@ const jsonInternal = beginContext(async (outlineName, param) => {
21324
21338
  }, output);
21325
21339
  }
21326
21340
  const data = JSON.parse(output.content);
21341
+ {
21342
+ lastData = data;
21343
+ }
21327
21344
  const validationArgs = {
21328
21345
  ...inputArgs,
21329
21346
  data,
@@ -21349,6 +21366,7 @@ const jsonInternal = beginContext(async (outlineName, param) => {
21349
21366
  errorMessage = getErrorMessage(error);
21350
21367
  console.error(`agent-swarm outline error outlineName=${outlineName} attempt=${attempt}`, {
21351
21368
  param,
21369
+ lastData,
21352
21370
  errorMessage,
21353
21371
  });
21354
21372
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-swarm-kit",
3
- "version": "1.1.130",
3
+ "version": "1.1.132",
4
4
  "description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",