@tangle-network/agent-app 4.0.29 → 4.0.31

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.
@@ -42,7 +42,7 @@ import {
42
42
  import {
43
43
  formatServerTiming,
44
44
  nextCallIndex
45
- } from "./chunk-H7NMUXNZ.js";
45
+ } from "./chunk-JLKH2VYF.js";
46
46
  import {
47
47
  fail,
48
48
  isRuntimeAuthRefreshDenied,
@@ -123,8 +123,15 @@ function createPromptTrace(trace, parent, meta) {
123
123
  const status = String(state?.status ?? part?.status ?? "");
124
124
  const ranMs = (asNum(asRec(state?.time)?.end) ?? NaN) - (asNum(asRec(state?.time)?.start) ?? NaN);
125
125
  if (!tools.has(id) && (status === "completed" || status === "error") && ranMs >= 0) {
126
- const attrs = { ...toolAttrs(id, String(part?.tool ?? "tool")), ...status === "error" ? { "tool.status": "error" } : {} };
127
- return void tools.set(id, trace.record("tool.call", "tool", Math.max(startedAt, now - ranMs), now, attrs, generation ?? prompt));
126
+ return void tools.set(id, trace.record(
127
+ "tool.call",
128
+ "tool",
129
+ Math.max(startedAt, now - ranMs),
130
+ now,
131
+ toolAttrs(id, String(part?.tool ?? "tool")),
132
+ generation ?? prompt,
133
+ status === "error" ? "tool_error" : void 0
134
+ ));
128
135
  }
129
136
  startTool(id, String(part?.tool ?? "tool"));
130
137
  if (status === "completed" || status === "error") tools.get(id)?.end(void 0, status === "error" ? "tool_error" : void 0);
@@ -4393,4 +4400,4 @@ export {
4393
4400
  deleteSecret,
4394
4401
  mintSandboxScopedToken
4395
4402
  };
4396
- //# sourceMappingURL=chunk-7TZX2KSH.js.map
4403
+ //# sourceMappingURL=chunk-G3W3EIP4.js.map