@agentica/core 0.37.0 → 0.39.0

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.
@@ -142,13 +142,8 @@ class MicroAgentica {
142
142
  abortSignal: options.abortSignal,
143
143
  });
144
144
  const executes = yield (0, orchestrate_1.call)(ctx, this.operations_.array);
145
- if (((_a = this.props.config) === null || _a === void 0 ? void 0 : _a.throw) === true) {
146
- for (const execute of executes) {
147
- (0, assertExecuteFailure_1.assertExecuteFailure)(execute);
148
- }
149
- }
150
145
  // eslint-disable-next-line
151
- if (executes.length && !!((_c = (_b = this.props.config) === null || _b === void 0 ? void 0 : _b.executor) === null || _c === void 0 ? void 0 : _c.describe)) {
146
+ if (executes.length && !!((_b = (_a = this.props.config) === null || _a === void 0 ? void 0 : _a.executor) === null || _b === void 0 ? void 0 : _b.describe)) {
152
147
  const func = typeof this.props.config.executor.describe === "function"
153
148
  ? this.props.config.executor.describe
154
149
  : orchestrate_1.describe;
@@ -156,6 +151,12 @@ class MicroAgentica {
156
151
  }
157
152
  const completed = yield Promise.all(histories.map((h) => __awaiter(this, void 0, void 0, function* () { return h(); })));
158
153
  this.histories_.push(...completed);
154
+ // throw exception about failed execution
155
+ if (((_c = this.props.config) === null || _c === void 0 ? void 0 : _c.throw) !== false) {
156
+ for (const execute of executes) {
157
+ (0, assertExecuteFailure_1.assertExecuteFailure)(execute);
158
+ }
159
+ }
159
160
  return completed;
160
161
  });
