@agentforge/tools 0.6.0 → 0.6.2

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/index.cjs CHANGED
@@ -2020,6 +2020,8 @@ var AskHumanInputSchema = zod.z.object({
2020
2020
  */
2021
2021
  suggestions: zod.z.array(zod.z.string()).optional().describe("Suggested responses for the human")
2022
2022
  });
2023
+ var logLevel = process.env.LOG_LEVEL?.toLowerCase() || core.LogLevel.INFO;
2024
+ var logger = core.createLogger("askHuman", { level: logLevel });
2023
2025
  function createAskHumanTool() {
2024
2026
  return core.toolBuilder().name("ask-human").description(
2025
2027
  "Ask a human for input or approval. Use this when you need human guidance, approval for a critical action, or clarification on ambiguous requirements. The agent execution will pause until the human responds."
@@ -2052,7 +2054,18 @@ function createAskHumanTool() {
2052
2054
  suggestions: validatedInput.suggestions,
2053
2055
  status: "pending"
2054
2056
  };
2055
- const response = interrupt(humanRequest);
2057
+ logger.debug("About to call interrupt()", { humanRequest });
2058
+ let response;
2059
+ try {
2060
+ response = interrupt(humanRequest);
2061
+ logger.debug("interrupt() returned successfully", { response, responseType: typeof response });
2062
+ } catch (error) {
2063
+ logger.debug("interrupt() threw error (expected for GraphInterrupt)", {
2064
+ errorType: error?.constructor?.name,
2065
+ error: error instanceof Error ? error.message : String(error)
2066
+ });
2067
+ throw error;
2068
+ }
2056
2069
  const respondedAt = Date.now();
2057
2070
  const duration = respondedAt - requestedAt;
2058
2071
  const timedOut = validatedInput.timeout > 0 && duration >= validatedInput.timeout;