@livx.cc/agentx 0.99.56 → 0.99.57
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/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5159,6 +5159,10 @@ var Agent = class _Agent {
|
|
|
5159
5159
|
args = tc.function.arguments;
|
|
5160
5160
|
earlyError ??= `Error: invalid JSON arguments for ${tc.function.name}: ${String(e)}`;
|
|
5161
5161
|
}
|
|
5162
|
+
if (!earlyError && tool && args && typeof args === "object") {
|
|
5163
|
+
const missing = (tool.parameters?.required ?? []).filter((k) => args[k] == null);
|
|
5164
|
+
if (missing.length) earlyError = `Error: ${tc.function.name} is missing required argument(s): ${missing.join(", ")} (got: ${Object.keys(args).join(", ") || "none"}). Re-call with the exact parameter names.`;
|
|
5165
|
+
}
|
|
5162
5166
|
const hooks = this.activeHooks;
|
|
5163
5167
|
const call = { name: tc.function.name, args };
|
|
5164
5168
|
const meta = { id: tc.id };
|