march-cli 0.1.18 → 0.1.19

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": "march-cli",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "March CLI — terminal-native coding agent with context reconstruction",
5
5
  "type": "module",
6
6
  "main": "./src/main.mjs",
@@ -50,11 +50,21 @@ function formatCodexTransportDebugLines(fields) {
50
50
  ` wsConnections created=${fields.connectionsCreated} reused=${fields.connectionsReused}`,
51
51
  ` modes full=${fields.fullContextRequests} delta=${fields.deltaRequests} cached=${fields.cachedContextRequests} storeTrue=${fields.storeTrueRequests}`,
52
52
  ` fallback websocketFailures=${fields.websocketFailures} sseFallbacks=${fields.sseFallbacks} active=${fields.websocketFallbackActive}`,
53
+ ` error lastWebSocketError=${formatDebugValue(fields.lastWebSocketError)}`,
53
54
  ` lastInputItems=${fields.lastInputItems} lastDeltaInputItems=${fields.lastDeltaInputItems}`,
54
- ...(fields.lastWebSocketError ? [` lastWebSocketError=${fields.lastWebSocketError}`] : []),
55
55
  ];
56
56
  }
57
57
 
58
+ function formatDebugValue(value) {
59
+ if (value === null || value === undefined || value === "") return "none";
60
+ if (typeof value === "string") return JSON.stringify(value);
61
+ try {
62
+ return JSON.stringify(value);
63
+ } catch {
64
+ return JSON.stringify(String(value));
65
+ }
66
+ }
67
+
58
68
  function writeCodexTransportDebug(ui, lines) {
59
69
  if (ui?.debugLines) {
60
70
  ui.debugLines(lines);