@mutagent/cli 0.1.84 → 0.1.86

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/bin/cli.js CHANGED
@@ -8651,6 +8651,11 @@ function getString(input, ...keys) {
8651
8651
  }
8652
8652
  return "";
8653
8653
  }
8654
+ function serializePayload(value) {
8655
+ if (value === undefined || value === null)
8656
+ return;
8657
+ return typeof value === "string" ? value : JSON.stringify(value);
8658
+ }
8654
8659
  async function handleSessionStart() {
8655
8660
  const input = await readStdin();
8656
8661
  const sessionId = getString(input, "session_id", "sessionId");
@@ -8720,6 +8725,7 @@ async function handlePreToolUse() {
8720
8725
  toolName
8721
8726
  };
8722
8727
  writeState(sessionId, state);
8728
+ const toolInput = serializePayload(input.tool_input ?? input.toolInput);
8723
8729
  await sendBatchTrace([
8724
8730
  {
8725
8731
  traceId: state.traceId,
@@ -8734,7 +8740,8 @@ async function handlePreToolUse() {
8734
8740
  name: toolName,
8735
8741
  kind: "tool",
8736
8742
  startTime: now,
8737
- status: "running"
8743
+ status: "running",
8744
+ input: toolInput
8738
8745
  }
8739
8746
  ]
8740
8747
  }
@@ -8769,6 +8776,7 @@ async function handlePostToolUse() {
8769
8776
  state.openSpans = Object.fromEntries(Object.entries(state.openSpans).filter(([k]) => k !== matchedKey));
8770
8777
  writeState(sessionId, state);
8771
8778
  }
8779
+ const toolOutput = serializePayload(input.tool_output ?? input.toolOutput ?? input.tool_result ?? input.toolResult);
8772
8780
  await sendBatchTrace([
8773
8781
  {
8774
8782
  traceId,
@@ -8784,7 +8792,8 @@ async function handlePostToolUse() {
8784
8792
  kind: "tool",
8785
8793
  startTime: spanStartTime,
8786
8794
  endTime: now,
8787
- status: "completed"
8795
+ status: "completed",
8796
+ output: toolOutput
8788
8797
  }
8789
8798
  ]
8790
8799
  }
@@ -9116,5 +9125,5 @@ program.addCommand(createHooksCommand());
9116
9125
  program.addCommand(createFeedbackCommand());
9117
9126
  program.parse();
9118
9127
 
9119
- //# debugId=46B021887B91C72F64756E2164756E21
9128
+ //# debugId=F2490C97DAE1166264756E2164756E21
9120
9129
  //# sourceMappingURL=cli.js.map