@dudko.dev/agent-web 0.0.46 → 0.0.47

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
@@ -7479,6 +7479,7 @@ var askTheUser = async (deps, call, raw) => {
7479
7479
 
7480
7480
  // src/tools/ask-user.ts
7481
7481
  init_wrap();
7482
+ var toolResultForLog = (name, output) => name === ASK_USER_TOOL ? "[the answer to the question is not logged]" : output;
7482
7483
  var routes = /* @__PURE__ */ new WeakMap();
7483
7484
  var routeAskUser = (config, channel, subagent) => {
7484
7485
  routes.set(config, { ...channel, subagent });
@@ -8491,7 +8492,10 @@ ${renderEarlierAttempts(attempt.earlier)}` : parts.prompt;
8491
8492
  if (attempt.calls) inFlight.push({ name, input });
8492
8493
  },
8493
8494
  onToolResult: (name, output, ok) => {
8494
- ctx.log.debug(`tool result: ${name} ${ok ? "ok" : "FAILED"}`, output);
8495
+ ctx.log.debug(
8496
+ `tool result: ${name} ${ok ? "ok" : "FAILED"}`,
8497
+ toolResultForLog(name, output)
8498
+ );
8495
8499
  ctx.emit({ type: "step.tool-result", step, name, output, ok });
8496
8500
  if (attempt.calls) {
8497
8501
  const at = inFlight.findIndex((c) => c.name === name);
@@ -11103,7 +11107,13 @@ ${renderActiveSkills(active)}`
11103
11107
  log.warn(`step ${stepNo} made no tool calls \u2014 nothing changed in this step`);
11104
11108
  }
11105
11109
  stepResult.toolCalls.filter((c) => !c.ok).forEach((c) => log.warn(`tool ${c.name} failed:`, c.output));
11106
- log.debug(`step ${stepNo} detail:`, stepResult);
11110
+ log.debug(`step ${stepNo} detail:`, {
11111
+ ...stepResult,
11112
+ toolCalls: stepResult.toolCalls.map((c) => ({
11113
+ ...c,
11114
+ output: toolResultForLog(c.name, c.output)
11115
+ }))
11116
+ });
11107
11117
  emit({ type: "step.complete", step, result: stepResult });
11108
11118
  const counts = stepResult.toolCalls.length ? ` [${applied} tool call(s) ok${failed ? `, ${failed} failed` : ""}]` : "";
11109
11119
  done.push(