161
162
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MicroAgentica.js","sourceRoot":"","sources":["../src/MicroAgentica.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAAiC;AAejC,qEAAkE;AAClE,4FAAyF;AACzF,6CAA0D;AAC1D,+CAA+C;AAC/C,sEAAmE;AACnE,mDAAgD;AAChD,uEAAoE;AACpE,6CAAyE;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAa,aAAa;IAWxB;;kEAE8D;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AAU,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC5C,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;gBACtB,MAAM,OAAO,CAAC,GAAG,CACf,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAO,QAAQ,EAAE,EAAE;oBACrC,IAAI,CAAC;wBACH,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAC;oBACxB,CAAC;oBACD,WAAM,CAAC;wBACL,WAAW;oBACb,CAAC;gBACH,CAAC,CAAA,CAAC,CACH,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF;AA9SD,sCA8SC"}
@@ -0,0 +1,17 @@
1
+ export declare class AgenticaJsonParseError extends Error {
2
+ readonly arguments: string;
3
+ readonly reason: string;
4
+ constructor(props: AgenticaJsonParseError.IProps);
5
+ get name(): "AgenticaJsonParseError";
6
+ toJSON(): AgenticaJsonParseError.IJson;
7
+ }
8
+ export declare namespace AgenticaJsonParseError {
9
+ interface IProps {
10
+ arguments: string;
11
+ reason: string;
12
+ }
13
+ interface IJson extends IProps {
14
+ name: "AgenticaJsonParseError";
15
+ message: string;
16
+ }
17
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgenticaJsonParseError = void 0;
4
+ const AgenticaConstant_1 = require("../constants/AgenticaConstant");
5
+ class AgenticaJsonParseError extends Error {
6
+ constructor(props) {
7
+ super(`Invalid JSON format. The parsing failed after ${AgenticaConstant_1.AgenticaConstant.RETRY} retries.`);
8
+ const proto = new.target.prototype;
9
+ // eslint-disable-next-line
10
+ if (Object.setPrototypeOf) {
11
+ Object.setPrototypeOf(this, proto);
12
+ }
13
+ else {
14
+ // eslint-disable-next-line
15
+ this.__proto__ = proto;
16
+ }
17
+ this.arguments = props.arguments;
18
+ this.reason = props.reason;
19
+ }
20
+ get name() {
21
+ return "AgenticaJsonParseError";
22
+ }
23
+ toJSON() {
24
+ return {
25
+ name: "AgenticaJsonParseError",
26
+ message: this.message,
27
+ arguments: this.arguments,
28
+ reason: this.reason,
29
+ };
30
+ }
31
+ }
32
+ exports.AgenticaJsonParseError = AgenticaJsonParseError;
33
+ //# sourceMappingURL=AgenticaJsonParseError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgenticaJsonParseError.js","sourceRoot":"","sources":["../../src/errors/AgenticaJsonParseError.ts"],"names":[],"mappings":";;;AAAA,oEAAiE;AAEjE,MAAa,sBAAuB,SAAQ,KAAK;IAI/C,YAAmB,KAAoC;QACrD,KAAK,CAAC,iDAAiD,mCAAgB,CAAC,KAAK,WAAW,CAAC,CAAC;QAE1F,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC;QAEnC,2BAA2B;QAC3B,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YAC1B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACrC,CAAC;aACI,CAAC;YACJ,2BAA2B;YAC1B,IAAY,CAAC,SAAS,GAAG,KAAK,CAAC;QAClC,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,IAAW,IAAI;QACb,OAAO,wBAAwB,CAAC;IAClC,CAAC;IAEM,MAAM;QACX,OAAO;YACL,IAAI,EAAE,wBAAwB;YAC9B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;IACJ,CAAC;CACF;AAlCD,wDAkCC"}
@@ -0,0 +1,18 @@
1
+ import type { IValidation } from "@samchon/openapi";
2
+ export declare class AgenticaValidationError extends Error {
3
+ readonly arguments: unknown;
4
+ readonly errors: IValidation.IError[];
5
+ constructor(props: AgenticaValidationError.IProps);
6
+ get name(): "AgenticaValidationError";
7
+ toJSON(): AgenticaValidationError.IJson;
8
+ }
9
+ export declare namespace AgenticaValidationError {
10
+ interface IProps {
11
+ arguments: unknown;
12
+ errors: IValidation.IError[];
13
+ }
14
+ interface IJson extends IProps {
15
+ name: "AgenticaValidationError";
16
+ message: string;
17
+ }
18
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgenticaValidationError = void 0;
4
+ const AgenticaConstant_1 = require("../constants/AgenticaConstant");
5
+ class AgenticaValidationError extends Error {
6
+ constructor(props) {
7
+ super(`Invalid arguments. The validation failed after ${AgenticaConstant_1.AgenticaConstant.RETRY} retries.`);
8
+ const proto = new.target.prototype;
9
+ // eslint-disable-next-line
10
+ if (Object.setPrototypeOf) {
11
+ Object.setPrototypeOf(this, proto);
12
+ }
13
+ else {
14
+ // eslint-disable-next-line
15
+ this.__proto__ = proto;
16
+ }
17
+ this.arguments = props.arguments;
18
+ this.errors = props.errors;
19
+ }
20
+ get name() {
21
+ return "AgenticaValidationError";
22
+ }
23
+ toJSON() {
24
+ return {
25
+ name: "AgenticaValidationError",
26
+ message: this.message,
27
+ arguments: this.arguments,
28
+ errors: this.errors,
29
+ };
30
+ }
31
+ }
32
+ exports.AgenticaValidationError = AgenticaValidationError;
33
+ //# sourceMappingURL=AgenticaValidationError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgenticaValidationError.js","sourceRoot":"","sources":["../../src/errors/AgenticaValidationError.ts"],"names":[],"mappings":";;;AAEA,oEAAiE;AAEjE,MAAa,uBAAwB,SAAQ,KAAK;IAIhD,YAAmB,KAAqC;QACtD,KAAK,CAAC,kDAAkD,mCAAgB,CAAC,KAAK,WAAW,CAAC,CAAC;QAE3F,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC;QAEnC,2BAA2B;QAC3B,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YAC1B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACrC,CAAC;aACI,CAAC;YACJ,2BAA2B;YAC1B,IAAY,CAAC,SAAS,GAAG,KAAK,CAAC;QAClC,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,IAAW,IAAI;QACb,OAAO,yBAAyB,CAAC;IACnC,CAAC;IAEM,MAAM;QACX,OAAO;YACL,IAAI,EAAE,yBAAyB;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;IACJ,CAAC;CACF;AAlCD,0DAkCC"}
@@ -0,0 +1,2 @@
1
+ export * from "./AgenticaJsonParseError";
2
+ export * from "./AgenticaValidationError";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./AgenticaJsonParseError"), exports);
18
+ __exportStar(require("./AgenticaValidationError"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,4DAA0C"}
package/lib/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from "./Agentica";
2
2
  export * from "./constants";
3
3
  export * from "./context";
4
+ export * from "./errors";
4
5
  export * from "./events";
5
6
  export * as factory from "./factory";
6
7
  export * from "./functional";
package/lib/index.js CHANGED
@@ -40,6 +40,7 @@ exports.utils = exports.orchestrate = exports.factory = void 0;
40
40
  __exportStar(require("./Agentica"), exports);
41
41
  __exportStar(require("./constants"), exports);
42
42
  __exportStar(require("./context"), exports);
43
+ __exportStar(require("./errors"), exports);
43
44
  __exportStar(require("./events"), exports);
44
45
  exports.factory = __importStar(require("./factory"));
45
46
  __exportStar(require("./functional"), exports);
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2B;AAE3B,8CAA4B;AAC5B,4CAA0B;AAC1B,2CAAyB;AACzB,qDAAqC;AACrC,+CAA6B;AAC7B,8CAA4B;AAC5B,yCAAuB;AACvB,kDAAgC;AAChC,6DAA6C;AAC7C,+CAA6B;AAE7B;;GAEG;AACH,iDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2B;AAE3B,8CAA4B;AAC5B,4CAA0B;AAC1B,2CAAyB;AACzB,2CAAyB;AACzB,qDAAqC;AACrC,+CAA6B;AAC7B,8CAA4B;AAC5B,yCAAuB;AACvB,kDAAgC;AAChC,6DAA6C;AAC7C,+CAA6B;AAE7B;;GAEG;AACH,iDAAiC"}
package/lib/index.mjs CHANGED
@@ -825,6 +825,56 @@ function isAgenticaContext(ctx) {
825
825
  return typeof ctx.initialize === "function";
826
826
  }
827
827
 
828
+ class AgenticaJsonParseError extends Error {
829
+ constructor(props) {
830
+ super(`Invalid JSON format. The parsing failed after ${AgenticaConstant.RETRY} retries.`);
831
+ const proto = new.target.prototype;
832
+ if (Object.setPrototypeOf) {
833
+ Object.setPrototypeOf(this, proto);
834
+ } else {
835
+ this.__proto__ = proto;
836
+ }
837
+ this.arguments = props.arguments;
838
+ this.reason = props.reason;
839
+ }
840
+ get name() {
841
+ return "AgenticaJsonParseError";
842
+ }
843
+ toJSON() {
844
+ return {
845
+ name: "AgenticaJsonParseError",
846
+ message: this.message,
847
+ arguments: this.arguments,
848
+ reason: this.reason
849
+ };
850
+ }
851
+ }
852
+
853
+ class AgenticaValidationError extends Error {
854
+ constructor(props) {
855
+ super(`Invalid arguments. The validation failed after ${AgenticaConstant.RETRY} retries.`);
856
+ const proto = new.target.prototype;
857
+ if (Object.setPrototypeOf) {
858
+ Object.setPrototypeOf(this, proto);
859
+ } else {
860
+ this.__proto__ = proto;
861
+ }
862
+ this.arguments = props.arguments;
863
+ this.errors = props.errors;
864
+ }
865
+ get name() {
866
+ return "AgenticaValidationError";
867
+ }
868
+ toJSON() {
869
+ return {
870
+ name: "AgenticaValidationError",
871
+ message: this.message,
872
+ arguments: this.arguments,
873
+ errors: this.errors
874
+ };
875
+ }
876
+ }
877
+
828
878
  function __get_retry(limit) {
829
879
  const retryFn = async (fn, prevError, attempt = 0) => {
830
880
  try {
@@ -925,20 +975,27 @@ function parse(str) {
925
975
  }
926
976
 
927
977
  function stringifyValidateFailure(failure) {
928
- return stringify({
978
+ const usedErrors = new Set;
979
+ const jsonOutput = stringify({
929
980
  value: failure.data,
930
981
  errors: failure.errors,
931
982
  path: "$input",
932
983
  tab: 0,
933
984
  inArray: false,
934
- inToJson: false
985
+ inToJson: false,
986
+ usedErrors
935
987
  });
988
+ const unmappableErrors = failure.errors.filter((e => !usedErrors.has(e)));
989
+ if (unmappableErrors.length > 0) {
990
+ return `\`\`\`json\n${jsonOutput}\n\`\`\`\n\n**Unmappable validation errors:**\n\n\`\`\`json\n${JSON.stringify(unmappableErrors, null, 2)}\n\`\`\``;
991
+ }
992
+ return `\`\`\`json\n${jsonOutput}\n\`\`\``;
936
993
  }
937
994
 
938
995
  function stringify(props) {
939
- const {value, errors, path, tab, inArray, inToJson} = props;
996
+ const {value, errors, path, tab, inArray, inToJson, usedErrors} = props;
940
997
  const indent = " ".repeat(tab);
941
- const errorComment = getErrorComment(path, errors);
998
+ const errorComment = getErrorComment(path, errors, usedErrors);
942
999
  if (inArray && value === undefined) {
943
1000
  return `${indent}undefined${errorComment}`;
944
1001
  }
@@ -956,7 +1013,8 @@ function stringify(props) {
956
1013
  path: itemPath,
957
1014
  tab: tab + 1,
958
1015
  inArray: true,
959
- inToJson: false
1016
+ inToJson: false,
1017
+ usedErrors
960
1018
  });
961
1019
  if (index < value.length - 1) {
962
1020
  const itemLines = itemStr.split("\n");
@@ -983,7 +1041,8 @@ function stringify(props) {
983
1041
  path,
984
1042
  tab,
985
1043
  inArray,
986
- inToJson: true
1044
+ inToJson: true,
1045
+ usedErrors
987
1046
  });
988
1047
  }
989
1048
  const existingEntries = Object.entries(value).filter((([_, val]) => val !== undefined));
@@ -999,7 +1058,7 @@ function stringify(props) {
999
1058
  const propIndent = " ".repeat(tab + 1);
1000
1059
  const val = missingKeys.includes(key) ? undefined : value[key];
1001
1060
  if (val === undefined || val === null || typeof val === "boolean" || typeof val === "number" || typeof val === "string") {
1002
- const propErrorComment = getErrorComment(propPath, errors);
1061
+ const propErrorComment = getErrorComment(propPath, errors, usedErrors);
1003
1062
  const valueStr = val === undefined ? `${propIndent}"${key}": undefined` : `${propIndent}"${key}": ${JSON.stringify(val)}`;
1004
1063
  const withComma = index < array.length - 1 ? `${valueStr},` : valueStr;
1005
1064
  const line = withComma + propErrorComment;
@@ -1012,7 +1071,8 @@ function stringify(props) {
1012
1071
  path: propPath,
1013
1072
  tab: tab + 1,
1014
1073
  inArray: false,
1015
- inToJson: false
1074
+ inToJson: false,
1075
+ usedErrors
1016
1076
  });
1017
1077
  const valStrWithoutIndent = valStr.trimStart();
1018
1078
  if (index < array.length - 1) {
@@ -1039,11 +1099,12 @@ function stringify(props) {
1039
1099
  return `${indent}${valStr}${errorComment}`;
1040
1100
  }
1041
1101
 
1042
- function getErrorComment(path, errors) {
1102
+ function getErrorComment(path, errors, usedErrors) {
1043
1103
  const pathErrors = errors.filter((e => e.path === path));
1044
1104
  if (pathErrors.length === 0) {
1045
1105
  return "";
1046
1106
  }
1107
+ pathErrors.forEach((e => usedErrors.add(e)));
1047
1108
  return ` // ❌ ${JSON.stringify(pathErrors.map((e => ({
1048
1109
  path: e.path,
1049
1110
  expected: e.expected,
@@ -1636,20 +1697,19 @@ async function correctTypeError(ctx, callEvent, validateEvent, previousValidatio
1636
1697
  call_id: callEvent.id,
1637
1698
  operation: callEvent.operation,
1638
1699
  arguments: callEvent.arguments,
1639
- value: {
1640
- name: "ValidationError",
1641
- message: `Invalid arguments. The validation failed after ${AgenticaConstant.RETRY} retries.`,
1700
+ value: new AgenticaValidationError({
1701
+ arguments: callEvent.arguments,
1642
1702
  errors: validateEvent.result.errors
1643
- },
1703
+ }),
1644
1704
  success: false
1645
1705
  }),
1646
1706
  operation: callEvent.operation,
1647
1707
  toolCall: {
1648
1708
  id: callEvent.id,
1649
1709
  arguments: JSON.stringify(callEvent.arguments),
1650
- result: [ "🚨 VALIDATION FAILURE: Your function arguments do not conform to the required schema.", "", "The validation errors below represent computed absolute truth from rigorous type validation.", "Each error is marked with ❌ comments showing the exact location, expected type, and actual value.", "", "You must fix ALL errors to achieve 100% schema compliance.", "", "```json", JsonUtil.stringifyValidateFailure(validateEvent.result), "```" ].join("\n")
1710
+ result: [ "🚨 VALIDATION FAILURE: Your function arguments do not conform to the required schema.", "", "The validation errors below represent computed absolute truth from rigorous type validation.", "Each error is marked with ❌ comments showing the exact location, expected type, and actual value.", "", "You must fix ALL errors to achieve 100% schema compliance.", "", JsonUtil.stringifyValidateFailure(validateEvent.result) ].join("\n")
1651
1711
  },
1652
- systemPrompt: ctx.config?.systemPrompt?.validate?.(previousValidationErrors.slice(0, -1)) ?? [ AgenticaSystemPrompt.VALIDATE, ...previousValidationErrors.length > 1 ? [ "", AgenticaSystemPrompt.VALIDATE_REPEATED.replace("${{HISTORICAL_ERRORS}}", previousValidationErrors.slice(0, -1).map(((ve, i) => [ `### ${i + 1}. Previous Validation Error`, "", "```json", JsonUtil.stringifyValidateFailure(ve.result), "```" ].join("\n"))).join("\n\n")) ] : [] ].join("\n"),
1712
+ systemPrompt: ctx.config?.systemPrompt?.validate?.(previousValidationErrors.slice(0, -1)) ?? [ AgenticaSystemPrompt.VALIDATE, ...previousValidationErrors.length > 1 ? [ "", AgenticaSystemPrompt.VALIDATE_REPEATED.replace("${{HISTORICAL_ERRORS}}", previousValidationErrors.slice(0, -1).map(((ve, i) => [ `### ${i + 1}. Previous Validation Error`, "", JsonUtil.stringifyValidateFailure(ve.result) ].join("\n"))).join("\n\n")) ] : [] ].join("\n"),
1653
1713
  life,
1654
1714
  previousValidationErrors
1655
1715
  });
@@ -1661,12 +1721,10 @@ async function correctJsonError(ctx, toolCall, parseErrorEvent, previousValidati
1661
1721
  call_id: toolCall.id,
1662
1722
  operation: parseErrorEvent.operation,
1663
1723
  arguments: {},
1664
- value: {
1665
- name: "JsonParseError",
1666
- message: `Invalid JSON format. The parsing failed after ${AgenticaConstant.RETRY} retries.`,
1724
+ value: new AgenticaJsonParseError({
1667
1725
  arguments: parseErrorEvent.arguments,
1668
- errorMessage: parseErrorEvent.errorMessage
1669
- },
1726
+ reason: parseErrorEvent.errorMessage
1727
+ }),
1670
1728
  success: false
1671
1729
  }),
1672
1730
  operation: parseErrorEvent.operation,
@@ -45392,17 +45450,17 @@ class MicroAgentica {
45392
45450
  abortSignal: options.abortSignal
45393
45451
  });
45394
45452
  const executes = await call(ctx, this.operations_.array);
45395
- if (this.props.config?.throw === true) {
45396
- for (const execute of executes) {
45397
- assertExecuteFailure(execute);
45398
- }
45399
- }
45400
45453
  if (executes.length && !!this.props.config?.executor?.describe) {
45401
45454
  const func = typeof this.props.config.executor.describe === "function" ? this.props.config.executor.describe : describe;
45402
45455
  await func(ctx, executes);
45403
45456
  }
45404
45457
  const completed = await Promise.all(histories.map((async h => h())));
45405
45458
  this.histories_.push(...completed);
45459
+ if (this.props.config?.throw !== false) {
45460
+ for (const execute of executes) {
45461
+ assertExecuteFailure(execute);
45462
+ }
45463
+ }
45406
45464
  return completed;
45407
45465
  }
45408
45466
  getConfig() {
@@ -45473,5 +45531,5 @@ class MicroAgentica {
45473
45531
  }
45474
45532
  }
45475
45533
 
45476
- export { Agentica, AgenticaDefaultPrompt, AgenticaSystemPrompt, AgenticaTokenUsage, MicroAgentica, assertHttpController, assertHttpLlmApplication, assertMcpController, index$1 as factory, index as orchestrate, index$2 as utils, validateHttpController, validateHttpLlmApplication, validateMcpController, write };
45534
+ export { Agentica, AgenticaDefaultPrompt, AgenticaJsonParseError, AgenticaSystemPrompt, AgenticaTokenUsage, AgenticaValidationError, MicroAgentica, assertHttpController, assertHttpLlmApplication, assertMcpController, index$1 as factory, index as orchestrate, index$2 as utils, validateHttpController, validateHttpLlmApplication, validateMcpController, write };
45477
45535
  //# sourceMappingURL=index.mjs.map