@raytrace-cli/cli 0.19.9 → 0.19.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raytrace-cli/cli",
3
- "version": "0.19.9",
3
+ "version": "0.19.10",
4
4
  "mcpName": "io.github.Godcreatebugs/raytrace",
5
5
  "description": "See what your coding agent did: traces, tool calls, cost and step-by-step evidence for Claude Code and Codex.",
6
6
  "license": "MIT",
package/src/export.mjs CHANGED
@@ -12,7 +12,7 @@ function escapeHtml(str) {
12
12
  }
13
13
 
14
14
  function safeCodeBlock(content, lang = '') {
15
- const text = String(content ?? '');
15
+ const text = content !== null && typeof content === 'object' ? JSON.stringify(content, null, 2) : String(content ?? '');
16
16
  const matches = text.match(/`+/g) || [];
17
17
  let maxBackticks = 3;
18
18
  for (const m of matches) {
@@ -56,7 +56,7 @@ export function formatTraceJson(trace) {
56
56
  kind: e.kind,
57
57
  title: e.title,
58
58
  status: e.status,
59
- timestamp: e.timestamp,
59
+ timestamp: e.time ?? e.timestamp,
60
60
  raw,
61
61
  };
62
62
  }),
@@ -118,7 +118,7 @@ export function formatTraceMarkdown(trace) {
118
118
  lines.push(`### ${escapeHtml(ev.title)}`);
119
119
  lines.push(`- **Kind:** \`${ev.kind}\``);
120
120
  lines.push(`- **Status:** \`${ev.status || 'unknown'}\``);
121
- lines.push(`- **Timestamp:** ${ev.timestamp || 'unknown'}`);
121
+ lines.push(`- **Timestamp:** ${ev.time ?? ev.timestamp ?? 'unknown'}`);
122
122
 
123
123
  let rawObj = null;
124
124
  if (ev.raw) {
package/src/share.mjs CHANGED
@@ -34,11 +34,12 @@ export async function sharePrompt(traceId, { sandboxId, allowFork = false } = {}
34
34
  }
35
35
 
36
36
  const result = await call('POST', '/v1/shares', {
37
- body: {
37
+ headers: { 'content-type': 'application/json' },
38
+ body: JSON.stringify({
38
39
  trace_id: cleanTrace,
39
40
  sandbox_id: targetSandbox,
40
41
  allow_fork: Boolean(allowFork),
41
- },
42
+ }),
42
43
  });
43
44
 
44
45
  const fullUrl = `${DASHBOARD}${result.url}`;