@tangle-network/agent-runtime 0.58.0 → 0.59.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.
package/dist/agent.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-XRYEZPR6.js";
4
4
  import {
5
5
  createSandboxForSpec
6
- } from "./chunk-MDFZSPHA.js";
6
+ } from "./chunk-45D64J7B.js";
7
7
  import "./chunk-7QYOXFCD.js";
8
8
  import "./chunk-WIR4HOOJ.js";
9
9
  import {
@@ -3516,9 +3516,14 @@ async function createWorktree(options) {
3516
3516
  }
3517
3517
  async function captureWorktreeDiff(options) {
3518
3518
  const baseRef = options.baseRef ?? options.worktree.baseSha;
3519
- const patch = await runGitAsync(["diff", baseRef], options.worktree.path, options.runGit);
3519
+ await runGitAsync(["add", "-A"], options.worktree.path, options.runGit);
3520
+ const patch = await runGitAsync(
3521
+ ["diff", "--cached", baseRef],
3522
+ options.worktree.path,
3523
+ options.runGit
3524
+ );
3520
3525
  const shortstat = await runGitAsync(
3521
- ["diff", "--shortstat", baseRef],
3526
+ ["diff", "--cached", "--shortstat", baseRef],
3522
3527
  options.worktree.path,
3523
3528
  options.runGit
3524
3529
  );
@@ -9800,16 +9805,18 @@ function toToolSpan(input, runId, seq, at) {
9800
9805
  }
9801
9806
  var obj = (v) => v && typeof v === "object" ? v : void 0;
9802
9807
  var str = (v) => typeof v === "string" && v ? v : void 0;
9803
- var decodeOpencodePart = (p) => {
9804
- if (str(p.type)?.toLowerCase() !== "tool" || !str(p.tool)) return void 0;
9805
- const state = obj(p.state);
9806
- const status = str(state?.status) ?? "";
9807
- if (status === "pending" || status === "running") return void 0;
9808
+ var decodeOpencodePart = (raw) => {
9809
+ if (str(raw.type)?.toLowerCase() !== "tool" || !str(raw.tool)) return void 0;
9810
+ const part = raw;
9811
+ const state = obj(part.state);
9812
+ const status = state?.status;
9813
+ if (!status || status === "pending" || status === "running") return void 0;
9808
9814
  return {
9809
- toolName: p.tool,
9815
+ toolName: part.tool,
9810
9816
  args: state?.input ?? {},
9811
- ...status === "error" ? { status: "error" } : status ? { status: "ok" } : {},
9812
- ...str(p.callID) ? { callId: p.callID } : {}
9817
+ // ToolStateError carries 'error' OR 'failed' the reverse-engineered decoder missed 'failed'.
9818
+ status: status === "error" || status === "failed" ? "error" : "ok",
9819
+ ...str(part.callID) ? { callId: part.callID } : {}
9813
9820
  };
9814
9821
  };
9815
9822
  var decodeAnthropicPart = (p) => {
@@ -10442,4 +10449,4 @@ export {
10442
10449
  jjWorkspace,
10443
10450
  runInWorkspace
10444
10451
  };
10445
- //# sourceMappingURL=chunk-MDFZSPHA.js.map
10452
+ //# sourceMappingURL=chunk-45D64J7B.js.map